Its value (0x80000000) is outside of the int type range on 32 bit platforms,
but we still want to allow using it as an initializer of int and/or long
variables for consistency with the other types, so cast it to int explicitly
to suppress -Wnarrowing warnings from recent g++ which were given when doing
this before.
Recent g++ versions give -Wnarrowing warning when a value outside of the type
range is used to initialize a variable of this type in { }. Avoid it in the
long long tests using explicit casts as we already cast between long long and
unsigned long long values here anyhow.
g++ 4.8.2, shipped with Ubuntu 14.04, generates incorrect code for checking
the loop termination condition, resulting in never ending loops in
HashMapTest().
Disable the optimizations for this function for 4.8.[012] as the bug seems to
be fixed in 4.8.4 and several similar (but not really identical) bug reports
in gcc bugzilla have been fixed in 4.8.3.
This should allow the unit tests on Linux buildbots, using 4.8.2, to run to
completion again.
Valgrind complains about reading beyond the end of buffer when using glibc
std::string for wxString implementation under amd64 Linux. Don't suppose that
the buffer has one extra null word at its end to avoid this.
Allow a library and an application to differ in __GXX_ABI_VERSION
within the range 1002-1008. The ABI changes made in this range
do not affect wxWidgets.
Calling SetMinSize() on wxMDIChildFrame in wxMSW prevented SetMaxSize() from
working as wxMDIChildFrame::HandleGetMinMaxInfo() didn't take the max size
into account and prevented the execution of the base class version of the same
method from taking place if min size was set.
Fix this simply by always delegating to the base class version after using
DefMDIChildProc() to compute the default max size values.
Closes#17029.
Declare _hypot() function globally, predefining __NO_INLINE__ in wx/math.h is
not enough as <math.h> is also included from some other standard headers, e.g.
<algorithm>, and including them results in the same bug as in wx/math.h
(i.e. https://sourceforge.net/p/mingw/bugs/2250/).
Definitions of non-standard LLONG_MAX, LLONG_MIN and ULLONG_MAX constants are
excluded from MinGW limits.h when compiling in "strict ANSI" mode, so define
them ourselves.
Don't ignore errors (this resulted in warnings in optimized builds because
variable "hr" containing the error code to was assigned but never used) and
don't leak memory in the (admittedly unlikely) case an error really occurs.
Also don't duplicate the code for creating a one element SAFEARRAY<VARIANT>,
extract it into a helper function.
Don't cast NMHDR::code field to int, this cast was added in the previous
millennium, probably to work around the wrong definition of NM_DBLCLK in some
ancient MinGW headers, but nowadays all MinGW distributions (tested with
MinGW 4.8.1, MinGW-64 4.9.1 and TDM-GCC 4.9.2) define it correctly and so
using this cast results in a warning -- just remove it to get rid of it.
Including standard math.h header with both -O2 and -std=c++NN options results
in compilation error due to a bug in the header, see MinGW bug report at
https://sourceforge.net/p/mingw/bugs/2250/
Work around this to allow the library to compile in release build with
-std=c++11. This is ugly but better than failing to compile at all.
These options enable "strict ANSI" mode in MinGW which omits declarations of
POSIX functions from the standard headers. To allow the library and, possibly
even more importantly, the user code including our headers, to compile with
these options, declare the functions that we need ourselves.
This might appear to go against the spirit of "strict ANSI" mode, but the only
alternative would be to not use such functions at all and silently cripple the
library when -std=c++NN is used, compared to -std=g++NN case, and this doesn't
seem appealing neither.
Closes#16984.
Fixes the bug which could be observed if string containing more then one flag entry was provided to wxPGProperty::SetFlagsFromString. In this case property flags were not set properly (were not set all) due to the error in splitting the string into tokens (whole string instead of its individual token was taken to compare).
Lookup table used to map between flag values and their names is redesigned in order to reduce the size and to make indexing simpler. There are no longer NULL entries in the table and every flag name is identified explicitly by the corresponding flag value and not by the index of the name entry in the table. Thanks to this the relation between flag value and flag name is more clear and the loops in wxPGProperty::GetFlagsAsString/SetFlagsAsString can be simplified.
This unit test will be executed for fast and full test. For each property there are generated random flags which are set with wxPGProperty::SetFlagsAsString(). Verification whether flags were set properly is done using wxPGProperty::GetFlagsAsString() and wxPGProperty::HasFlag() methods.
Set ms_isThemeEngineAvailable to -1, meaning that we need to reinitialize
themes, instead of false, meaning that themes are not available.
This fixes problems when the library is initialized, shut down and then
initialized again.
Closes#17023.
wxLogMessage displays message in pop-up window what prevents dragging the splitter and hence resizing cannot be in practice done. wxLogDebug is sufficient for the logging purposes in this place.
3a8ad952 introduced compilation failures with (some versions of) MinGW
and VC8 because their winnls.h apparently doesn't declare
SetThreadUILanguage(). Just declare the function ourselves to fix it.
This failure seems to only happen on buildbot, at least it couldn't be
reproduced after 100 runs of the test locally, so it just doesn't seem
possible to debug it.
Disable it to allow detecting when other tests fail (which would be
unexpected, unlike this one).
Calling SetContainingSizer() on a window which had been contained in another
sizer previously asserts since efce9b2306, so
change wxWrapSizer to set the containing sizer to NULL before resetting it.
Starting with Vista, SetThreadLocale() does basically nothing and does
not affect UI language. We need to call SetThreadUILanguage() as well
from wxLocale::Init() to have the locale reflected in e.g. standard
dialogs.
Currently, customizing some dialogs for small screen environment is done statically on the build stage by setting wxPG_SMALL_SCREEN to 1 (what is done for WXWINCE only).
Instead, we can do this for all platforms in a dynamic manner, based on the classification provided by wxSystemSettings::GetScreenType() function.
In order to do so there is introduced a static helper function wxPropertyGrid::IsSmallScreen() which is used to select right parameters (size, position) for several dialogs in order to display them correctly on the small screen.