← Back to team overview

hugin-devs team mailing list archive

[Bug 2123873] Re: wxWidgets 3.3 compatibility

 

I've taken the route to remove all deprecated wxT macros at all. So this should also fix these issues here.
Please report back if it compiles fine and works for you.

** Changed in: hugin
       Status: New => Fix Committed

** Changed in: hugin
    Milestone: None => 2025.0beta1

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/2123873

Title:
  wxWidgets 3.3 compatibility

Status in Hugin:
  Fix Committed

Bug description:
  I tried compiling 2024.0.1 against wxWidgets 3.3.1

  It needed the already committed changes for non-literal msgids:
  https://sourceforge.net/p/hugin/hugin/ci/1e5e4a74970bd7608e8a796ec56e303e7799d29c/

  Plus there are some errors caused by string concatenations due to changes to operators on wx types
  https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.3.0/docs/changes.txt

  e.g.

  hugin-2024.0.1/src/hugin1/base_wx/StitchingExecutor.cpp:454:40: error: no match for ‘operator+’ (operand types are ‘const wchar_t [4]’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
    454 |             nonaArgs.Append(wxT("-z ") + opts.outputLayersCompression + wxT(" "));
        |                                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        |                                               |
        |                                               std::string {aka std::__cxx11::basic_string<char>}

  These errors could be resolved by removing the obsolete since wxWidgets 2.9 wxT()'s in those concatenations
  https://docs.wxwidgets.org/3.2/group__group__funcmacro__string.html#ga437ea6ba615b75dac8603e96ec864160

  
  Patch against 05db4cec63d2900527ab63bcbab8e1cf833c720e:

  --- a/src/hugin1/base_wx/StitchingExecutor.cpp
  +++ b/src/hugin1/base_wx/StitchingExecutor.cpp
  @@ -451,8 +451,8 @@
           wxString enLayersCompressionArgs;
           if (!opts.outputLayersCompression.empty())
           {
  -            nonaArgs.Append(wxT("-z ") + opts.outputLayersCompression + wxT(" "));
  -            enLayersCompressionArgs.Append(wxT(" --compression=") + opts.outputLayersCompression + wxT(" "));
  +            nonaArgs.Append("-z " + opts.outputLayersCompression + " ");
  +            enLayersCompressionArgs.Append(" --compression=" + opts.outputLayersCompression + " ");
           }
           else
           {
  @@ -510,7 +510,7 @@
           };
           finalCompressionArgs.Append(wxT(" "));
           // prepare enfuse arguments
  -        wxString enfuseArgs(opts.enfuseOptions + wxT(" "));
  +        wxString enfuseArgs(opts.enfuseOptions + " ");
           if ((opts.getHFOV() == 360.0) && (opts.getWidth() == opts.getROI().width()))
           {
               enfuseArgs.Append(wxT(" -w"));
  @@ -598,7 +598,7 @@
                           finalNonaArgs.Append(wxT("-m TIFF "));
                           if (!opts.outputImageTypeCompression.empty())
                           {
  -                            finalNonaArgs.Append(wxT("-z ") + opts.outputImageTypeCompression + wxT(" "));
  +                            finalNonaArgs.Append("-z " + opts.outputImageTypeCompression + " ");
                           };
                       }
                       else
  @@ -934,7 +934,7 @@
                       stackedImages.Add(stackImgName);
                       outputFiles.Add(stackImgName);
                       commands->push_back(new NormalCommand(GetInternalProgram(ExePath, wxT("hugin_hdrmerge")),
  -                        opts.hdrmergeOptions + wxT(" -o ") + wxEscapeFilename(stackImgName) + wxT(" -- ") + GetQuotedFilenamesString(stackImgs),
  +                        opts.hdrmergeOptions + " -o " + wxEscapeFilename(stackImgName) + " -- " + GetQuotedFilenamesString(stackImgs),
                           wxString::Format(_("Merging HDR stack number %u..."), stackNr)));
                       if (!opts.outputHDRStacks)
                       {

To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/2123873/+subscriptions



References