diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-06-22 07:11:10 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-06-22 07:11:10 (GMT) |
commit | ca17b86f02524338d1501652c22eb9fd2501317b (patch) | |
tree | 6190986690ca6e537791226ccbdd94b3afab9e8e /demos | |
parent | b5af8fbbdc26fa50f40dad2c159b6b64827fa431 (diff) | |
download | Qt-ca17b86f02524338d1501652c22eb9fd2501317b.zip Qt-ca17b86f02524338d1501652c22eb9fd2501317b.tar.gz Qt-ca17b86f02524338d1501652c22eb9fd2501317b.tar.bz2 |
Check for main.qml first
On case insensitive platforms, it would accidently pick up internal
components sometimes if you check the other way around.
Task-number: QTBUG-11566
Diffstat (limited to 'demos')
-rw-r--r-- | demos/qtdemo/menumanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp index a2ceb0e..15561ab 100644 --- a/demos/qtdemo/menumanager.cpp +++ b/demos/qtdemo/menumanager.cpp @@ -369,10 +369,10 @@ void MenuManager::launchQmlExample(const QString &name) dir = QDir(QLibraryInfo::location(QLibraryInfo::DemosPath)); else dir = QDir(QLibraryInfo::location(QLibraryInfo::ExamplesPath)); - QFile file(dir.path() + "/" + dirName + "/" + fileName + "/" + fileName.split('/').last() + ".qml"); + QFile file(dir.path() + "/" + dirName + "/" + fileName + "/" + "main.qml"); if(!file.exists()){ - //try main.qml as well - file.setFileName(dir.path() + "/" + dirName + "/" + fileName + "/" + "main.qml"); + //try dirname.qml as well + file.setFileName(dir.path() + "/" + dirName + "/" + fileName + "/" + fileName.split('/').last() + ".qml"); if(!file.exists()){ exampleError(QProcess::UnknownError); return; |