diff --git a/docs/changes.txt b/docs/changes.txt index 7bb64bedf0..840d858e42 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -96,6 +96,9 @@ All: - Fixed a bug in UNC path testing. - Improved command line parser usage help. - Fixed race condition bugs in wxCondition. +- Added wxT_2() for forward compatibility with wxWidgets 3. Use it in + initialization of wxCmdLineEntryDesc struct elements and (very few) other + places where wxT() is required currently but won't be allowed in v3. All (GUI): diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index a1f71fd70b..1332b562c0 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -237,6 +237,14 @@ #define wxT(x) x #endif /* Unicode/!Unicode */ +/* + This macro is defined for forward compatibility with wxWidgets 3. It should + be used in the places where wxWidgets 2 API requires wxT() (in Unicode + build) but wxWidgets 3 doesn't accept it, e.g. wxCmdLineEntryDesc struct + elements initializers. + */ +#define wxT_2(x) wxT(x) + /* We define _T() as a synonym of wxT() for backwards compatibility and also for the benefit of Windows programmers used to it. But this identifier is a