diff options
author | Kevin Funk <kfunk@kde.org> | 2017-09-24 23:54:47 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2017-09-29 19:14:10 +0000 |
commit | def6c3c3e263d06a39b2370a122f080f24df26f9 (patch) | |
tree | 5799f6600b6f5751b4d97cb74b948f2cb7b10958 /src | |
parent | 7c9db49830de90879ecf7a217386cc860c9eb206 (diff) |
Replace Q_NULLPTR with nullptr
Change-Id: I0df68cec43511537b61ddfe74bd677be7a598eae
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/activeqt/container/qaxbase.cpp | 6 | ||||
-rw-r--r-- | src/activeqt/container/qaxbase.h | 6 | ||||
-rw-r--r-- | src/activeqt/container/qaxobject.h | 10 | ||||
-rw-r--r-- | src/activeqt/container/qaxscript.h | 4 | ||||
-rw-r--r-- | src/activeqt/container/qaxselect.h | 2 | ||||
-rw-r--r-- | src/activeqt/container/qaxwidget.cpp | 2 | ||||
-rw-r--r-- | src/activeqt/container/qaxwidget.h | 10 | ||||
-rw-r--r-- | src/activeqt/control/qaxfactory.h | 20 | ||||
-rw-r--r-- | src/activeqt/control/qaxserverbase.cpp | 2 | ||||
-rw-r--r-- | src/activeqt/shared/qaxtypes.cpp | 10 |
10 files changed, 36 insertions, 36 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index cd564d3..eb0f7c1 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -1434,13 +1434,13 @@ bool QAxBase::initializeRemote(IUnknown** ptr) COAUTHIDENTITY authIdentity; authIdentity.UserLength = ULONG(user.length()); authIdentity.User = authIdentity.UserLength - ? const_cast<ushort *>(user.utf16()) : Q_NULLPTR; + ? const_cast<ushort *>(user.utf16()) : nullptr; authIdentity.DomainLength = ULONG(domain.length()); authIdentity.Domain = authIdentity.DomainLength - ? const_cast<ushort *>(domain.utf16()) : Q_NULLPTR; + ? const_cast<ushort *>(domain.utf16()) : nullptr; authIdentity.PasswordLength = ULONG(passwd.length()); authIdentity.Password = authIdentity.PasswordLength - ? const_cast<ushort *>(passwd.utf16()) : Q_NULLPTR; + ? const_cast<ushort *>(passwd.utf16()) : nullptr; authIdentity.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE; COAUTHINFO authInfo; diff --git a/src/activeqt/container/qaxbase.h b/src/activeqt/container/qaxbase.h index fa8e3ee..6c7e1ee 100644 --- a/src/activeqt/container/qaxbase.h +++ b/src/activeqt/container/qaxbase.h @@ -64,7 +64,7 @@ class QAxBase public: typedef QMap<QString, QVariant> PropertyBag; - explicit QAxBase(IUnknown *iface = Q_NULLPTR); + explicit QAxBase(IUnknown *iface = nullptr); virtual ~QAxBase(); QString control() const; @@ -173,13 +173,13 @@ private: template <> inline QAxBase *qobject_cast<QAxBase*>(const QObject *o) { - void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxBase") : Q_NULLPTR; + void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxBase") : nullptr; return static_cast<QAxBase *>(result); } template <> inline QAxBase *qobject_cast<QAxBase*>(QObject *o) { - void *result = o ? o->qt_metacast("QAxBase") : Q_NULLPTR; + void *result = o ? o->qt_metacast("QAxBase") : nullptr; return static_cast<QAxBase *>(result); } diff --git a/src/activeqt/container/qaxobject.h b/src/activeqt/container/qaxobject.h index 0eeda2d..5658d8e 100644 --- a/src/activeqt/container/qaxobject.h +++ b/src/activeqt/container/qaxobject.h @@ -53,9 +53,9 @@ public: QObject* qObject() const override { return static_cast<QObject *>(const_cast<QAxObject *>(this)); } const char *className() const override; - explicit QAxObject(QObject *parent = Q_NULLPTR); - explicit QAxObject(const QString &c, QObject *parent = Q_NULLPTR); - explicit QAxObject(IUnknown *iface, QObject *parent = Q_NULLPTR); + explicit QAxObject(QObject *parent = nullptr); + explicit QAxObject(const QString &c, QObject *parent = nullptr); + explicit QAxObject(IUnknown *iface, QObject *parent = nullptr); ~QAxObject(); bool doVerb(const QString &verb); @@ -70,13 +70,13 @@ private: template <> inline QAxObject *qobject_cast<QAxObject*>(const QObject *o) { - void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxObject") : Q_NULLPTR; + void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxObject") : nullptr; return reinterpret_cast<QAxObject*>(result); } template <> inline QAxObject *qobject_cast<QAxObject*>(QObject *o) { - void *result = o ? o->qt_metacast("QAxObject") : Q_NULLPTR; + void *result = o ? o->qt_metacast("QAxObject") : nullptr; return reinterpret_cast<QAxObject*>(result); } diff --git a/src/activeqt/container/qaxscript.h b/src/activeqt/container/qaxscript.h index d0aafaa..fee3a2b 100644 --- a/src/activeqt/container/qaxscript.h +++ b/src/activeqt/container/qaxscript.h @@ -149,7 +149,7 @@ class QAxScriptManager : public QObject Q_OBJECT public: - explicit QAxScriptManager(QObject *parent = Q_NULLPTR); + explicit QAxScriptManager(QObject *parent = nullptr); ~QAxScriptManager(); void addObject(QAxBase *object); @@ -212,7 +212,7 @@ inline QAxScriptEngine *QAxScript::scriptEngine() const inline bool QAxScriptEngine::isValid() const { - return engine != Q_NULLPTR; + return engine != nullptr; } inline QString QAxScriptEngine::scriptLanguage() const diff --git a/src/activeqt/container/qaxselect.h b/src/activeqt/container/qaxselect.h index 160b436..49e78b7 100644 --- a/src/activeqt/container/qaxselect.h +++ b/src/activeqt/container/qaxselect.h @@ -51,7 +51,7 @@ class QAxSelect : public QDialog { Q_OBJECT public: - explicit QAxSelect(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags()); + explicit QAxSelect(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); ~QAxSelect(); QString clsid() const; diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index 8fb659d..85b743d 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -742,7 +742,7 @@ void QAxClientSite::releaseAll() { if (m_spOleControl) m_spOleControl->Release(); - m_spOleControl = Q_NULLPTR; + m_spOleControl = nullptr; if (m_spOleObject) { m_spOleObject->SetClientSite(0); m_spOleObject->Unadvise(m_dwOleObject); diff --git a/src/activeqt/container/qaxwidget.h b/src/activeqt/container/qaxwidget.h index 6c8d4b9..f9c228f 100644 --- a/src/activeqt/container/qaxwidget.h +++ b/src/activeqt/container/qaxwidget.h @@ -59,9 +59,9 @@ public: QObject* qObject() const override { return const_cast<QAxWidget *>(this); } const char *className() const override; - explicit QAxWidget(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); - explicit QAxWidget(const QString &c, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); - explicit QAxWidget(IUnknown *iface, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); + explicit QAxWidget(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); + explicit QAxWidget(const QString &c, QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); + explicit QAxWidget(IUnknown *iface, QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); ~QAxWidget(); void clear() override; @@ -94,13 +94,13 @@ private: template <> inline QAxWidget *qobject_cast<QAxWidget*>(const QObject *o) { - void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxWidget") : Q_NULLPTR; + void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxWidget") : nullptr; return static_cast<QAxWidget *>(result); } template <> inline QAxWidget *qobject_cast<QAxWidget*>(QObject *o) { - void *result = o ? o->qt_metacast("QAxWidget") : Q_NULLPTR; + void *result = o ? o->qt_metacast("QAxWidget") : nullptr; return static_cast<QAxWidget *>(result); } diff --git a/src/activeqt/control/qaxfactory.h b/src/activeqt/control/qaxfactory.h index 5c1df48..2f113de 100644 --- a/src/activeqt/control/qaxfactory.h +++ b/src/activeqt/control/qaxfactory.h @@ -149,13 +149,13 @@ inline bool QAxFactory::stopServer() { \ if (key == className) \ return &Class::staticMetaObject; \ - return Q_NULLPTR; \ + return nullptr; \ } \ QObject *createObject(const QString &key) override \ { \ if (key == className) \ - return new Class(Q_NULLPTR); \ - return Q_NULLPTR; \ + return new Class(nullptr); \ + return nullptr; \ } \ QUuid classID(const QString &key) const override \ { \ @@ -195,10 +195,10 @@ public: { const QMetaObject &mo = T::staticMetaObject; if (key != QLatin1String(mo.className())) - return Q_NULLPTR; + return nullptr; if (!qstrcmp(mo.classInfo(mo.indexOfClassInfo("Creatable")).value(), "no")) - return Q_NULLPTR; - return new T(Q_NULLPTR); + return nullptr; + return new T(nullptr); } void registerClass(const QString &key, QSettings *settings) const override @@ -243,7 +243,7 @@ private: QAxFactoryList() \ : QAxFactory(IDTypeLib, IDApp) \ { \ - QAxFactory *factory = Q_NULLPTR; \ + QAxFactory *factory = nullptr; \ QStringList keys; \ QStringList::Iterator it; \ @@ -273,13 +273,13 @@ private: QStringList featureList() const override { return factoryKeys; } \ const QMetaObject *metaObject(const QString&key) const override { \ QAxFactory *f = factories[key]; \ - return f ? f->metaObject(key) : Q_NULLPTR; \ + return f ? f->metaObject(key) : nullptr; \ } \ QObject *createObject(const QString &key) override { \ if (!creatable.value(key)) \ - return Q_NULLPTR; \ + return nullptr; \ QAxFactory *f = factories[key]; \ - return f ? f->createObject(key) : Q_NULLPTR; \ + return f ? f->createObject(key) : nullptr; \ } \ QUuid classID(const QString &key) const override { \ QAxFactory *f = factories.value(key); \ diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index 0cde5e2..ec51eb9 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -2487,7 +2487,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, vt = QVariant::Int; varp[0] = QVariant(vt); if (varp[0].type() == QVariant::Invalid) - argv[0] = Q_NULLPTR; + argv[0] = nullptr; else argv[0] = const_cast<void*>(varp[0].constData()); } diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp index 99ab4c8..f22b9b7 100644 --- a/src/activeqt/shared/qaxtypes.cpp +++ b/src/activeqt/shared/qaxtypes.cpp @@ -633,7 +633,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported("records"); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } arg.vt = VT_RECORD; @@ -653,7 +653,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported(qvar.typeName()); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } arg.vt = VT_DISPATCH; @@ -669,7 +669,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported(qvar.typeName()); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } arg.vt = VT_UNKNOWN; @@ -681,7 +681,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported("subtype"); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } arg.vt = VT_DISPATCH; @@ -697,7 +697,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported("subtype"); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } QAxObject *object = *(QAxObject**)qvar.constData(); |