QFileSelector: correct the macros for Apple platforms.
This fixes a serious regression from
7d72516b52
.
[ChangeLog] QFileSelector: the identifier for OS X has been changed back
to 'osx' from 'mac', and 'mac' and 'darwin' have now been added as
selectors for Darwin OS (which is the base of both OS X and iOS).
Task-number: QTBUG-35073
Change-Id: I83183e34c5a697338cc1ddcac33a41bd379ded12
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
This commit is contained in:
parent
cc88e6e92c
commit
fdef360bad
@ -157,7 +157,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
|
|||||||
Selectors normally available are
|
Selectors normally available are
|
||||||
\list
|
\list
|
||||||
\li platform, any of the following strings which match the platform the application is running
|
\li platform, any of the following strings which match the platform the application is running
|
||||||
on: android, blackberry, ios, mac, linux, wince, unix, windows.
|
on: android, blackberry, ios, osx, darwin, mac, linux, wince, unix, windows.
|
||||||
\li locale, same as QLocale::system().name().
|
\li locale, same as QLocale::system().name().
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@ -374,12 +374,16 @@ QStringList QFileSelectorPrivate::platformSelectors()
|
|||||||
ret << QStringLiteral("blackberry");
|
ret << QStringLiteral("blackberry");
|
||||||
# elif defined(Q_OS_QNX)
|
# elif defined(Q_OS_QNX)
|
||||||
ret << QStringLiteral("qnx");
|
ret << QStringLiteral("qnx");
|
||||||
# elif defined(Q_OS_IOS)
|
|
||||||
ret << QStringLiteral("ios");
|
|
||||||
# elif defined(Q_OS_LINUX)
|
# elif defined(Q_OS_LINUX)
|
||||||
ret << QStringLiteral("linux");
|
ret << QStringLiteral("linux");
|
||||||
# elif defined(Q_OS_MAC)
|
# elif defined(Q_OS_DARWIN)
|
||||||
ret << QStringLiteral("mac");
|
ret << QStringLiteral("darwin");
|
||||||
|
ret << QStringLiteral("mac"); // compatibility synonym
|
||||||
|
# if defined(Q_OS_IOS)
|
||||||
|
ret << QStringLiteral("ios");
|
||||||
|
# elif defined(Q_OS_OSX)
|
||||||
|
ret << QStringLiteral("osx");
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
struct utsname u;
|
struct utsname u;
|
||||||
if (uname(&u) != -1)
|
if (uname(&u) != -1)
|
||||||
|
@ -13,8 +13,10 @@
|
|||||||
<file>platforms/test</file>
|
<file>platforms/test</file>
|
||||||
<file>platforms/+unix/+android/test</file>
|
<file>platforms/+unix/+android/test</file>
|
||||||
<file>platforms/+unix/+blackberry/test</file>
|
<file>platforms/+unix/+blackberry/test</file>
|
||||||
<file>platforms/+unix/+ios/test</file>
|
<file>platforms/+unix/+darwin/+mac/+ios/test</file>
|
||||||
<file>platforms/+unix/+mac/test</file>
|
<file>platforms/+unix/+darwin/+mac/+osx/test</file>
|
||||||
|
<file>platforms/+unix/+darwin/+mac/test</file>
|
||||||
|
<file>platforms/+unix/+darwin/test</file>
|
||||||
<file>platforms/+windows/+wince/test</file>
|
<file>platforms/+windows/+wince/test</file>
|
||||||
<file>platforms/+windows/test</file>
|
<file>platforms/+windows/test</file>
|
||||||
<file>platforms/+windows/test2</file>
|
<file>platforms/+windows/test2</file>
|
||||||
@ -24,12 +26,14 @@
|
|||||||
<file>platforms/+android/test2</file>
|
<file>platforms/+android/test2</file>
|
||||||
<file>platforms/+blackberry/test2</file>
|
<file>platforms/+blackberry/test2</file>
|
||||||
<file>platforms/+ios/test2</file>
|
<file>platforms/+ios/test2</file>
|
||||||
<file>platforms/+mac/test2</file>
|
<file>platforms/+osx/test2</file>
|
||||||
<file>platforms/+linux/test2</file>
|
<file>platforms/+linux/test2</file>
|
||||||
<file>platforms/+wince/test2</file>
|
<file>platforms/+wince/test2</file>
|
||||||
<file>platforms/+android/test</file>
|
<file>platforms/+android/test</file>
|
||||||
<file>platforms/+blackberry/test</file>
|
<file>platforms/+blackberry/test</file>
|
||||||
<file>platforms/+ios/test</file>
|
<file>platforms/+ios/test</file>
|
||||||
|
<file>platforms/+osx/test</file>
|
||||||
|
<file>platforms/+darwin/test</file>
|
||||||
<file>platforms/+mac/test</file>
|
<file>platforms/+mac/test</file>
|
||||||
<file>platforms/+linux/test</file>
|
<file>platforms/+linux/test</file>
|
||||||
<file>platforms/+wince/test</file>
|
<file>platforms/+wince/test</file>
|
||||||
|
@ -94,7 +94,8 @@ void tst_QFileSelector::basicTest_data()
|
|||||||
QString test2("/test2");
|
QString test2("/test2");
|
||||||
QString expectedPlatform1File(":/platforms");
|
QString expectedPlatform1File(":/platforms");
|
||||||
QString expectedPlatform2File(""); //Only the last selector
|
QString expectedPlatform2File(""); //Only the last selector
|
||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_IOS) && !defined(Q_OS_LINUX) && !defined(Q_OS_MAC)
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && \
|
||||||
|
!defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX)
|
||||||
/* We are only aware of specific unixes, and do not have test files for any of the others.
|
/* We are only aware of specific unixes, and do not have test files for any of the others.
|
||||||
However those unixes can get a selector added from the result of a uname call, so this will
|
However those unixes can get a selector added from the result of a uname call, so this will
|
||||||
lead to a case where we don't have that file so we can't expect the concatenation of platform
|
lead to a case where we don't have that file so we can't expect the concatenation of platform
|
||||||
|
Loading…
Reference in New Issue
Block a user