diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index cd564d3ef472322ea19213576353869387563926..eb0f7c1346cdb78cd71bd79464c61ecaf3ca9561 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 fa8e3eec6098e9533c9411075b556b32afa2be7d..6c7e1ee535634fecb607a7a303bc6204b10337b1 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 0eeda2d4a4d26e10d2e0fbf775ce39f4d6a342e2..5658d8e4f793a87f32381a6b76c0ad9133cefcb4 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 d0aafaabccb26ef920d42fecec32d343fb1ea94f..fee3a2b65b3483ba651f2cc5fbfbe39cfad9a716 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 160b4360699e7b418c95826aefe268d596b968f9..49e78b729215597a56aab0bb921ef203efafb392 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 8fb659db95ac6034f64b404bc45c250975203d36..85b743d9fd4c838384b28a101e152db21fa2a66b 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 6c8d4b99bd88db6fa6caeb7a4e5dc35ca3f35f6c..f9c228f67afbb935d910712fdc7722bd77dd7ca1 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 5c1df487530a29418dd1e46280c7a0f4369cb8c2..2f113de48fb34e71ca6e215cccb5665fb38a297e 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 0cde5e2451abaeaf33ce923e6fd9ecfffad3a37b..ec51eb98c1be098b56c6065b3da78ee5fe6a8d6a 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 99ab4c849795021fb58df4f218b6243a94c1c55d..f22b9b70f7acaf8b7c4d97bccf414fbcac880a0f 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(); diff --git a/tests/manual/testcontrol/main.cpp b/tests/manual/testcontrol/main.cpp index f8fd3e6d9ad51e4377e6fea39f4563cf82807917..7fca2507101aba75760cd4471f1fab13c8b71012 100644 --- a/tests/manual/testcontrol/main.cpp +++ b/tests/manual/testcontrol/main.cpp @@ -55,7 +55,7 @@ class QTestControl : public QMainWindow Q_CLASSINFO("EventsID", "{E1816BBA-BF5D-4A31-9855-D6BA43205510}") public: - explicit QTestControl(QWidget *parent = Q_NULLPTR); + explicit QTestControl(QWidget *parent = nullptr); public slots: void appendText(const QString &t) { m_logWindow->appendPlainText(t); } diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp index 1f0cca8955a85a3c7e9ff10ed1804a247116dad2..8a37f3300399611213c1f7068a07ecf3f05c60e0 100644 --- a/tools/dumpcpp/main.cpp +++ b/tools/dumpcpp/main.cpp @@ -925,7 +925,7 @@ static QByteArrayList vTableOnlyStubsFromTypeLib(ITypeLib *typelib, const QStrin for (UINT i = 0, typeCount = typelib->GetTypeInfoCount(); i < typeCount; ++i) { TYPEKIND typekind; if (SUCCEEDED(typelib->GetTypeInfoType(i, &typekind)) && typekind == TKIND_INTERFACE) { - ITypeInfo *typeinfo = Q_NULLPTR; + ITypeInfo *typeinfo = nullptr; if (SUCCEEDED(typelib->GetTypeInfo(i, &typeinfo) && typeinfo)) { result.append(nameSpacePrefix + classNameFromTypeInfo(typeinfo)); typeinfo->Release(); @@ -949,7 +949,7 @@ bool generateTypeLibrary(QString typeLibFile, QString outname, QString libName = nameSpace; if (libName.isEmpty()) { - BSTR nameString = Q_NULLPTR; + BSTR nameString = nullptr; if (SUCCEEDED(typelib->GetDocumentation(-1, &nameString, 0, 0, 0))) { libName = QString::fromWCharArray(nameString); SysFreeString(nameString); diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp index 682c8e51dcca2f3c7e0e5c65c54663687d7e42f2..3ff0016126755e2ba74235ef7d25b512b9b9dfac 100644 --- a/tools/testcon/mainwindow.cpp +++ b/tools/testcon/mainwindow.cpp @@ -65,14 +65,14 @@ static const ScriptLanguage scriptLanguages[] = { {"Python", ".py"} }; -MainWindow *MainWindow::m_instance = Q_NULLPTR; +MainWindow *MainWindow::m_instance = nullptr; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) - , m_dlgInvoke(Q_NULLPTR) - , m_dlgProperties(Q_NULLPTR) - , m_dlgAmbient(Q_NULLPTR) - , m_scripts(Q_NULLPTR) + , m_dlgInvoke(nullptr) + , m_dlgProperties(nullptr) + , m_dlgAmbient(nullptr) + , m_scripts(nullptr) { setupUi(this); MainWindow::m_instance = this; // Logging handler needs the UI @@ -99,7 +99,7 @@ MainWindow::MainWindow(QWidget *parent) MainWindow::~MainWindow() { - MainWindow::m_instance = Q_NULLPTR; + MainWindow::m_instance = nullptr; } QAxWidget *MainWindow::activeAxWidget() const