aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Schmertmann <Lars.Schmertmann@governikus.de>2020-06-26 14:43:02 +0200
committerLars Schmertmann <Lars.Schmertmann@governikus.de>2020-06-26 19:18:03 +0200
commite79281533d61dda90d1c5995345a66e6089c7501 (patch)
tree5033642cb0ae1d76aa0fc0525e153c04eefc921d /tests
parent6d8aca544ccb1e2624a679e2d65622461f643291 (diff)
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 <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp4
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.cpp34
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp2
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.cpp6
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp2
-rw-r--r--tests/auto/qml/qqmlqt/tst_qqmlqt.cpp4
-rw-r--r--tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp2
-rw-r--r--tests/auto/quick/qquickgridview/tst_qquickgridview.cpp2
-rw-r--r--tests/auto/quick/qquickimage/tst_qquickimage.cpp2
-rw-r--r--tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp2
-rw-r--r--tests/auto/quick/qquicktableview/testmodel.h4
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp2
-rw-r--r--tests/auto/quick/shared/viewtestutil.cpp4
-rw-r--r--tests/benchmarks/qml/holistic/testtypes.cpp10
14 files changed, 40 insertions, 40 deletions
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 QQmlRefPointer<QQmlContextD
{
QV4::Scope scope(v4);
QV4::ScopedContext temporaryScope(scope, QV4::QmlContext::create(scope.engine->rootContext(), 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;
}
diff --git a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
index 504d476dfa..32b502c6dc 100644
--- a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
+++ b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
@@ -623,7 +623,7 @@ void tst_qquickborderimage::multiFrame()
QFETCH(QString, qmlfile);
QFETCH(bool, asynchronous);
- Q_UNUSED(asynchronous)
+ Q_UNUSED(asynchronous);
QQuickView view(testFileUrl(qmlfile));
QQuickBorderImage *image = qobject_cast<QQuickBorderImage*>(view.rootObject());
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
index 44a01d7b3c..81b76cec25 100644
--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
@@ -301,7 +301,7 @@ private:
}
void releaseView(QQuickView *view) {
Q_ASSERT(view == m_view);
- Q_UNUSED(view)
+ Q_UNUSED(view);
m_view->setSource(QUrl());
}
#else
diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
index 4c9381d296..f5b0fd7d62 100644
--- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp
+++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
@@ -1222,7 +1222,7 @@ void tst_qquickimage::multiFrame()
QFETCH(QString, qmlfile);
QFETCH(bool, asynchronous);
- Q_UNUSED(asynchronous)
+ Q_UNUSED(asynchronous);
QQuickView view(testFileUrl(qmlfile));
QQuickImage *image = qobject_cast<QQuickImage*>(view.rootObject());
diff --git a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
index 8ebbd0d59b..37fa286103 100644
--- a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
+++ b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp
@@ -341,7 +341,7 @@ public:
: QQuickImageProvider(Pixmap) {}
virtual QPixmap requestPixmap(const QString &d, QSize *, const QSize &) {
- Q_UNUSED(d)
+ Q_UNUSED(d);
QPixmap pix(800, 600);
pix.fill(fillColor);
return pix;
diff --git a/tests/auto/quick/qquicktableview/testmodel.h b/tests/auto/quick/qquicktableview/testmodel.h
index 2697b1e801..3db32938be 100644
--- a/tests/auto/quick/qquicktableview/testmodel.h
+++ b/tests/auto/quick/qquicktableview/testmodel.h
@@ -150,7 +150,7 @@ public:
bool canFetchMore(const QModelIndex &parent) const override
{
- Q_UNUSED(parent)
+ Q_UNUSED(parent);
return m_dataCanBeFetched;
}
@@ -167,7 +167,7 @@ public:
void fetchMore(const QModelIndex &parent) override
{
- Q_UNUSED(parent)
+ Q_UNUSED(parent);
addRow(m_rows - 1);
}
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 39cb911647..ecb2b7a4a9 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -2774,7 +2774,7 @@ public:
bool childMouseEventFilter(QQuickItem *item, QEvent *event) override
{
- Q_UNUSED(item)
+ Q_UNUSED(item);
if (event->type() == QEvent::MouseButtonPress && !contains(static_cast<QMouseEvent*>(event)->position().toPoint())) {
// This is an evil hack: in case of items that are not rectangles, we never accept the event.
// Instead the events are now delivered to QDeclarativeGeoMapItemBase which doesn't to anything with them.
diff --git a/tests/auto/quick/shared/viewtestutil.cpp b/tests/auto/quick/shared/viewtestutil.cpp
index 67b73f047c..b17ebebde0 100644
--- a/tests/auto/quick/shared/viewtestutil.cpp
+++ b/tests/auto/quick/shared/viewtestutil.cpp
@@ -66,7 +66,7 @@ void QQuickViewTestUtil::moveMouseAway(QQuickView *window)
#if QT_CONFIG(cursor) // Get the cursor out of the way.
QCursor::setPos(window->geometry().topRight() + QPoint(100, 100));
#else
- Q_UNUSED(window)
+ Q_UNUSED(window);
#endif
}
@@ -489,7 +489,7 @@ namespace QQuickTest {
if (moveMouseOut)
QCursor::setPos(v.geometry().topRight() + QPoint(100, 100));
#else
- Q_UNUSED(moveMouseOut)
+ Q_UNUSED(moveMouseOut);
#endif
return true;
}
diff --git a/tests/benchmarks/qml/holistic/testtypes.cpp b/tests/benchmarks/qml/holistic/testtypes.cpp
index 90576c65b8..e190a29eef 100644
--- a/tests/benchmarks/qml/holistic/testtypes.cpp
+++ b/tests/benchmarks/qml/holistic/testtypes.cpp
@@ -30,8 +30,8 @@
static QJSValue script_api(QQmlEngine *engine, QJSEngine *scriptEngine)
{
- Q_UNUSED(engine)
- Q_UNUSED(scriptEngine)
+ Q_UNUSED(engine);
+ Q_UNUSED(scriptEngine);
static int testProperty = 13;
QJSValue v = scriptEngine->newObject();
@@ -41,8 +41,8 @@ static QJSValue script_api(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);
@@ -51,7 +51,7 @@ static QObject *qobject_api(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);