From ece0c0a5e7e0b18beb58ccd868bde54c7be64f78 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 22 Nov 2019 14:46:58 +0100 Subject: Tidy nullptr usage Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/corelib/plugin/qpluginloader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/plugin/qpluginloader.cpp') diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index c2443dbdda..aed1704d5f 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -136,7 +136,7 @@ QT_BEGIN_NAMESPACE Constructs a plugin loader with the given \a parent. */ QPluginLoader::QPluginLoader(QObject *parent) - : QObject(parent), d(0), did_load(false) + : QObject(parent), d(nullptr), did_load(false) { } @@ -152,7 +152,7 @@ QPluginLoader::QPluginLoader(QObject *parent) \sa setFileName() */ QPluginLoader::QPluginLoader(const QString &fileName, QObject *parent) - : QObject(parent), d(0), did_load(false) + : QObject(parent), d(nullptr), did_load(false) { setFileName(fileName); setLoadHints(QLibrary::PreventUnloadHint); @@ -195,7 +195,7 @@ QPluginLoader::~QPluginLoader() QObject *QPluginLoader::instance() { if (!isLoaded() && !load()) - return 0; + return nullptr; if (!d->inst && d->instance) d->inst = d->instance(); return d->inst.data(); @@ -363,7 +363,7 @@ void QPluginLoader::setFileName(const QString &fileName) if (d) { lh = d->loadHints(); d->release(); - d = 0; + d = nullptr; did_load = false; } -- cgit v1.2.3