diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2017-09-18 11:49:52 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2017-09-19 11:53:55 +0000 |
commit | 58c14c4a7edcecdd9d58b682a9360c83e2274ec5 (patch) | |
tree | 7f600686e4dd92681bec09ac745a9dcd4425844b /src/widgets/kernel/qwidget.cpp | |
parent | 47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (diff) |
Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
(definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
(a test executable compilable both under Qt4 and Qt5)
Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index b38f046c21..c245c7e2e7 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1167,7 +1167,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) if (targetScreen >= 0) { topData()->initialScreenIndex = targetScreen; if (QWindow *window = q->windowHandle()) - window->setScreen(QGuiApplication::screens().value(targetScreen, Q_NULLPTR)); + window->setScreen(QGuiApplication::screens().value(targetScreen, nullptr)); } data.fstrut_dirty = true; @@ -1459,7 +1459,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO screenNumber = q->windowType() != Qt::Desktop ? QDesktopWidgetPrivate::screenNumber(q) : 0; } - win->setScreen(QGuiApplication::screens().value(screenNumber, Q_NULLPTR)); + win->setScreen(QGuiApplication::screens().value(screenNumber, nullptr)); } QSurfaceFormat format = win->requestedFormat(); @@ -7891,7 +7891,7 @@ void QWidgetPrivate::show_helper() const bool isWindow = q->isWindow(); #if QT_CONFIG(graphicsview) - bool isEmbedded = isWindow && q->graphicsProxyWidget() != Q_NULLPTR; + bool isEmbedded = isWindow && q->graphicsProxyWidget() != nullptr; #else bool isEmbedded = false; #endif @@ -12446,7 +12446,7 @@ static inline bool canMapPosition(QWindow *window) #if QT_CONFIG(graphicsview) static inline QGraphicsProxyWidget *graphicsProxyWidget(const QWidget *w) { - QGraphicsProxyWidget *result = Q_NULLPTR; + QGraphicsProxyWidget *result = nullptr; const QWidgetPrivate *d = qt_widget_private(const_cast<QWidget *>(w)); if (d->extra) result = d->extra->proxyWidget; @@ -12462,7 +12462,7 @@ struct MapToGlobalTransformResult { static MapToGlobalTransformResult mapToGlobalTransform(const QWidget *w) { MapToGlobalTransformResult result; - result.window = Q_NULLPTR; + result.window = nullptr; for ( ; w ; w = w->parentWidget()) { #if QT_CONFIG(graphicsview) if (QGraphicsProxyWidget *qgpw = graphicsProxyWidget(w)) { |