aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlplugindump
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 /tools/qmlplugindump
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 'tools/qmlplugindump')
-rw-r--r--tools/qmlplugindump/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 422e37fd89..5c5a6a8eb1 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -300,7 +300,7 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
continue;
inObjectInstantiation = tyName;
- QObject *object = 0;
+ QObject *object = nullptr;
if (ty.isSingleton()) {
QQmlType::SingletonInstanceInfo *siinfo = ty.singletonInstanceInfo();
@@ -403,7 +403,7 @@ public:
return exportString;
}
- void writeMetaContent(const QMetaObject *meta, KnownAttributes *knownAttributes = 0)
+ void writeMetaContent(const QMetaObject *meta, KnownAttributes *knownAttributes = nullptr)
{
QSet<QString> implicitSignals;
for (int index = meta->propertyOffset(); index < meta->propertyCount(); ++index) {
@@ -642,7 +642,7 @@ private:
qml->writeScriptBinding(QLatin1String("isPointer"), QLatin1String("true"));
}
- void dump(const QMetaProperty &prop, KnownAttributes *knownAttributes = 0)
+ void dump(const QMetaProperty &prop, KnownAttributes *knownAttributes = nullptr)
{
int revision = prop.revision();
QByteArray propName = prop.name();
@@ -658,7 +658,7 @@ private:
}
void dump(const QMetaMethod &meth, const QSet<QString> &implicitSignals,
- KnownAttributes *knownAttributes = 0)
+ KnownAttributes *knownAttributes = nullptr)
{
if (meth.methodType() == QMetaMethod::Signal) {
if (meth.access() != QMetaMethod::Public)
@@ -973,7 +973,7 @@ int main(int argc, char *argv[])
sigAction.sa_handler = &sigSegvHandler;
sigAction.sa_flags = 0;
- sigaction(SIGSEGV, &sigAction, 0);
+ sigaction(SIGSEGV, &sigAction, nullptr);
#endif
#ifdef QT_SIMULATOR