From aa0e51beaba1a338db42391c575212b4aac815b1 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Fri, 24 Feb 2017 09:50:25 +0100 Subject: Add feature.qml-profiler with extended build dependencies Change-Id: If165cea6f176e7a7066f50b73261baf97634a0bb Reviewed-by: Ulf Hermann --- src/qml/configure.json | 13 +++++++++++++ tools/tools.pro | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/qml/configure.json b/src/qml/configure.json index d22ba3b8f0..2c4887365f 100644 --- a/src/qml/configure.json +++ b/src/qml/configure.json @@ -22,6 +22,19 @@ "label": "QML network support", "purpose": "Provides network transparency for QML", "output": [ "publicFeature" ] + }, + "qml-profiler": { + "label": "Command line QML Profiler", + "purpose": "The QML Profiler retrieves QML tracing data from an application.", + "condition": [ + "features.commandlineparser", + "features.localserver", + "features.process", + "features.qml-debug", + "features.qml-network", + "features.xmlstreamwriter" + ], + "output": [ "privateFeature" ] } }, diff --git a/tools/tools.pro b/tools/tools.pro index d16888e539..a7fe0d983d 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -9,7 +9,7 @@ SUBDIRS += \ qml \ qmllint - qtConfig(qml-network):!contains(QT_CONFIG, no-qml-debug): SUBDIRS += qmlprofiler + qtConfig(qml-profiler): SUBDIRS += qmlprofiler qtHaveModule(quick) { !static: { -- cgit v1.2.3 From 4f3cadfe6c966ab8b7c50bc69343589589f7291c Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Sat, 25 Feb 2017 13:49:36 +0100 Subject: Fix build for -no-feature-quick-shadereffect Change-Id: I334603209818a8030ddb5b5b316cab596c328bf1 Reviewed-by: Lars Knoll --- src/particles/particles.pri | 10 ++++++++-- src/particles/qquickparticlesmodule.cpp | 6 ++++++ src/quick/items/context2d/qquickcanvasitem.cpp | 1 + src/quick/items/context2d/qquickcontext2d.cpp | 2 ++ src/quick/items/qquickpainteditem_p.h | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/particles/particles.pri b/src/particles/particles.pri index af71634ec6..576d826903 100644 --- a/src/particles/particles.pri +++ b/src/particles/particles.pri @@ -1,6 +1,5 @@ HEADERS += \ $$PWD/qquickangledirection_p.h \ - $$PWD/qquickcustomparticle_p.h \ $$PWD/qquickcustomaffector_p.h \ $$PWD/qquickellipseextruder_p.h \ $$PWD/qquicktrailemitter_p.h \ @@ -33,7 +32,6 @@ HEADERS += \ SOURCES += \ $$PWD/qquickangledirection.cpp \ - $$PWD/qquickcustomparticle.cpp \ $$PWD/qquickcustomaffector.cpp \ $$PWD/qquickellipseextruder.cpp \ $$PWD/qquicktrailemitter.cpp \ @@ -63,6 +61,14 @@ SOURCES += \ $$PWD/qquickparticlegroup.cpp \ $$PWD/qquickgroupgoal.cpp +qtConfig(quick-shadereffect) { +HEADERS += \ + $$PWD/qquickcustomparticle_p.h + +SOURCES += \ + $$PWD/qquickcustomparticle.cpp +} + OTHER_FILES += \ $$PWD/shaders/customparticletemplate.vert \ $$PWD/shaders/customparticle.vert \ diff --git a/src/particles/qquickparticlesmodule.cpp b/src/particles/qquickparticlesmodule.cpp index accdb668de..03f47a3961 100644 --- a/src/particles/qquickparticlesmodule.cpp +++ b/src/particles/qquickparticlesmodule.cpp @@ -37,8 +37,12 @@ ** ****************************************************************************/ +#include + #include "qquickangledirection_p.h" +#if QT_CONFIG(quick_shadereffect) #include "qquickcustomparticle_p.h" +#endif #include "qquickellipseextruder_p.h" #include "qquicktrailemitter_p.h" #include "qquickfriction_p.h" @@ -84,7 +88,9 @@ void QQuickParticlesModule::defineModule() qmlRegisterType(uri, 2, 0, "ParticleGroup"); qmlRegisterType(uri, 2, 0, "ImageParticle"); +#if QT_CONFIG(quick_shadereffect) qmlRegisterType(uri, 2, 0, "CustomParticle"); +#endif qmlRegisterType(uri, 2, 0, "ItemParticle"); qmlRegisterType(uri, 2, 0, "Emitter"); diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 28e9173bf7..9dd72a40e3 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index bcaedd67b4..05bb3681d7 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -42,7 +42,9 @@ #include "qquickcanvasitem_p.h" #include #include +#if QT_CONFIG(quick_shadereffect) #include +#endif #include #include diff --git a/src/quick/items/qquickpainteditem_p.h b/src/quick/items/qquickpainteditem_p.h index 742e786335..3d2ec631fa 100644 --- a/src/quick/items/qquickpainteditem_p.h +++ b/src/quick/items/qquickpainteditem_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include "qquickpainteditem.h" #include "qquickitem_p.h" #include -- cgit v1.2.3 From 5cd4c2ced4b153f365ececf3a7c0a4536fed9fac Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Fri, 24 Feb 2017 16:43:51 +0100 Subject: Fix build for -no-feature-quick-path Change-Id: Id57c9bc4421fc252ab02e2a0cfe00d08aef0176d Reviewed-by: Simon Hausmann Reviewed-by: Oswald Buddenhagen Reviewed-by: Ulf Hermann Reviewed-by: Laszlo Agocs --- src/quick/configure.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quick/configure.json b/src/quick/configure.json index 4ed11e8318..e06cae8641 100644 --- a/src/quick/configure.json +++ b/src/quick/configure.json @@ -51,6 +51,7 @@ "quick-canvas": { "label": "Canvas item", "purpose": "Provides the Qt Quick Canvas Item", + "condition": "features.quick-path", "output": [ "privateFeature" ] -- cgit v1.2.3 From 408620ea99606f8b27ebf237fa3800e40e2c9cd3 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 2 Mar 2017 11:41:47 +0100 Subject: Fix building with -no-feature-process Drop an unused include, don't try to build qmlplugindump in this case, and add some guards around QProcess includes and usages. Change-Id: I6ce5985a8dd1967f146016a7acd1ea31fb3bda2a Reviewed-by: Simon Hausmann --- tests/auto/qml/qmlmin/tst_qmlmin.cpp | 8 +++++--- .../auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp | 2 ++ tests/auto/quick/examples/tst_examples.cpp | 1 - tools/tools.pro | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/auto/qml/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp index 3ed0aa7446..90868d2ead 100644 --- a/tests/auto/qml/qmlmin/tst_qmlmin.cpp +++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp @@ -29,7 +29,9 @@ #include #include #include +#if QT_CONFIG(process) #include +#endif #include #include #include @@ -42,7 +44,7 @@ public: private slots: void initTestCase(); -#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled +#if QT_CONFIG(process) && !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void qmlMinify_data(); void qmlMinify(); #endif @@ -166,7 +168,7 @@ Examples are any .qml files under the examples/ directory that start with a lower case letter. */ -#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled +#if QT_CONFIG(process) && !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void tst_qmlmin::qmlMinify_data() { QTest::addColumn("file"); @@ -183,7 +185,7 @@ void tst_qmlmin::qmlMinify_data() } #endif -#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled +#if QT_CONFIG(process) && !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void tst_qmlmin::qmlMinify() { QFETCH(QString, file); diff --git a/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp b/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp index 98b92e5fab..f2754d636b 100644 --- a/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp +++ b/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp @@ -29,7 +29,9 @@ #include "../../shared/util.h" #include #include +#if QT_CONFIG(process) #include +#endif #include class tst_qqmlapplicationengine : public QQmlDataTest diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 1ca809c05f..ffb7fb5789 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/tools/tools.pro b/tools/tools.pro index a7fe0d983d..85556301a4 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -17,7 +17,7 @@ SUBDIRS += \ qmlscene \ qmltime - qtConfig(regularexpression) { + qtConfig(regularexpression):qtConfig(process) { SUBDIRS += \ qmlplugindump } -- cgit v1.2.3 From 13335bdee5482ae04d5b0d4c933ca328a1100cb6 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 6 Mar 2017 13:49:42 +0100 Subject: Fix build with -no-feature-library The versionUriList() function is unused in this case, and we cannot build the extension plugins test. Change-Id: I6c2ea1c2d078e508b0752efb45f4ccdfdbcbf22e Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlimport.cpp | 2 +- tests/auto/qml/qml.pro | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index f2cbf5a94f..85b7ea633d 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -876,6 +876,7 @@ QQmlImportNamespace *QQmlImportsPrivate::findQualifiedNamespace(const QHashedStr return 0; } +#if QT_CONFIG(library) /*! Returns the list of possible versioned URI combinations. For example, if \a uri is QtQml.Models, \a vmaj is 2, and \a vmin is 0, this method returns the following: @@ -897,7 +898,6 @@ static QStringList versionUriList(const QString &uri, int vmaj, int vmin) return result; } -#if QT_CONFIG(library) /*! Get all static plugins that are QML plugins and has a meta data URI that matches with one of \a versionUris, which is a list of all possible versioned URI combinations - see versionUriList() diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro index 7d182b7255..b347b603bb 100644 --- a/tests/auto/qml/qml.pro +++ b/tests/auto/qml/qml.pro @@ -70,14 +70,17 @@ qtHaveModule(widgets) { qjsvalue } -SUBDIRS += $$PUBLICTESTS \ - qqmlextensionplugin +SUBDIRS += $$PUBLICTESTS SUBDIRS += $$METATYPETESTS qtConfig(process) { !contains(QT_CONFIG, no-qml-debug): SUBDIRS += debugger SUBDIRS += qmllint qmlplugindump } +qtConfig(library) { + SUBDIRS += qqmlextensionplugin +} + qtConfig(private_tests): \ SUBDIRS += $$PRIVATETESTS -- cgit v1.2.3 From fb0490dd653e4856a3595bd7e49c3127215170d1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 14 Feb 2017 15:17:16 -0800 Subject: QThreadData::threadId is now QAtomicPointer, so relax loads from Acquire operator T() does loadAcquire, to match std::atomic behavior. We don't need that, so let's use a relaxed load. Side note: why does QtQml need to access the thread ID this way? Couldn't it do object->thread()? This code comes from a pre-5.0 commit 5570040771ec610583473e2d9e8e069474364cf1 ("Permit signals to be emitted in a different thread"). Change-Id: I4139d5f93dcb4b429ae9fffd14a34a84d3255a6f Reviewed-by: Simon Hausmann Reviewed-by: Marc Mutz --- src/qml/qml/qqmlengine.cpp | 2 +- src/qml/qml/qqmlnotifier.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index c800641f1c..f1c592b632 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -774,7 +774,7 @@ void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int in // marshalled back onto the QObject's thread and handled by QML from there. This is tested // by the qqmlecmascript::threadSignal() autotest. if (ddata->notifyList && - QThread::currentThreadId() != QObjectPrivate::get(object)->threadData->threadId) { + QThread::currentThreadId() != QObjectPrivate::get(object)->threadData->threadId.load()) { if (!QObjectPrivate::get(object)->threadData->thread) return; diff --git a/src/qml/qml/qqmlnotifier.cpp b/src/qml/qml/qqmlnotifier.cpp index 185f9687fb..538ca822ee 100644 --- a/src/qml/qml/qqmlnotifier.cpp +++ b/src/qml/qml/qqmlnotifier.cpp @@ -122,8 +122,8 @@ void QQmlNotifierEndpoint::connect(QObject *source, int sourceSignal, QQmlEngine disconnect(); Q_ASSERT(engine); - if (QObjectPrivate::get(source)->threadData->threadId != - QObjectPrivate::get(engine)->threadData->threadId) { + if (QObjectPrivate::get(source)->threadData->threadId.load() != + QObjectPrivate::get(engine)->threadData->threadId.load()) { QString sourceName; QDebug(&sourceName) << source; -- cgit v1.2.3