Remove duplicate qnx from the platform file selector names
Update the QFileSelector tests for QNX. Co-authored-by: James McDonnell <jmcdonnell@blackberry.com> Change-Id: I68a8fde86725596323b539433287ac1a18fac1eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
18f0a45964
commit
4f9b2cb026
@ -146,7 +146,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
|
||||
Selectors normally available are
|
||||
\list
|
||||
\li platform, any of the following strings which match the platform the application is running
|
||||
on (list not exhaustive): android, ios, osx, darwin, mac, linux, wince, unix, windows.
|
||||
on (list not exhaustive): android, ios, osx, darwin, mac, macos, linux, qnx, unix, windows.
|
||||
On Linux, if it can be determined, the name of the distribution too, like debian,
|
||||
fedora or opensuse.
|
||||
\li locale, same as QLocale().name().
|
||||
@ -373,8 +373,8 @@ QStringList QFileSelectorPrivate::platformSelectors()
|
||||
# endif
|
||||
#elif defined(Q_OS_UNIX)
|
||||
ret << QStringLiteral("unix");
|
||||
# if !defined(Q_OS_ANDROID)
|
||||
// we don't want "linux" for Android
|
||||
# if !defined(Q_OS_ANDROID) && !defined(Q_OS_QNX)
|
||||
// we don't want "linux" for Android or two instances of "qnx" for QNX
|
||||
ret << QSysInfo::kernelType();
|
||||
# ifdef Q_OS_MAC
|
||||
ret << QStringLiteral("mac"); // compatibility, since kernelType() is "darwin"
|
||||
|
@ -21,6 +21,7 @@
|
||||
<file>platforms/+unix/+darwin/test</file>
|
||||
<file>platforms/+unix/+haiku/test</file>
|
||||
<file>platforms/+unix/+linux/test</file>
|
||||
<file>platforms/+unix/+qnx/test</file>
|
||||
<file>platforms/+unix/test</file>
|
||||
<file>platforms/+windows/+wince/test</file>
|
||||
<file>platforms/+windows/+winnt/test</file>
|
||||
@ -34,6 +35,7 @@
|
||||
<file>platforms/+mac/test</file>
|
||||
<file>platforms/+haiku/test</file>
|
||||
<file>platforms/+linux/test</file>
|
||||
<file>platforms/+qnx/test</file>
|
||||
<file>platforms/+wince/test</file>
|
||||
<file>platforms/+winrt/test</file>
|
||||
|
||||
@ -44,6 +46,7 @@
|
||||
<file>platforms/+macos/test2</file>
|
||||
<file>platforms/+haiku/test2</file>
|
||||
<file>platforms/+linux/test2</file>
|
||||
<file>platforms/+qnx/test2</file>
|
||||
<file>platforms/+wince/test2</file>
|
||||
<file>platforms/+winnt/test2</file>
|
||||
<file>platforms/+winrt/test2</file>
|
||||
|
@ -86,7 +86,7 @@ void tst_QFileSelector::basicTest_data()
|
||||
QString expectedPlatform2File(""); //Only the last selector
|
||||
QString expectedPlatform3File; // Only the first selector (the family)
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && \
|
||||
!defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX) && !defined(Q_OS_HAIKU)
|
||||
!defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX) && !defined(Q_OS_HAIKU) && !defined(Q_OS_QNX)
|
||||
/* 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
|
||||
lead to a case where we don't have that file so we can't expect the concatenation of platform
|
||||
|
Loading…
x
Reference in New Issue
Block a user