diff options
-rw-r--r-- | src/corelib/io/qfileselector.cpp | 9 | ||||
-rw-r--r-- | tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/corelib/io/qfileselector.cpp b/src/corelib/io/qfileselector.cpp index a34af72dfd..cb4f5c4b07 100644 --- a/src/corelib/io/qfileselector.cpp +++ b/src/corelib/io/qfileselector.cpp @@ -133,9 +133,9 @@ QFileSelectorPrivate::QFileSelectorPrivate() With those files available, you would select a different file on the android platform, but only if the locale was en_GB. - QFileSelector will not attempt to select if the base file does not exist. For error handling in - the case no valid selectors are present, it is recommended to have a default or error-handling - file in the base file location even if you expect selectors to be present for all deployments. + For error handling in the case no valid selectors are present, it is recommended to have a default or + error-handling file in the base file location even if you expect selectors to be present for all + deployments. In a future version, some may be marked as deploy-time static and be moved during the deployment step as an optimization. As selectors come with a performance cost, it is @@ -298,9 +298,6 @@ QString QFileSelectorPrivate::select(const QString &filePath) const { Q_Q(const QFileSelector); QFileInfo fi(filePath); - // If file doesn't exist, don't select - if (!fi.exists()) - return filePath; QString ret = selectionHelper(fi.path().isEmpty() ? QString() : fi.path() + QLatin1Char('/'), fi.fileName(), q->allSelectors()); diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp index e5ede1ad06..8c2886f337 100644 --- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp +++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp @@ -138,7 +138,7 @@ void tst_QFileSelector::basicTest_data() << QString(":/extras/test2"); QTest::newRow("custom1-withselector-nobasefile") << QString(":/extras/test3") << (QStringList() << custom1) - << QString(":/extras/test3"); + << QString(":/extras/+custom1/test3"); QString custom2("custom2"); QString custom3("custom3"); |