summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativemoduleplugin
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@nokia.com>2011-10-07 12:21:59 (GMT)
committerLiang Qi <liang.qi@nokia.com>2011-10-07 12:21:59 (GMT)
commit7cf9030bd7a50b6d98d454510417c6ecc3f33d49 (patch)
tree7c5c562ba490e217d8cef81ff1fd5958a0cacccb /tests/auto/declarative/qdeclarativemoduleplugin
parent7f3cd2949ccb16b1b611c05bf6ab7274cf04a0f8 (diff)
parent96fcfc720aa1c6d0b6d741f8169cd37ea9fcd9a9 (diff)
downloadQt-7cf9030bd7a50b6d98d454510417c6ecc3f33d49.zip
Qt-7cf9030bd7a50b6d98d454510417c6ecc3f33d49.tar.gz
Qt-7cf9030bd7a50b6d98d454510417c6ecc3f33d49.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts: doc/src/getting-started/installation.qdoc doc/src/platforms/platform-notes.qdoc src/corelib/tools/qlocale_symbian.cpp src/gui/kernel/qwidget_p.h src/network/access/qnetworkaccesshttpbackend.cpp src/opengl/qgl.cpp src/plugins/bearer/symbian/qnetworksession_impl.cpp
Diffstat (limited to 'tests/auto/declarative/qdeclarativemoduleplugin')
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index 2cc2971..96bea68 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -43,6 +43,7 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QDebug>
+#include <QtCore/qlibraryinfo.h>
#include "../shared/testhttpserver.h"
#include "../../../shared/util.h"
@@ -70,6 +71,7 @@ private slots:
void remoteImportWithUnquotedUri();
void versionNotInstalled();
void versionNotInstalled_data();
+ void importPath();
};
#ifdef Q_OS_SYMBIAN
@@ -308,6 +310,29 @@ void tst_qdeclarativemoduleplugin::versionNotInstalled()
VERIFY_ERRORS(errorFile.toLatin1().constData());
}
+void tst_qdeclarativemoduleplugin::importPath()
+{
+#ifndef Q_OS_SYMBIAN
+ QSKIP("Import path order testing for Symbian only", SkipAll);
+#else
+ QDeclarativeEngine engine;
+ QStringList imports = engine.importPathList();
+ QString installImportsPath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::ImportsPath));
+ QString driveOrder(QLatin1String("ZABCDEFGHIJKLMNOPQRSTUVWXY"));
+ int lastOrder = 30;
+ foreach(QString import, imports)
+ {
+ if (import.endsWith(installImportsPath))
+ {
+ int order = driveOrder.indexOf(import[0]);
+ QVERIFY(order < lastOrder);
+ lastOrder = order;
+ }
+ }
+ QVERIFY(lastOrder != 30);
+#endif
+}
+
QTEST_MAIN(tst_qdeclarativemoduleplugin)
#include "tst_qdeclarativemoduleplugin.moc"