aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-20 16:19:05 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-20 16:19:05 +0200
commit2402d3a303f712f4402cc258fcd7c8983227ea31 (patch)
tree3e79afdfd1e4268adecf4ad98bb867025048bd61 /tests
parent1037a7f7123dcf9f7b48a6a74118f746ddcbf3d5 (diff)
parent5d4b006181d009e6245d5d38c7798603ddcab06a (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp b/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp
index a790c7b9de..3eea3c955c 100644
--- a/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp
+++ b/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp
@@ -71,6 +71,9 @@ private slots:
void removeProvider_data();
void removeProvider();
+ void imageProviderId_data();
+ void imageProviderId();
+
void threadTest();
private:
@@ -372,6 +375,31 @@ void tst_qquickimageprovider::removeProvider()
delete obj;
}
+void tst_qquickimageprovider::imageProviderId_data()
+{
+ QTest::addColumn<QString>("providerId");
+
+ QTest::newRow("lowercase") << QStringLiteral("imageprovider");
+ QTest::newRow("CamelCase") << QStringLiteral("ImageProvider");
+ QTest::newRow("UPPERCASE") << QStringLiteral("IMAGEPROVIDER");
+}
+
+void tst_qquickimageprovider::imageProviderId()
+{
+ QFETCH(QString, providerId);
+
+ QQmlEngine engine;
+
+ bool deleteWatch = false;
+ TestQImageProvider *provider = new TestQImageProvider(&deleteWatch);
+
+ engine.addImageProvider(providerId, provider);
+ QVERIFY(engine.imageProvider(providerId) != 0);
+
+ engine.removeImageProvider(providerId);
+ QVERIFY(deleteWatch);
+}
+
class TestThreadProvider : public QQuickImageProvider
{
public: