Avoid run-time warnings for OS X version checks under 10.10+.

Remove UMAGetSystemVersion() function calling which produced the following
warning on the console for every call:

WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.4 instead
of 10.10.4. Use NSProcessInfo's operatingSystemVersion property to get correct
system version number.*

Replace UMAGetSystemVersion with wxPlatformInfo::CheckOSVersion() which
internally uses wxGetOSVersion, which uses Gestalt calls not resulting in this
runtime warning.

Closes https://github.com/wxWidgets/wxWidgets/pull/55
This commit is contained in:
Tobias Taschner
2015-08-01 21:51:33 +02:00
committed by Vadim Zeitlin
parent 237739ba01
commit 658eca2896
5 changed files with 7 additions and 18 deletions

View File

@@ -34,6 +34,7 @@
#include "wx/menuitem.h"
#include "wx/treectrl.h"
#include "wx/listctrl.h"
#include "wx/platinfo.h"
#endif
#include "wx/tooltip.h"
@@ -2215,7 +2216,7 @@ bool wxWindowMac::MacHasScrollBarCorner() const
if ( frame )
{
// starting from 10.7 there are no resize indicators anymore
if ( (frame->GetWindowStyleFlag() & wxRESIZE_BORDER) && UMAGetSystemVersion() < 0x1070)
if ( (frame->GetWindowStyleFlag() & wxRESIZE_BORDER) && !wxPlatformInfo::Get().CheckOSVersion(10, 7) )
{
// Parent frame has resize handle
wxPoint frameBottomRight = frame->GetScreenRect().GetBottomRight();