aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickanimations
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-07-25 16:59:17 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-31 00:22:36 +0200
commitc9b7582a2e7ad9fcd03dd999c3b7a16b72803238 (patch)
treed1ffdb193576fef0c243600f46c69b180d2ad2a8 /tests/auto/quick/qquickanimations
parent2e6accbbbb9783ff6e5ad171f179d5021b0761af (diff)
Implement strict mode for qmldir modules
Allow a module's qmldir to contain a module directive, which when present specifies 'strict mode' import processing. In strict mode, type registrations are only permitted into the namespace identified in the qmldir file's module directive. In addition, any type registrations to that namespace originating from other modules are treated as error conditions. Task-number: QTBUG-26551 Change-Id: I081bde2d3b83d3f28524440177fb2cd1ccee34ad Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickanimations')
-rw-r--r--tests/auto/quick/qquickanimations/tst_qquickanimations.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
index b5ab04cccd..56fb1e9c00 100644
--- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
+++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
@@ -642,7 +642,13 @@ void tst_qquickanimations::resume()
QVERIFY(!animation.isPaused());
QCOMPARE(spy.count(), 2);
- qmlRegisterType<QQuickPropertyAnimation>("QtQuick",2,0,"PropertyAnimation"); //make sure QQuickPropertyAnimation has correct qml type name
+ // Load QtQuick to ensure that QQuickPropertyAnimation is registered as PropertyAnimation
+ {
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick 2.0\nQtObject {}\n", QUrl());
+ }
+
QByteArray message = "<Unknown File>: QML PropertyAnimation: setPaused() cannot be used when animation isn't running.";
QTest::ignoreMessage(QtWarningMsg, message);
animation.pause();