diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h index f1f0cf93282..7776c61582f 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h @@ -86,8 +86,8 @@ public: EglConfig, EglContext }; - virtual void *nativeResource(NativeResource /*resource*/) { return Q_NULLPTR; } - virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return Q_NULLPTR; } + virtual void *nativeResource(NativeResource /*resource*/) { return nullptr; } + virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return nullptr; } }; } diff --git a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp index 94eca326296..8f573064ef1 100644 --- a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp +++ b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp @@ -90,7 +90,7 @@ QWaylandInputDeviceIntegration *QWaylandInputDeviceIntegrationFactory::create(co if (QWaylandInputDeviceIntegration *ret = qLoadPlugin(loader(), name, args)) return ret; #endif - return Q_NULLPTR; + return nullptr; } } diff --git a/src/plugins/platforms/wayland/qwaylandcursor.cpp b/src/plugins/platforms/wayland/qwaylandcursor.cpp index 7caa247e52f..6ce2b7bbca4 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor.cpp +++ b/src/plugins/platforms/wayland/qwaylandcursor.cpp @@ -92,7 +92,7 @@ struct wl_cursor_image *QWaylandCursor::cursorImage(Qt::CursorShape newShape) waylandCursor = requestCursor((WaylandCursor)newShape); } else if (newShape == Qt::BitmapCursor) { // cannot create a wl_cursor_image for a CursorShape - return Q_NULLPTR; + return nullptr; } else { //TODO: Custom cursor logic (for resize arrows) } diff --git a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp index 33068c5e97a..66f36f75be7 100644 --- a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp +++ b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp @@ -97,7 +97,7 @@ void QWaylandDataDevice::setSelectionSource(QWaylandDataSource *source) { if (source) connect(source, &QWaylandDataSource::cancelled, this, &QWaylandDataDevice::selectionSourceCancelled); - set_selection(source ? source->object() : Q_NULLPTR, m_inputDevice->serial()); + set_selection(source ? source->object() : nullptr, m_inputDevice->serial()); m_selectionSource.reset(source); } @@ -160,7 +160,7 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface, m_dragWindow = QWaylandWindow::fromWlSurface(surface)->window(); m_dragPoint = calculateDragPosition(x, y, m_dragWindow); - QMimeData *dragData = Q_NULLPTR; + QMimeData *dragData = nullptr; Qt::DropActions supportedActions; m_dragOffer.reset(static_cast(wl_data_offer_get_user_data(id))); diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 86cfe1a0d6c..b2372f08898 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -136,8 +136,8 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration) , mLastInputSerial(0) , mLastInputDevice(0) , mLastInputWindow(0) - , mLastKeyboardFocus(Q_NULLPTR) - , mSyncCallback(Q_NULLPTR) + , mLastKeyboardFocus(nullptr) + , mSyncCallback(nullptr) { qRegisterMetaType("uint32_t"); @@ -446,7 +446,7 @@ void QWaylandDisplay::handleWaylandSync() // This callback is used to set the window activation because we may get an activate/deactivate // pair, and the latter one would be lost in the QWindowSystemInterface queue, if we issue the // handleWindowActivated() calls immediately. - QWindow *activeWindow = mActiveWindows.empty() ? Q_NULLPTR : mActiveWindows.last()->window(); + QWindow *activeWindow = mActiveWindows.empty() ? nullptr : mActiveWindows.last()->window(); if (activeWindow != QGuiApplication::focusWindow()) QWindowSystemInterface::handleWindowActivated(activeWindow); } @@ -456,7 +456,7 @@ const wl_callback_listener QWaylandDisplay::syncCallbackListener = { Q_UNUSED(time); wl_callback_destroy(callback); QWaylandDisplay *display = static_cast(data); - display->mSyncCallback = Q_NULLPTR; + display->mSyncCallback = nullptr; display->handleWaylandSync(); } }; diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 400f3517c81..03aedd6b63a 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -122,7 +122,7 @@ public: QWaylandIntegration::QWaylandIntegration() : mClientBufferIntegration(0) - , mInputDeviceIntegration(Q_NULLPTR) + , mInputDeviceIntegration(nullptr) , mFontDb(new QGenericUnixFontDatabase()) , mNativeInterface(new QWaylandNativeInterface(this)) #if QT_CONFIG(accessibility) diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp index 2085bc5977c..a7bc241651a 100644 --- a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp +++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp @@ -171,7 +171,7 @@ QWaylandShmBackingStore::QWaylandShmBackingStore(QWindow *window) QWaylandShmBackingStore::~QWaylandShmBackingStore() { if (QWaylandWindow *w = waylandWindow()) - w->setBackingStore(Q_NULLPTR); + w->setBackingStore(nullptr); // if (mFrontBuffer == waylandWindow()->attached()) // waylandWindow()->attach(0); diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 97596896fff..cd846c0ba0e 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -95,7 +95,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window) , mScale(1) , mState(Qt::WindowNoState) , mMask() - , mBackingStore(Q_NULLPTR) + , mBackingStore(nullptr) , mUpdateRequested(false) { static WId id = 1; @@ -240,7 +240,7 @@ bool QWaylandWindow::shouldCreateShellSurface() const bool QWaylandWindow::shouldCreateSubSurface() const { - return QPlatformWindow::parent() != Q_NULLPTR; + return QPlatformWindow::parent() != nullptr; } void QWaylandWindow::reset(bool sendDestroyEvent) diff --git a/src/plugins/platforms/wayland/qwaylandwlshellintegration.cpp b/src/plugins/platforms/wayland/qwaylandwlshellintegration.cpp index e945745e23c..e516371086e 100644 --- a/src/plugins/platforms/wayland/qwaylandwlshellintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandwlshellintegration.cpp @@ -55,7 +55,7 @@ QWaylandWlShellIntegration *QWaylandWlShellIntegration::create(QWaylandDisplay * } QWaylandWlShellIntegration::QWaylandWlShellIntegration(QWaylandDisplay *display) - : m_wlShell(Q_NULLPTR) + : m_wlShell(nullptr) { Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) { if (global.interface == QLatin1String("wl_shell")) { diff --git a/src/plugins/platforms/wayland/qwaylandwlshellsurface.cpp b/src/plugins/platforms/wayland/qwaylandwlshellsurface.cpp index 77434e98b6c..cc5163a220a 100644 --- a/src/plugins/platforms/wayland/qwaylandwlshellsurface.cpp +++ b/src/plugins/platforms/wayland/qwaylandwlshellsurface.cpp @@ -58,7 +58,7 @@ QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_ , m_window(window) , m_maximized(false) , m_fullscreen(false) - , m_extendedWindow(Q_NULLPTR) + , m_extendedWindow(nullptr) { if (window->display()->windowExtension()) m_extendedWindow = new QWaylandExtendedSurface(window); diff --git a/src/plugins/platforms/wayland/qwaylandxdgshellintegration.cpp b/src/plugins/platforms/wayland/qwaylandxdgshellintegration.cpp index 04b8e804848..7c40d2dd7fb 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgshellintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandxdgshellintegration.cpp @@ -57,7 +57,7 @@ QWaylandXdgShellIntegration *QWaylandXdgShellIntegration::create(QWaylandDisplay } QWaylandXdgShellIntegration::QWaylandXdgShellIntegration(QWaylandDisplay *display) - : m_xdgShell(Q_NULLPTR) + : m_xdgShell(nullptr) { Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) { if (global.interface == QLatin1String("xdg_shell")) { diff --git a/src/plugins/platforms/wayland/qwaylandxdgsurface.cpp b/src/plugins/platforms/wayland/qwaylandxdgsurface.cpp index fe8761e5b6d..60266af689d 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgsurface.cpp +++ b/src/plugins/platforms/wayland/qwaylandxdgsurface.cpp @@ -61,7 +61,7 @@ QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *shell, QWaylandWindow * , m_minimized(false) , m_fullscreen(false) , m_active(false) - , m_extendedWindow(Q_NULLPTR) + , m_extendedWindow(nullptr) { if (window->display()->windowExtension()) m_extendedWindow = new QWaylandExtendedSurface(window); @@ -105,7 +105,7 @@ void QWaylandXdgSurface::setMaximized() void QWaylandXdgSurface::setFullscreen() { if (!m_fullscreen) - set_fullscreen(Q_NULLPTR); + set_fullscreen(nullptr); } void QWaylandXdgSurface::setNormal() diff --git a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp index 09c62339b62..c5a505bbe0b 100644 --- a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp +++ b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp @@ -90,7 +90,7 @@ QWaylandShellIntegration *QWaylandShellIntegrationFactory::create(const QString if (QWaylandShellIntegration *ret = qLoadPlugin(loader(), name, args)) return ret; #endif - return Q_NULLPTR; + return nullptr; } } diff --git a/tests/auto/cmake/test_waylandclient/main.cpp b/tests/auto/cmake/test_waylandclient/main.cpp index f0ccdef4b76..33f4470bb5f 100644 --- a/tests/auto/cmake/test_waylandclient/main.cpp +++ b/tests/auto/cmake/test_waylandclient/main.cpp @@ -3,5 +3,5 @@ int main() { // use symbol - QtWaylandClient::QWaylandCursor cursor(Q_NULLPTR); + QtWaylandClient::QWaylandCursor cursor(nullptr); } diff --git a/tests/auto/wayland/client/mockinput.cpp b/tests/auto/wayland/client/mockinput.cpp index 99acdd43a75..6bc27f1095e 100644 --- a/tests/auto/wayland/client/mockinput.cpp +++ b/tests/auto/wayland/client/mockinput.cpp @@ -239,8 +239,8 @@ void Seat::seat_get_touch(Resource *resource, uint32_t id) Keyboard::Keyboard(Compositor *compositor) : wl_keyboard() , m_compositor(compositor) - , m_focusResource(Q_NULLPTR) - , m_focus(Q_NULLPTR) + , m_focusResource(nullptr) + , m_focus(nullptr) { } @@ -293,8 +293,8 @@ void Keyboard::keyboard_destroy_resource(wl_keyboard::Resource *resource) Pointer::Pointer(Compositor *compositor) : wl_pointer() , m_compositor(compositor) - , m_focusResource(Q_NULLPTR) - , m_focus(Q_NULLPTR) + , m_focusResource(nullptr) + , m_focus(nullptr) { } diff --git a/tests/auto/wayland/client/mocksurface.cpp b/tests/auto/wayland/client/mocksurface.cpp index 55712af1194..61c9ac1b724 100644 --- a/tests/auto/wayland/client/mocksurface.cpp +++ b/tests/auto/wayland/client/mocksurface.cpp @@ -33,7 +33,7 @@ namespace Impl { Surface::Surface(wl_client *client, uint32_t id, int v, Compositor *compositor) : QtWaylandServer::wl_surface(client, id, v) - , m_buffer(Q_NULLPTR) + , m_buffer(nullptr) , m_compositor(compositor) , m_mockSurface(new MockSurface(this)) , m_mapped(false)