Menu

Code Merge Request #5: Fixed compilation errors when wxWidgets is in UNICODE mode (open)

Merging...

Merged

Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Loren M. Lang wants to merge 2 commits from /u/penguin359/trustedqsl/ to master, 2023-01-01

String concatenation inside the underscore macro does not work normally and requires later segments to be wrapped in wxT().

Commit Date  
[1e0d57] (unicode-fixes) by Loren M. Lang Loren M. Lang

Fixed regression in compatibility with newer wxWidgets versions

The _() macro no longer wraps it's contents with wxT() triggering
compilations errors introduced in the previous commit. The wxT_2()
macro, however, is designed to do the right thing in both major
versions of wxWidgets.

2022-12-31 08:04:28 Tree
[26608d] by Loren M. Lang Loren M. Lang

Fixed compilation error when wxWidgets is compiled in UNICODE mode

String concatenation in the wxT() macro, and transitively the the _()
macro, only turns the first string into a wide string. Later strings
need to be explicitly wrapped in wxT().

2022-12-30 22:33:11 Tree

Discussion

  • Loren M. Lang

    Loren M. Lang - 2022-12-31

    After further testing, this patch actually breaks builds based on wxWidgets 2.9+ in UNICODE mode. A variant of this is needed if there is any desire to support wxWidgets 2.8 in UNICODE mode, but if that is officially deprecated, we can probably just reject this request.

     
  • Loren M. Lang

    Loren M. Lang - 2022-12-31

    Actually, there was a quick, short fix for it. It looks like they provide a macro called wxT_2() which acts like wxT() on wxWidgets 2.8.x and becomes a unity macro on wxWidgets 3.x. I tested compilation using all of wxWidgets 2.8.12, 3.0.5, and 3.2.0 and all of them now compile successfully in the UNICODE configuration. This should now be safe to merge unless you'd just rather ignore wxWidgets 2.8 for now.

     

    Last edit: Loren M. Lang 2022-12-31
  • Rick Murphy

    Rick Murphy - 2023-01-01

    This should already have been merged with later requests.

     

Log in to post a comment.