diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-05-24 21:26:33 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-05-24 21:50:29 +0200 |
commit | 0837453ef90f5d5f569702aa1c7620648dae2c00 (patch) | |
tree | 43a35f937dfcca3f467d4deafe2800d01f0859da /tests | |
parent | 9ff09fb283cd130fb717769b44f54bfbb28efd8a (diff) | |
parent | 0ba6dffd96a0dda8e3938b09395075c19e46644b (diff) |
Merge remote-tracking branch 'origin/dev' into HEAD
Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
Diffstat (limited to 'tests')
21 files changed, 181 insertions, 55 deletions
diff --git a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp index 1b2df62b76..3f89913f3b 100644 --- a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp +++ b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp @@ -39,6 +39,8 @@ #include <private/qv8engine_p.h> #include <private/qv4objectiterator_p.h> #include <private/qv4isel_moth_p.h> +#include <private/qv4string_p.h> +#include <private/qqmlbuiltinfunctions_p.h> using namespace QV4; using namespace QV4::Debugging; diff --git a/tests/auto/qml/qqmlcomponent/data/callingQmlContext.qml b/tests/auto/qml/qqmlcomponent/data/callingQmlContext.qml new file mode 100644 index 0000000000..8193d0f36c --- /dev/null +++ b/tests/auto/qml/qqmlcomponent/data/callingQmlContext.qml @@ -0,0 +1,13 @@ +import QtQml 2.0 +import qqmlcomponenttest 1.0 +QtObject { + property Component factory + property QtObject incubatedObject + + Component.onCompleted: { + var incubatorState = factory.incubateObject(null, { value: 42 }) + incubatorState.onStatusChanged = function(status) { + incubatedObject = incubatorState.object + } + } +} diff --git a/tests/auto/qml/qqmlcomponent/data/callingQmlContextComponent.qml b/tests/auto/qml/qqmlcomponent/data/callingQmlContextComponent.qml new file mode 100644 index 0000000000..adf491c87e --- /dev/null +++ b/tests/auto/qml/qqmlcomponent/data/callingQmlContextComponent.qml @@ -0,0 +1,3 @@ +import qqmlcomponenttest 1.0 +CallingContextCheckingClass { +} diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp index c1e51410c8..723f575330 100644 --- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp +++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -35,6 +35,9 @@ #include <QtQuick> #include <QtQuick/private/qquickrectangle_p.h> #include <QtQuick/private/qquickmousearea_p.h> +#include <private/qv8engine_p.h> +#include <private/qqmlcontext_p.h> +#include <private/qv4scopedvalue_p.h> #include <qcolor.h> #include "../../shared/util.h" #include "testhttpserver.h" @@ -111,6 +114,7 @@ private slots: void onDestructionCount(); void recursion(); void recursionContinuation(); + void callingContextForInitialProperties(); private: QQmlEngine engine; @@ -518,6 +522,63 @@ void tst_qqmlcomponent::recursionContinuation() QVERIFY(object->property("success").toBool()); } +class CallingContextCheckingClass : public QObject +{ + Q_OBJECT + Q_PROPERTY(int value READ value WRITE setValue) +public: + CallingContextCheckingClass() + : m_value(0) + {} + + int value() const { return m_value; } + void setValue(int v) { + scopeObject.clear(); + callingContextData.setContextData(0); + + m_value = v; + QJSEngine *jsEngine = qjsEngine(this); + if (!jsEngine) + return; + QV4::ExecutionEngine *v4 = QV8Engine::getV4(jsEngine); + if (!v4) + return; + QV4::Scope scope(v4); + QV4::Scoped<QV4::QmlContext> qmlContext(scope, v4->qmlContext()); + if (!qmlContext) + return; + callingContextData = qmlContext->qmlContext(); + scopeObject = qmlContext->qmlScope(); + } + + int m_value; + QQmlGuardedContextData callingContextData; + QPointer<QObject> scopeObject; +}; + +void tst_qqmlcomponent::callingContextForInitialProperties() +{ + qmlRegisterType<CallingContextCheckingClass>("qqmlcomponenttest", 1, 0, "CallingContextCheckingClass"); + + QQmlComponent testFactory(&engine, testFileUrl("callingQmlContextComponent.qml")); + + QQmlComponent component(&engine, testFileUrl("callingQmlContext.qml")); + QScopedPointer<QObject> root(component.beginCreate(engine.rootContext())); + QVERIFY(!root.isNull()); + root->setProperty("factory", QVariant::fromValue(&testFactory)); + component.completeCreate(); + QTRY_VERIFY(qvariant_cast<QObject *>(root->property("incubatedObject"))); + QObject *o = qvariant_cast<QObject *>(root->property("incubatedObject")); + CallingContextCheckingClass *checker = qobject_cast<CallingContextCheckingClass*>(o); + QVERIFY(checker); + + QVERIFY(!checker->callingContextData.isNull()); + QVERIFY(checker->callingContextData->urlString().endsWith(QStringLiteral("callingQmlContext.qml"))); + + QVERIFY(!checker->scopeObject.isNull()); + QVERIFY(checker->scopeObject->metaObject()->indexOfProperty("incubatedObject") != -1); +} + QTEST_MAIN(tst_qqmlcomponent) #include "tst_qqmlcomponent.moc" diff --git a/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml b/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml new file mode 100644 index 0000000000..2ceee2bade --- /dev/null +++ b/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml @@ -0,0 +1,7 @@ +import QtQml 2.0 +QtObject { + property int value: { + console.log("lookup in global object") + return 1 + } +} diff --git a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp index edbf0869e8..e0cde6c86f 100644 --- a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp +++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp @@ -56,6 +56,7 @@ private slots: void refreshExpressions(); void refreshExpressionsCrash(); void refreshExpressionsRootContext(); + void skipExpressionRefresh_qtbug_53431(); void qtbug_22535(); void evalAfterInvalidate(); @@ -637,6 +638,19 @@ void tst_qqmlcontext::refreshExpressionsRootContext() delete o1; } +void tst_qqmlcontext::skipExpressionRefresh_qtbug_53431() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("qtbug_53431.qml")); + QScopedPointer<QObject> object(component.create(0)); + QVERIFY(!object.isNull()); + QCOMPARE(object->property("value").toInt(), 1); + object->setProperty("value", 10); + QCOMPARE(object->property("value").toInt(), 10); + engine.rootContext()->setContextProperty("randomContextProperty", 42); + QCOMPARE(object->property("value").toInt(), 10); +} + void tst_qqmlcontext::qtbug_22535() { QQmlEngine engine; diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 98a97ebd66..5bb129fbb8 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -248,8 +248,6 @@ private slots: void earlyIdObjectAccess(); - void dataAlignment(); - void deleteSingletons(); void arrayBuffer_data(); @@ -4131,12 +4129,6 @@ void tst_qqmllanguage::earlyIdObjectAccess() QVERIFY(o->property("success").toBool()); } -void tst_qqmllanguage::dataAlignment() -{ - QVERIFY(sizeof(QQmlVMEMetaData) % sizeof(int) == 0); - QVERIFY(sizeof(QQmlVMEMetaData::AliasData) % sizeof(int) == 0); -} - void tst_qqmllanguage::deleteSingletons() { QPointer<QObject> singleton; diff --git a/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro b/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro index 76544aa553..3eeb0008bd 100644 --- a/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro +++ b/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro @@ -6,7 +6,6 @@ DESTDIR = ../imports/org/qtproject/AutoTestQmlPluginType.2 QT += core-private gui-private qml-private -IMPORT_DIR = DESTDIR IMPORT_FILES = \ qmldir diff --git a/tests/auto/qmldevtools/compile/compile.pro b/tests/auto/qmldevtools/compile/compile.pro index 71d91c107d..54430eb668 100644 --- a/tests/auto/qmldevtools/compile/compile.pro +++ b/tests/auto/qmldevtools/compile/compile.pro @@ -5,7 +5,7 @@ force_bootstrap { !build_pass: CONFIG += release } else { QT = core - !build_pass:contains(QT_CONFIG, build_all): CONFIG += release + !build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release } QT += qmldevtools-private macx:CONFIG -= app_bundle diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 3087cfbd9d..872a71011d 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -74,15 +74,14 @@ private: tst_examples::tst_examples() { // Add files to exclude here - excludedFiles << "examples/quick/canvas/tiger/tiger.qml"; // QTBUG-26528 excludedFiles << "snippets/qml/listmodel/listmodel.qml"; //Just a ListModel, no root QQuickItem excludedFiles << "examples/quick/demos/photosurface/photosurface.qml"; // root item is Window rather than Item - // Add directories you want excluded here (don't add examples/, because they install to examples/qtdeclarative/) + // Add directories you want excluded here excludedDirs << "shared"; //Not an example - excludedDirs << "quick/text/fonts"; // QTBUG-29004 excludedDirs << "snippets/qml/path"; //No root QQuickItem - excludedDirs << "tutorials/gettingStartedQml"; //C++ example, but no cpp files in root dir + excludedDirs << "examples/qml/qmlextensionplugins"; //Requires special import search path + excludedDirs << "examples/quick/tutorials/gettingStartedQml"; //C++ example, but no cpp files in root dir // These snippets are not expected to run on their own. excludedDirs << "snippets/qml/visualdatamodel_rootindex"; @@ -182,9 +181,8 @@ void tst_examples::namingConvention(const QDir &d) void tst_examples::namingConvention() { QStringList examplesLocations; - examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qtdeclarative"); - examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qtquick"); - examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qtqml"); + examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qml"); + examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/quick"); foreach(const QString &examples, examplesLocations) { QDir d(examples); diff --git a/tests/auto/quick/qquicktext/data/ellipsisText.qml b/tests/auto/quick/qquicktext/data/ellipsisText.qml new file mode 100644 index 0000000000..37faafcbf3 --- /dev/null +++ b/tests/auto/quick/qquicktext/data/ellipsisText.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 + +Text { + width: 0 + height: 10 + text: "Meaningless text" + elide: Text.ElideRight + + Text { + objectName: "elidedRef" + width: 10 + height: 10 + text: "Meaningless text" + elide: Text.ElideRight + } +} + diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index 8b7d8c0711..6c0da40b8e 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -149,6 +149,8 @@ private slots: void hintingPreference(); + void zeroWidthAndElidedDoesntRender(); + private: QStringList standard; QStringList richText; @@ -4175,6 +4177,26 @@ void tst_qquicktext::hintingPreference() } +void tst_qquicktext::zeroWidthAndElidedDoesntRender() +{ + // Tests QTBUG-34990 + + QQmlComponent component(&engine, testFile("ellipsisText.qml")); + + QScopedPointer<QObject> object(component.create()); + + QQuickText *text = qobject_cast<QQuickText *>(object.data()); + QVERIFY(text); + + QCOMPARE(text->contentWidth(), 0.0); + + QQuickText *reference = text->findChild<QQuickText *>("elidedRef"); + QVERIFY(reference); + + text->setWidth(10); + QCOMPARE(text->contentWidth(), reference->contentWidth()); +} + QTEST_MAIN(tst_qquicktext) #include "tst_qquicktext.moc" diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 24cfadc2d3..f505487a14 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -3463,16 +3463,15 @@ void tst_qquicktextinput::focusOnPress() QCOMPARE(textInputObject->hasFocus(), false); QCOMPARE(textInputObject->hasActiveFocus(), false); - QPoint centerPoint(window.width()/2, window.height()/2); Qt::KeyboardModifiers noModifiers = 0; - QTest::mousePress(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&window, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(textInputObject->hasFocus(), true); QCOMPARE(textInputObject->hasActiveFocus(), true); QCOMPARE(focusSpy.count(), 1); QCOMPARE(activeFocusSpy.count(), 1); QCOMPARE(textInputObject->selectedText(), QString()); - QTest::mouseRelease(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&window, Qt::LeftButton, noModifiers); textInputObject->setFocusOnPress(false); QCOMPARE(textInputObject->focusOnPress(), false); @@ -3486,13 +3485,13 @@ void tst_qquicktextinput::focusOnPress() // Wait for double click timeout to expire before clicking again. QTest::qWait(400); - QTest::mousePress(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&window, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(textInputObject->hasFocus(), false); QCOMPARE(textInputObject->hasActiveFocus(), false); QCOMPARE(focusSpy.count(), 2); QCOMPARE(activeFocusSpy.count(), 2); - QTest::mouseRelease(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&window, Qt::LeftButton, noModifiers); textInputObject->setFocusOnPress(true); QCOMPARE(textInputObject->focusOnPress(), true); @@ -3502,14 +3501,14 @@ void tst_qquicktextinput::focusOnPress() textInputObject->setProperty("selectOnFocus", true); QTest::qWait(400); - QTest::mousePress(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&window, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(textInputObject->hasFocus(), true); QCOMPARE(textInputObject->hasActiveFocus(), true); QCOMPARE(focusSpy.count(), 3); QCOMPARE(activeFocusSpy.count(), 3); QCOMPARE(textInputObject->selectedText(), textInputObject->text()); - QTest::mouseRelease(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&window, Qt::LeftButton, noModifiers); } void tst_qquicktextinput::openInputPanel() @@ -3533,23 +3532,22 @@ void tst_qquicktextinput::openInputPanel() QCOMPARE(qApp->inputMethod()->isVisible(), false); // input panel should open on focus - QPoint centerPoint(view.width()/2, view.height()/2); Qt::KeyboardModifiers noModifiers = 0; - QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&view, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QVERIFY(input->hasActiveFocus()); QCOMPARE(qApp->focusObject(), input); QCOMPARE(qApp->inputMethod()->isVisible(), true); - QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&view, Qt::LeftButton, noModifiers); // input panel should be re-opened when pressing already focused TextInput qApp->inputMethod()->hide(); QCOMPARE(qApp->inputMethod()->isVisible(), false); QVERIFY(input->hasActiveFocus()); - QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&view, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(qApp->inputMethod()->isVisible(), true); - QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&view, Qt::LeftButton, noModifiers); // input panel should stay visible if focus is lost to another text inputor QSignalSpy inputPanelVisibilitySpy(qApp->inputMethod(), SIGNAL(visibleChanged())); @@ -3572,8 +3570,8 @@ void tst_qquicktextinput::openInputPanel() input->setReadOnly(true); input->setFocus(true); QCOMPARE(qApp->inputMethod()->isVisible(), false); - QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); - QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&view, Qt::LeftButton, noModifiers); + QTest::mouseRelease(&view, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(qApp->inputMethod()->isVisible(), false); @@ -3582,8 +3580,8 @@ void tst_qquicktextinput::openInputPanel() input->setFocus(false); input->setFocus(true); QCOMPARE(qApp->inputMethod()->isVisible(), false); - QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); - QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&view, Qt::LeftButton, noModifiers); + QTest::mouseRelease(&view, Qt::LeftButton, noModifiers); QCOMPARE(qApp->inputMethod()->isVisible(), false); } diff --git a/tests/auto/shared/imports.pri b/tests/auto/shared/imports.pri index 20e9bcb371..9cbf286386 100644 --- a/tests/auto/shared/imports.pri +++ b/tests/auto/shared/imports.pri @@ -1,7 +1,4 @@ -copyimportfiles.input = IMPORT_FILES -copyimportfiles.output = $$DESTDIR/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} -copyimportfiles.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} -copyimportfiles.CONFIG += no_link_no_clean -copyimportfiles.variable_out = PRE_TARGETDEPS -QMAKE_EXTRA_COMPILERS += copyimportfiles +importfiles.files = $$IMPORT_FILES +importfiles.path = $$DESTDIR +COPIES += importfiles diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp index fa94fd4d46..ca5802a8e7 100644 --- a/tests/benchmarks/qml/creation/tst_creation.cpp +++ b/tests/benchmarks/qml/creation/tst_creation.cpp @@ -102,6 +102,12 @@ public: tst_creation::tst_creation() { qmlRegisterType<TestType>("Qt.test", 1, 0, "TestType"); + + // Ensure QtQuick is loaded and imported. Some benchmark like elements() rely on QQmlMetaType::qmlTypeNames() to + // be populated. + QQmlComponent component(&engine); + component.setData("import QtQuick 2.0\nItem{}", QUrl()); + QScopedPointer<QObject> obj(component.create()); } inline QUrl TEST_FILE(const QString &filename) diff --git a/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro b/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro index 3bedc0ea18..67f9d3b395 100644 --- a/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro +++ b/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro @@ -7,3 +7,5 @@ macx:CONFIG -= app_bundle CONFIG += release SOURCES += tst_librarymetrics_performance.cpp + +RESOURCES += data diff --git a/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp b/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp index f76372932b..5513dcb9a7 100644 --- a/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp +++ b/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp @@ -114,7 +114,7 @@ tst_librarymetrics_performance::~tst_librarymetrics_performance() static QUrl testFileUrl(const char * filename) { - return QUrl::fromLocalFile(QString(QLatin1String(filename))); + return QUrl(QLatin1String("qrc:///") + QLatin1String(filename)); } void tst_librarymetrics_performance::metrics_data() diff --git a/tests/benchmarks/qml/qml.pro b/tests/benchmarks/qml/qml.pro index 7969866673..d3ce69c713 100644 --- a/tests/benchmarks/qml/qml.pro +++ b/tests/benchmarks/qml/qml.pro @@ -8,6 +8,7 @@ SUBDIRS += \ qqmlcomponent \ qqmlimage \ qqmlmetaproperty \ + librarymetrics_performance \ # script \ ### FIXME: doesn't build js diff --git a/tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro b/tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro index 3e690d389f..81975ee01c 100644 --- a/tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro +++ b/tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro @@ -18,11 +18,9 @@ HEADERS += \ DISTFILES = qmldir !equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target + cpqmldir.files = qmldir + cpqmldir.path = $$OUT_PWD + COPIES += cpqmldir } qmldir.files = qmldir diff --git a/tests/manual/qmlplugindump/tests/dumper/Imports/imports.pro b/tests/manual/qmlplugindump/tests/dumper/Imports/imports.pro index fe9caea13a..1033c7a28f 100644 --- a/tests/manual/qmlplugindump/tests/dumper/Imports/imports.pro +++ b/tests/manual/qmlplugindump/tests/dumper/Imports/imports.pro @@ -18,11 +18,9 @@ HEADERS += \ DISTFILES = qmldir !equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target + cpqmldir.files = qmldir + cpqmldir.path = $$OUT_PWD + COPIES += cpqmldir } qmldir.files = qmldir diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro index 951f886368..d59470862d 100644 --- a/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro @@ -18,11 +18,9 @@ HEADERS += \ DISTFILES = qmldir !equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target + cpqmldir.files = qmldir + cpqmldir.path = $$OUT_PWD + COPIES += cpqmldir } qmldir.files = qmldir |