aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickdesignersupport
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-02-21 10:41:54 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-02-26 07:13:18 +0000
commit499ec43937e926e4f2fa57a9baa455fcb3862262 (patch)
tree206c90d47387f8322b68f5e3db613189397e1af3 /tests/auto/quick/qquickdesignersupport
parent53d1e9ed21d25e65a2f13606af479838f5f21fe7 (diff)
use nullptr consistently (clang-tidy)
From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickdesignersupport')
-rw-r--r--tests/auto/quick/qquickdesignersupport/tst_qquickdesignersupport.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/quick/qquickdesignersupport/tst_qquickdesignersupport.cpp b/tests/auto/quick/qquickdesignersupport/tst_qquickdesignersupport.cpp
index 9463f7b4d5..96a11e16e9 100644
--- a/tests/auto/quick/qquickdesignersupport/tst_qquickdesignersupport.cpp
+++ b/tests/auto/quick/qquickdesignersupport/tst_qquickdesignersupport.cpp
@@ -102,7 +102,7 @@ void tst_qquickdesignersupport::customData()
QVERIFY(QQuickDesignerSupportProperties::hasBindingForProperty(newItem,
view->engine()->contextForObject(newItem),
"width",
- 0));
+ nullptr));
//Check if reseting property does work after setting binding
QQuickDesignerSupportProperties::doResetProperty(newItem, view->rootContext(), "width");
@@ -136,7 +136,7 @@ void tst_qquickdesignersupport::customDataBindings()
QVERIFY(QQuickDesignerSupportProperties::hasBindingForProperty(testComponent,
view->engine()->contextForObject(testComponent),
"x",
- 0));
+ nullptr));
QCOMPARE(testComponent->property("x").toInt(), 200);
@@ -149,7 +149,7 @@ void tst_qquickdesignersupport::customDataBindings()
QVERIFY(!QQuickDesignerSupportProperties::hasBindingForProperty(testComponent,
view->engine()->contextForObject(testComponent),
"x",
- 0));
+ nullptr));
//Reset the binding to the default
QQuickDesignerSupportProperties::doResetProperty(testComponent,
@@ -159,7 +159,7 @@ void tst_qquickdesignersupport::customDataBindings()
QVERIFY(QQuickDesignerSupportProperties::hasBindingForProperty(testComponent,
view->engine()->contextForObject(testComponent),
"x",
- 0));
+ nullptr));
QCOMPARE(testComponent->property("x").toInt(), 200);
@@ -173,7 +173,7 @@ void tst_qquickdesignersupport::customDataBindings()
QVERIFY(QQuickDesignerSupportProperties::hasBindingForProperty(testComponent,
view->engine()->contextForObject(testComponent),
"x",
- 0));
+ nullptr));
QCOMPARE(testComponent->property("x").toInt(), 300);
@@ -188,7 +188,7 @@ void tst_qquickdesignersupport::customDataBindings()
QVERIFY(QQuickDesignerSupportProperties::hasBindingForProperty(testComponent,
view->engine()->contextForObject(testComponent),
"x",
- 0));
+ nullptr));
QCOMPARE(testComponent->property("x").toInt(), 200);
}
@@ -417,7 +417,7 @@ void tst_qquickdesignersupport::statesPropertyChanges()
}
-static QObject * s_object = 0;
+static QObject * s_object = nullptr;
static QQuickDesignerSupport::PropertyName s_propertyName;
static void notifyPropertyChangeCallBackFunction(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName)
@@ -476,7 +476,7 @@ void tst_qquickdesignersupport::testFixResourcePathsForObjectCallBack()
QVERIFY(rootItem);
- s_object = 0;
+ s_object = nullptr;
QQuickDesignerSupportItems::registerFixResourcePathsForObjectCallBack(fixResourcePathsForObjectCallBackPointer);