From e79281533d61dda90d1c5995345a66e6089c7501 Mon Sep 17 00:00:00 2001 From: Lars Schmertmann Date: Fri, 26 Jun 2020 14:43:02 +0200 Subject: Add ; to Q_UNUSED and UNUSED_PARAM This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: Iead53d18fd790fb2d870d80ef2db79666f0d2392 Reviewed-by: Shawn Rutledge Reviewed-by: Ulf Hermann --- .../qml/qqmlconnections/tst_qqmlconnections.cpp | 4 +-- tests/auto/qml/qqmlecmascript/testtypes.cpp | 34 +++++++++++----------- .../auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 2 +- tests/auto/qml/qqmllanguage/testtypes.cpp | 6 ++-- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 2 +- tests/auto/qml/qqmlqt/tst_qqmlqt.cpp | 4 +-- 6 files changed, 26 insertions(+), 26 deletions(-) (limited to 'tests/auto/qml') diff --git a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp index f144002875..71d5ff48c5 100644 --- a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp +++ b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp @@ -335,8 +335,8 @@ private: static QObject *module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); MyTestSingletonType *api = new MyTestSingletonType(); return api; } diff --git a/tests/auto/qml/qqmlecmascript/testtypes.cpp b/tests/auto/qml/qqmlecmascript/testtypes.cpp index 606860379e..2059650584 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.cpp +++ b/tests/auto/qml/qqmlecmascript/testtypes.cpp @@ -136,7 +136,7 @@ void MyQmlObject::v8function(QQmlV4Function *function) static QJSValue script_api(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) + Q_UNUSED(engine); static int testProperty = 13; QJSValue v = scriptEngine->newObject(); @@ -146,7 +146,7 @@ static QJSValue script_api(QQmlEngine *engine, QJSEngine *scriptEngine) static QJSValue readonly_script_api(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) + Q_UNUSED(engine); static int testProperty = 42; QJSValue v = scriptEngine->newObject(); @@ -161,8 +161,8 @@ static QJSValue readonly_script_api(QQmlEngine *engine, QJSEngine *scriptEngine) static QObject *testImportOrder_api(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); testImportOrderApi *o = new testImportOrderApi(37); return o; @@ -170,8 +170,8 @@ static QObject *testImportOrder_api(QQmlEngine *engine, QJSEngine *scriptEngine) static QObject *testImportOrder_api1(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); testImportOrderApi *o = new testImportOrderApi(1); return o; @@ -179,8 +179,8 @@ static QObject *testImportOrder_api1(QQmlEngine *engine, QJSEngine *scriptEngine static QObject *testImportOrder_api2(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); testImportOrderApi *o = new testImportOrderApi(2); return o; @@ -188,8 +188,8 @@ static QObject *testImportOrder_api2(QQmlEngine *engine, QJSEngine *scriptEngine static QObject *qobject_api(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); testQObjectApi *o = new testQObjectApi(); o->setQObjectTestProperty(20); @@ -200,8 +200,8 @@ static QObject *qobject_api(QQmlEngine *engine, QJSEngine *scriptEngine) static QObject *qobject_api_two(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); testQObjectApiTwo *o = new testQObjectApiTwo; return o; @@ -209,7 +209,7 @@ static QObject *qobject_api_two(QQmlEngine *engine, QJSEngine *scriptEngine) static QObject *qobject_api_engine_parent(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(scriptEngine) + Q_UNUSED(scriptEngine); static int testProperty = 26; testQObjectApi *o = new testQObjectApi(engine); @@ -219,16 +219,16 @@ static QObject *qobject_api_engine_parent(QQmlEngine *engine, QJSEngine *scriptE static QObject *fallback_bindings_object(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); return new FallbackBindingsObject(); } static QObject *fallback_bindings_derived(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); return new FallbackBindingsDerived(); } diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 2bfd6700d9..98dc106ebe 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -4296,7 +4296,7 @@ void tst_qqmlecmascript::verifyContextLifetime(const QQmlRefPointerrootContext(), scriptContext, nullptr)); - Q_UNUSED(temporaryScope) + Q_UNUSED(temporaryScope); } ctxt->engine()->collectGarbage(); diff --git a/tests/auto/qml/qqmllanguage/testtypes.cpp b/tests/auto/qml/qqmllanguage/testtypes.cpp index 2c0e5f1d8c..c3272d0031 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.cpp +++ b/tests/auto/qml/qqmllanguage/testtypes.cpp @@ -31,15 +31,15 @@ static QObject *myTypeObjectSingleton(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); return new MyTypeObject(); } static QJSValue myQJSValueQObjectSingleton(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) + Q_UNUSED(engine); QJSValue value = scriptEngine->newQObject(new MyTypeObject()); return value; diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 177f7554f7..9b750d5399 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -63,7 +63,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES) static inline bool isCaseSensitiveFileSystem(const QString &path) { - Q_UNUSED(path) + Q_UNUSED(path); #if defined(Q_OS_MAC) return pathconf(path.toLatin1().constData(), _PC_CASE_SENSITIVE); #elif defined(Q_OS_WIN) diff --git a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp index 6d08054250..d19b297aa7 100644 --- a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp +++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp @@ -151,8 +151,8 @@ private: static QObject *test_module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine) { - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); TestModuleApi *api = new TestModuleApi; return api; } -- cgit v1.2.3