summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Funk <kfunk@kde.org>2017-09-24 23:54:47 +0200
committerKevin Funk <kevin.funk@kdab.com>2017-09-29 19:14:10 +0000
commitdef6c3c3e263d06a39b2370a122f080f24df26f9 (patch)
tree5799f6600b6f5751b4d97cb74b948f2cb7b10958
parent7c9db49830de90879ecf7a217386cc860c9eb206 (diff)
Replace Q_NULLPTR with nullptr
Change-Id: I0df68cec43511537b61ddfe74bd677be7a598eae Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/activeqt/container/qaxbase.cpp6
-rw-r--r--src/activeqt/container/qaxbase.h6
-rw-r--r--src/activeqt/container/qaxobject.h10
-rw-r--r--src/activeqt/container/qaxscript.h4
-rw-r--r--src/activeqt/container/qaxselect.h2
-rw-r--r--src/activeqt/container/qaxwidget.cpp2
-rw-r--r--src/activeqt/container/qaxwidget.h10
-rw-r--r--src/activeqt/control/qaxfactory.h20
-rw-r--r--src/activeqt/control/qaxserverbase.cpp2
-rw-r--r--src/activeqt/shared/qaxtypes.cpp10
-rw-r--r--tests/manual/testcontrol/main.cpp2
-rw-r--r--tools/dumpcpp/main.cpp4
-rw-r--r--tools/testcon/mainwindow.cpp12
13 files changed, 45 insertions, 45 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();
diff --git a/tests/manual/testcontrol/main.cpp b/tests/manual/testcontrol/main.cpp
index f8fd3e6..7fca250 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 1f0cca8..8a37f33 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 682c8e5..3ff0016 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