diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 15:48:12 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 15:48:12 +0200 |
commit | 7063fefe4b5e866b27001bb9b911fc2f68034e40 (patch) | |
tree | 1ce35139475d83399572a3265414c2da3443a321 /tests/auto/quick | |
parent | f3446071da8357620d0c8593a04e3b4fbba88f21 (diff) | |
parent | 4f3379352a265bab00a7265f85ffc38a9ca4ffe4 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
Diffstat (limited to 'tests/auto/quick')
16 files changed, 204 insertions, 47 deletions
diff --git a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp index 45694f38dd..f4c37b4d66 100644 --- a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp +++ b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp @@ -252,9 +252,7 @@ void tst_qquickanimatedimage::remote() QFETCH(QString, fileName); QFETCH(bool, paused); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QQmlEngine engine; QQmlComponent component(&engine, server.url(fileName)); diff --git a/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml b/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml index 8374552974..8374552974 100755..100644 --- a/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml +++ b/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml diff --git a/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml b/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml index 1a8ca81ba0..1a8ca81ba0 100755..100644 --- a/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml +++ b/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml diff --git a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml index 742656641f..bdb866ce65 100644 --- a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml +++ b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml @@ -8,12 +8,18 @@ Flickable { contentHeight: 320 flickableDirection: Flickable.HorizontalFlick pressDelay: 10000 - Rectangle { + MouseArea { + objectName: "filteringMouseArea" x: 20 y: 20 width: 400 height: 300 - color: "yellow" + drag.filterChildren: true + Rectangle { + id: rectangle + color: "yellow" + anchors.fill: parent + } Flickable { objectName: "innerFlickable" anchors.fill: parent diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index eee7ffe560..dc7171746c 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -67,6 +67,7 @@ private slots: void flickDeceleration(); void pressDelay(); void nestedPressDelay(); + void filterReplayedPress(); void nestedClickThenFlick(); void flickableDirection(); void resizeContent(); @@ -93,6 +94,7 @@ private slots: void pressDelayWithLoader(); void movementFromProgrammaticFlick(); void cleanup(); + void contentSize(); private: void flickWithTouch(QQuickWindow *window, QTouchDevice *touchDevice, const QPoint &from, const QPoint &to); @@ -521,6 +523,48 @@ void tst_qquickflickable::nestedPressDelay() QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(90, 150)); } +void tst_qquickflickable::filterReplayedPress() +{ + QScopedPointer<QQuickView> window(new QQuickView); + window->setSource(testFileUrl("nestedPressDelay.qml")); + QTRY_COMPARE(window->status(), QQuickView::Ready); + QQuickViewTestUtil::centerOnScreen(window.data()); + QQuickViewTestUtil::moveMouseAway(window.data()); + window->show(); + QVERIFY(QTest::qWaitForWindowActive(window.data())); + QVERIFY(window->rootObject() != 0); + + QQuickFlickable *outer = qobject_cast<QQuickFlickable*>(window->rootObject()); + QVERIFY(outer != 0); + + QQuickFlickable *inner = window->rootObject()->findChild<QQuickFlickable*>("innerFlickable"); + QVERIFY(inner != 0); + + QQuickItem *filteringMouseArea = outer->findChild<QQuickItem *>("filteringMouseArea"); + QVERIFY(filteringMouseArea); + + moveAndPress(window.data(), QPoint(150, 150)); + // the MouseArea filtering the Flickable is pressed immediately. + QCOMPARE(filteringMouseArea->property("pressed").toBool(), true); + + // Some event causes the mouse area to set keepMouseGrab. + filteringMouseArea->setKeepMouseGrab(true); + QCOMPARE(filteringMouseArea->keepMouseGrab(), true); + + // The inner pressDelay will prevail (50ms, vs. 10sec) + // QTRY_VERIFY() has 5sec timeout, so will timeout well within 10sec. + QTRY_VERIFY(outer->property("pressed").toBool()); + + // The replayed press event isn't delivered to parent items of the + // flickable with the press delay, and the state of the parent mouse + // area is therefore unaffected. + QCOMPARE(filteringMouseArea->property("pressed").toBool(), true); + QCOMPARE(filteringMouseArea->keepMouseGrab(), true); + + QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 150)); +} + + // QTBUG-37316 void tst_qquickflickable::nestedClickThenFlick() { @@ -1739,6 +1783,40 @@ void tst_qquickflickable::movementFromProgrammaticFlick() QTRY_COMPARE(flickable->property("signalString").toString(), QString("msfsfeme")); } +// QTBUG_35038 +void tst_qquickflickable::contentSize() +{ + QQuickFlickable flickable; + QCOMPARE(flickable.contentWidth(), qreal(-1)); + QCOMPARE(flickable.contentHeight(), qreal(-1)); + + QSignalSpy cwspy(&flickable, SIGNAL(contentWidthChanged())); + QVERIFY(cwspy.isValid()); + + QSignalSpy chspy(&flickable, SIGNAL(contentHeightChanged())); + QVERIFY(chspy.isValid()); + + flickable.setWidth(100); + QCOMPARE(flickable.width(), qreal(100)); + QCOMPARE(flickable.contentWidth(), qreal(-1.0)); + QCOMPARE(cwspy.count(), 0); + + flickable.setContentWidth(10); + QCOMPARE(flickable.width(), qreal(100)); + QCOMPARE(flickable.contentWidth(), qreal(10)); + QCOMPARE(cwspy.count(), 1); + + flickable.setHeight(100); + QCOMPARE(flickable.height(), qreal(100)); + QCOMPARE(flickable.contentHeight(), qreal(-1.0)); + QCOMPARE(chspy.count(), 0); + + flickable.setContentHeight(10); + QCOMPARE(flickable.height(), qreal(100)); + QCOMPARE(flickable.contentHeight(), qreal(10)); + QCOMPARE(chspy.count(), 1); +} + QTEST_MAIN(tst_qquickflickable) #include "tst_qquickflickable.moc" diff --git a/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp index f4f1e290c1..b16e89dc39 100644 --- a/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp +++ b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp @@ -119,7 +119,7 @@ void tst_qquickfontloader::localFont() void tst_qquickfontloader::failLocalFont() { QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"" + testFileUrl("dummy.ttf").toString() + "\" }"; - QTest::ignoreMessage(QtWarningMsg, QString("<Unknown File>:2:1: QML FontLoader: Cannot load font: \"" + testFileUrl("dummy.ttf").toString() + "\"").toUtf8().constData()); + QTest::ignoreMessage(QtWarningMsg, QString("<Unknown File>:2:1: QML FontLoader: Cannot load font: \"" + testFileUrl("dummy.ttf").toString() + QLatin1Char('"')).toUtf8().constData()); QQmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickFontLoader *fontObject = qobject_cast<QQuickFontLoader*>(component.create()); diff --git a/tests/auto/quick/qquickfontloader_static/data/font.ttf b/tests/auto/quick/qquickfontloader_static/data/font.ttf Binary files differnew file mode 100644 index 0000000000..aae50d5035 --- /dev/null +++ b/tests/auto/quick/qquickfontloader_static/data/font.ttf diff --git a/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro b/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro new file mode 100644 index 0000000000..f6835c05c0 --- /dev/null +++ b/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro @@ -0,0 +1,12 @@ +CONFIG += testcase +TARGET = tst_qquickfontloader_static +macx:CONFIG -= app_bundle + +SOURCES += tst_qquickfontloader_static.cpp + +include (../../shared/util.pri) + +TESTDATA = data/* + +QT += core-private gui-private qml-private quick-private network testlib +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp b/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp new file mode 100644 index 0000000000..f7f00172ba --- /dev/null +++ b/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui/QGuiApplication> +#include <QtQuick/QQuickView> +#include <QtQml/QQmlComponent> +#include "../../shared/util.h" +#include <qtest.h> + +QByteArray qmltemplate("import QtQuick 2.0\n" +"\n" +"Rectangle {\n" +" width: 400\n" +" height: 400\n" +" color: \"red\"\n" +" FontLoader { id: fixedFont; source: \"%1\" }\n" +" Text {\n" +" text: \"hello world\"\n" +" anchors.centerIn: parent\n" +" font.family: fixedFont.name\n" +" }\n" +"}\n"); + +int main(int argc, char **argv) +{ + for (int i = 0; i < 3; i++) { + QGuiApplication app(argc, argv); + QQmlDataTest dataTest; + dataTest.initTestCase(); + QQuickView window; + QQmlComponent component (window.engine()); + QUrl current = QUrl::fromLocalFile(""); + qmltemplate.replace("%1", dataTest.testFileUrl("font.ttf").toString().toLocal8Bit()); + component.setData(qmltemplate, current); + window.setContent(current, &component, component.create()); + window.show(); + QTest::qWaitForWindowActive(&window); + } +} diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp index 9f3de8292f..f3351fcc4e 100644 --- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp @@ -2089,10 +2089,14 @@ void tst_QQuickItem::keyNavigation_focusReason() QVERIFY(key.isAccepted()); QCOMPARE(focusEventFilter.lastFocusReason, Qt::BacktabFocusReason); - // some arbitrary cursor key + // right - it's also one kind of key navigation key = QKeyEvent(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1); QGuiApplication::sendEvent(window, &key); QVERIFY(key.isAccepted()); + QCOMPARE(focusEventFilter.lastFocusReason, Qt::TabFocusReason); + + item->setFocus(true, Qt::OtherFocusReason); + QVERIFY(item->hasActiveFocus()); QCOMPARE(focusEventFilter.lastFocusReason, Qt::OtherFocusReason); delete window; diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp index 83294b10ab..b9d058ab80 100644 --- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -437,9 +437,7 @@ void tst_QQuickLoader::noResize() void tst_QQuickLoader::networkRequestUrl() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QQmlComponent component(&engine); const QString qml = "import QtQuick 2.0\nLoader { property int signalCount : 0; source: \"" + server.baseUrl().toString() + "/Rect120x60.qml\"; onLoaded: signalCount += 1 }"; @@ -462,9 +460,7 @@ void tst_QQuickLoader::networkRequestUrl() /* XXX Component waits until all dependencies are loaded. Is this actually possible? */ void tst_QQuickLoader::networkComponent() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory(), TestHTTPServer::Delay); + ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay); QQmlComponent component(&engine); const QString qml = "import QtQuick 2.0\n" @@ -473,8 +469,9 @@ void tst_QQuickLoader::networkComponent() " Component { id: comp; NW.Rect120x60 {} }\n" " Loader { sourceComponent: comp } }"; component.setData(qml.toUtf8(), dataDirectory()); - QCOMPARE(component.status(), QQmlComponent::Loading); - server.sendDelayedItem(); + // The component may be loaded synchronously or asynchronously, so we cannot test for + // status == Loading here. Also, it makes no sense to instruct the server to send here + // because in the synchronous case we're already done loading. QTRY_COMPARE(component.status(), QQmlComponent::Ready); QQuickItem *item = qobject_cast<QQuickItem*>(component.create()); @@ -494,9 +491,7 @@ void tst_QQuickLoader::networkComponent() void tst_QQuickLoader::failNetworkRequest() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); QTest::ignoreMessage(QtWarningMsg, QString(server.baseUrl().toString() + "/IDontExist.qml: File not found").toUtf8()); @@ -710,9 +705,7 @@ void tst_QQuickLoader::initialPropertyValues() QFETCH(QStringList, propertyNames); QFETCH(QVariantList, propertyValues); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory()); + ThreadedTestHTTPServer server(dataDirectory()); foreach (const QString &warning, expectedWarnings) QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp index eda3be5c1d..e4473b9540 100644 --- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp @@ -72,7 +72,7 @@ QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& QString persistent_dir = QQmlDataTest::instance()->dataDirectory(); QString arch = "unknown-architecture"; // QTest needs to help with this. - QString expectfile = persistent_dir + QDir::separator() + filebasename + "-" + arch + ".png"; + QString expectfile = persistent_dir + QDir::separator() + filebasename + QLatin1Char('-') + arch + ".png"; if (!QFile::exists(expectfile)) { actual.save(expectfile); @@ -2599,9 +2599,7 @@ void tst_qquicktextedit::cursorDelegate() void tst_qquicktextedit::remoteCursorDelegate() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory(), TestHTTPServer::Delay); + ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay); QQuickView view; @@ -2737,20 +2735,21 @@ void tst_qquicktextedit::delegateLoading() QFETCH(QString, qmlfile); QFETCH(QString, error); - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(testFile("httpfail"), TestHTTPServer::Disconnect); - server.serveDirectory(testFile("httpslow"), TestHTTPServer::Delay); - server.serveDirectory(testFile("http")); + QHash<QString, TestHTTPServer::Mode> dirs; + dirs[testFile("httpfail")] = TestHTTPServer::Disconnect; + dirs[testFile("httpslow")] = TestHTTPServer::Delay; + dirs[testFile("http")] = TestHTTPServer::Normal; + ThreadedTestHTTPServer server(dirs); error.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString()); + if (!error.isEmpty()) + QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); QQuickView view(server.url(qmlfile)); view.show(); view.requestActivate(); if (!error.isEmpty()) { - QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); QTRY_VERIFY(view.status()==QQuickView::Error); QTRY_VERIFY(!view.rootObject()); // there is fail item inside this test } else { diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 85123c6f92..493c03d00e 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -71,7 +71,7 @@ QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& QString persistent_dir = QQmlDataTest::instance()->dataDirectory(); QString arch = "unknown-architecture"; // QTest needs to help with this. - QString expectfile = persistent_dir + QDir::separator() + filebasename + "-" + arch + ".png"; + QString expectfile = persistent_dir + QDir::separator() + filebasename + QLatin1Char('-') + arch + ".png"; if (!QFile::exists(expectfile)) { actual.save(expectfile); @@ -2857,10 +2857,7 @@ void tst_qquicktextinput::cursorDelegate() void tst_qquicktextinput::remoteCursorDelegate() { - TestHTTPServer server; - QVERIFY2(server.listen(), qPrintable(server.errorString())); - server.serveDirectory(dataDirectory(), TestHTTPServer::Delay); - + ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay); QQuickView view; QQmlComponent component(view.engine(), server.url("/RemoteCursor.qml")); diff --git a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp index c0bf86a212..09ceb7aebd 100644 --- a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp +++ b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp @@ -115,15 +115,15 @@ private: QString xml; if (!data.isEmpty()) { - QStringList items = data.split(";"); + QStringList items = data.split(QLatin1Char(';')); foreach(const QString &item, items) { if (item.isEmpty()) continue; QVariantList variants; xml += QLatin1String("<item>"); - QStringList fields = item.split(","); + QStringList fields = item.split(QLatin1Char(',')); foreach(const QString &field, fields) { - QStringList values = field.split("="); + QStringList values = field.split(QLatin1Char('=')); if (values.count() != 2) { qWarning() << "makeItemXmlAndData: invalid field:" << field; continue; @@ -857,22 +857,22 @@ void tst_qquickxmllistmodel::threading() QModelIndex index = m1->index(i, 0); QList<int> roles = m1->roleNames().keys(); std::sort(roles.begin(), roles.end()); - QCOMPARE(m1->data(index, roles.at(0)).toString(), QString("A" + QString::number(i))); - QCOMPARE(m1->data(index, roles.at(1)).toString(), QString("1" + QString::number(i))); + QCOMPARE(m1->data(index, roles.at(0)).toString(), QLatin1Char('A') + QString::number(i)); + QCOMPARE(m1->data(index, roles.at(1)).toString(), QLatin1Char('1') + QString::number(i)); QCOMPARE(m1->data(index, roles.at(2)).toString(), QString("Football")); index = m2->index(i, 0); roles = m2->roleNames().keys(); std::sort(roles.begin(), roles.end()); - QCOMPARE(m2->data(index, roles.at(0)).toString(), QString("B" + QString::number(i))); - QCOMPARE(m2->data(index, roles.at(1)).toString(), QString("2" + QString::number(i))); + QCOMPARE(m2->data(index, roles.at(0)).toString(), QLatin1Char('B') + QString::number(i)); + QCOMPARE(m2->data(index, roles.at(1)).toString(), QLatin1Char('2') + QString::number(i)); QCOMPARE(m2->data(index, roles.at(2)).toString(), QString("Athletics")); index = m3->index(i, 0); roles = m3->roleNames().keys(); std::sort(roles.begin(), roles.end()); - QCOMPARE(m3->data(index, roles.at(0)).toString(), QString("C" + QString::number(i))); - QCOMPARE(m3->data(index, roles.at(1)).toString(), QString("3" + QString::number(i))); + QCOMPARE(m3->data(index, roles.at(0)).toString(), QLatin1Char('C') + QString::number(i)); + QCOMPARE(m3->data(index, roles.at(1)).toString(), QLatin1Char('3') + QString::number(i)); QCOMPARE(m3->data(index, roles.at(2)).toString(), QString("Curling")); } } diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro index 5593fd94f6..f25a28d45b 100644 --- a/tests/auto/quick/quick.pro +++ b/tests/auto/quick/quick.pro @@ -18,6 +18,7 @@ PRIVATETESTS += \ qquickapplication \ qquickbehaviors \ qquickfontloader \ + qquickfontloader_static \ qquickfontmetrics \ qquickimageprovider \ qquickpath \ diff --git a/tests/auto/quick/shared/viewtestutil.cpp b/tests/auto/quick/shared/viewtestutil.cpp index 0ba81cf2ef..9121314420 100644 --- a/tests/auto/quick/shared/viewtestutil.cpp +++ b/tests/auto/quick/shared/viewtestutil.cpp @@ -281,11 +281,11 @@ void QQuickViewTestUtil::QaimModel::resetItems(const QList<QPair<QString, QStrin void QQuickViewTestUtil::QaimModel::matchAgainst(const QList<QPair<QString, QString> > &other, const QString &error1, const QString &error2) { for (int i=0; i<other.count(); i++) { QVERIFY2(list.contains(other[i]), - QTest::toString(other[i].first + " " + other[i].second + " " + error1)); + QTest::toString(other[i].first + QLatin1Char(' ') + other[i].second + QLatin1Char(' ') + error1)); } for (int i=0; i<list.count(); i++) { QVERIFY2(other.contains(list[i]), - QTest::toString(list[i].first + " " + list[i].second + " " + error2)); + QTest::toString(list[i].first + QLatin1Char(' ') + list[i].second + QLatin1Char(' ') + error2)); } } |