From cdc5f47aeba94ba083a81dc681a09a351809e528 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 5 Apr 2017 21:11:12 -0700 Subject: Restore compatibility with Qt 5.7.0 and 5.6.1 QSysInfo::productType() returned "osx" for all versions of macOS, even 10.12. Change 3e2bde35786 was incorrect. [ChangeLog][Important Behavior Changes] QSysInfo::productType() and QFileSelector behavior on macOS was restored to match what Qt used to return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2, 5.7.1 and 5.8.0 is removed. [ChangeLog][Future Compatibility Notice] The identifiers that QSysInfo::productType() and QFileSelector will use to identify macOS systems will change in Qt 6.0 to match the Apple naming guidelines which will be current then. Task-number: QTBUG-59849 Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f Reviewed-by: Jake Petroules --- src/corelib/io/qfileselector.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/io/qfileselector.cpp') diff --git a/src/corelib/io/qfileselector.cpp b/src/corelib/io/qfileselector.cpp index 920281cef7..22995db07d 100644 --- a/src/corelib/io/qfileselector.cpp +++ b/src/corelib/io/qfileselector.cpp @@ -366,6 +366,7 @@ void QFileSelectorPrivate::updateSelectors() QStringList QFileSelectorPrivate::platformSelectors() { // similar, but not identical to QSysInfo::osType + // ### Qt6: remove macOS fallbacks to "mac" and the future compatibility QStringList ret; #if defined(Q_OS_WIN) // can't fall back to QSysInfo because we need both "winphone" and "winrt" for the Windows Phone case @@ -387,12 +388,11 @@ QStringList QFileSelectorPrivate::platformSelectors() # endif # endif QString productName = QSysInfo::productType(); -# ifdef Q_OS_MACOS - if (productName != QLatin1String("osx")) - ret << QStringLiteral("osx"); // compatibility -# endif if (productName != QLatin1String("unknown")) - ret << productName; // "opensuse", "fedora", "macos", "ios", "android" + ret << productName; // "opensuse", "fedora", "osx", "ios", "android" +# if defined(Q_OS_MACOS) + ret << QStringLiteral("macos"); // future compatibility +# endif #endif return ret; } -- cgit v1.2.3