summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
index ebafb28b..6a32a958 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -99,10 +99,10 @@ public:
if (id == QLatin1String("no-such-file.png"))
return QImage();
- int width = 100;
+ int width = 100;
int height = 100;
QImage image(width, height, QImage::Format_RGB32);
- if (size)
+ if (size)
*size = QSize(width, height);
if (requestedSize.isValid())
image = image.scaled(requestedSize);
@@ -136,10 +136,10 @@ public:
if (id == QLatin1String("no-such-file.png"))
return QPixmap();
- int width = 100;
+ int width = 100;
int height = 100;
QPixmap image(width, height);
- if (size)
+ if (size)
*size = QSize(width, height);
if (requestedSize.isValid())
image = image.scaled(requestedSize);
@@ -155,7 +155,7 @@ Q_DECLARE_METATYPE(TestQPixmapProvider*);
QString tst_qdeclarativeimageprovider::newImageFileName() const
{
// need to generate new filenames each time or else images are loaded
- // from cache and we won't get loading status changes when testing
+ // from cache and we won't get loading status changes when testing
// async loading
static int count = 0;
return QString("image://test/image-%1.png").arg(count++);
@@ -200,11 +200,11 @@ void tst_qdeclarativeimageprovider::fillRequestTestsData(const QString &id)
QTest::newRow(QTest::toString(id + " missing"))
<< "image://test/no-such-file.png" << "no-such-file.png" << "" << QSize(100,100)
- << "file::2:1: QML Image: Failed to get image from provider: image://test/no-such-file.png";
+ << "<Unknown File>:2:1: QML Image: Failed to get image from provider: image://test/no-such-file.png";
QTest::newRow(QTest::toString(id + " unknown provider"))
<< "image://bogus/exists.png" << "" << "" << QSize()
- << "file::2:1: QML Image: Failed to get image from provider: image://bogus/exists.png";
+ << "<Unknown File>:2:1: QML Image: Failed to get image from provider: image://bogus/exists.png";
}
void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvider *provider)
@@ -223,7 +223,7 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide
engine.addImageProvider("test", provider);
QVERIFY(engine.imageProvider("test") != 0);
- QString componentStr = "import QtQuick 1.0\nImage { source: \"" + source + "\"; "
+ QString componentStr = "import QtQuick 1.0\nImage { source: \"" + source + "\"; "
+ (async ? "asynchronous: true; " : "")
+ properties + " }";
QDeclarativeComponent component(&engine);
@@ -231,7 +231,7 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
QVERIFY(obj != 0);
- if (async)
+ if (async)
QTRY_VERIFY(obj->status() == QDeclarativeImage::Loading);
QCOMPARE(obj->source(), QUrl(source));
@@ -344,7 +344,7 @@ void tst_qdeclarativeimageprovider::removeProvider()
// remove the provider and confirm
QString fileName = newImageFileName();
- QString error("file::2:1: QML Image: Failed to get image from provider: " + fileName);
+ QString error("<Unknown File>:2:1: QML Image: Failed to get image from provider: " + fileName);
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
engine.removeImageProvider("test");