diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-02-20 13:35:03 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-02-20 14:15:08 +0000 |
commit | 1ebb4e0d64bf27dfc6c38b9770ae744fad87fb82 (patch) | |
tree | f92eb1649a32785f93fe6af8df82c8d0611b21e0 /src/client | |
parent | abfdf34f510b64439c85cc54f47b41c4ce3f9c61 (diff) |
Use nullptr instead of 0 or NULL
Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some
manual cleanup to prevent QFlag macros to be affected.
Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/client')
23 files changed, 69 insertions, 69 deletions
diff --git a/src/client/global/qwaylandclientextension.cpp b/src/client/global/qwaylandclientextension.cpp index ad266a683..60a8944f8 100644 --- a/src/client/global/qwaylandclientextension.cpp +++ b/src/client/global/qwaylandclientextension.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE QWaylandClientExtensionPrivate::QWaylandClientExtensionPrivate() : QObjectPrivate() - , waylandIntegration(NULL) + , waylandIntegration(nullptr) , version(-1) , active(false) { diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp index eebd69a87..02bed461a 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp +++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp @@ -90,7 +90,7 @@ QWaylandClientBufferIntegration *QWaylandClientBufferIntegrationFactory::create( if (QWaylandClientBufferIntegration *ret = qLoadPlugin<QWaylandClientBufferIntegration, QWaylandClientBufferIntegrationPlugin>(loader(), name, args)) return ret; #endif - return 0; + return nullptr; } } diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h index 6496b33ed..1711852c7 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h +++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h @@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegrationPlugin : public QOb { Q_OBJECT public: - explicit QWaylandClientBufferIntegrationPlugin(QObject *parent = 0); + explicit QWaylandClientBufferIntegrationPlugin(QObject *parent = nullptr); ~QWaylandClientBufferIntegrationPlugin(); virtual QWaylandClientBufferIntegration *create(const QString &key, const QStringList ¶mList) = 0; diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp index 1d64e0f51..013ddae9f 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp +++ b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE namespace QtWaylandClient { QWaylandServerBuffer::QWaylandServerBuffer() - : m_user_data(0) + : m_user_data(nullptr) { } diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp index aa2f54cb7..39d65f88d 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp +++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp @@ -90,7 +90,7 @@ QWaylandServerBufferIntegration *QWaylandServerBufferIntegrationFactory::create( if (QWaylandServerBufferIntegration *ret = qLoadPlugin<QWaylandServerBufferIntegration, QWaylandServerBufferIntegrationPlugin>(loader(), name, args)) return ret; #endif - return 0; + return nullptr; } } diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h index b3ed3ccc5..bf6c04f82 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h +++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h @@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegrationPlugin : public QOb { Q_OBJECT public: - explicit QWaylandServerBufferIntegrationPlugin(QObject *parent = 0); + explicit QWaylandServerBufferIntegrationPlugin(QObject *parent = nullptr); ~QWaylandServerBufferIntegrationPlugin(); virtual QWaylandServerBufferIntegration *create(const QString &key, const QStringList ¶mList) = 0; diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h index 2d9961dba..104d594ca 100644 --- a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h +++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h @@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDeviceIntegrationPlugin : public QObj { Q_OBJECT public: - explicit QWaylandInputDeviceIntegrationPlugin(QObject *parent = 0); + explicit QWaylandInputDeviceIntegrationPlugin(QObject *parent = nullptr); ~QWaylandInputDeviceIntegrationPlugin(); virtual QWaylandInputDeviceIntegration *create(const QString &key, const QStringList ¶mList) = 0; diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp index daaf4e6bc..6a7a2ef4c 100644 --- a/src/client/qwaylandabstractdecoration.cpp +++ b/src/client/qwaylandabstractdecoration.cpp @@ -70,10 +70,10 @@ public: }; QWaylandAbstractDecorationPrivate::QWaylandAbstractDecorationPrivate() - : m_window(0) - , m_wayland_window(0) + : m_window(nullptr) + , m_wayland_window(nullptr) , m_isDirty(true) - , m_decorationContentImage(0) + , m_decorationContentImage(nullptr) , m_mouseButtons(Qt::NoButton) { } diff --git a/src/client/qwaylandbuffer.cpp b/src/client/qwaylandbuffer.cpp index a0fcc532f..2dc99b3b7 100644 --- a/src/client/qwaylandbuffer.cpp +++ b/src/client/qwaylandbuffer.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE namespace QtWaylandClient { QWaylandBuffer::QWaylandBuffer() - : mBuffer(0) + : mBuffer(nullptr) , mBusy(false) { } diff --git a/src/client/qwaylandclipboard.cpp b/src/client/qwaylandclipboard.cpp index 5da120268..60820da92 100644 --- a/src/client/qwaylandclipboard.cpp +++ b/src/client/qwaylandclipboard.cpp @@ -90,7 +90,7 @@ void QWaylandClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode) static const QString utf8 = QStringLiteral("text/plain;charset=utf-8"); if (data && data->hasFormat(plain) && !data->hasFormat(utf8)) data->setData(utf8, data->data(plain)); - inputDevice->dataDevice()->setSelectionSource(data ? new QWaylandDataSource(mDisplay->dndSelectionHandler(), data) : 0); + inputDevice->dataDevice()->setSelectionSource(data ? new QWaylandDataSource(mDisplay->dndSelectionHandler(), data) : nullptr); emitChanged(mode); } @@ -109,7 +109,7 @@ bool QWaylandClipboard::ownsMode(QClipboard::Mode mode) const if (!inputDevice || !inputDevice->dataDevice()) return false; - return inputDevice->dataDevice()->selectionSource() != 0; + return inputDevice->dataDevice()->selectionSource() != nullptr; } } diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp index bd820e28e..21a6c0811 100644 --- a/src/client/qwaylandcursor.cpp +++ b/src/client/qwaylandcursor.cpp @@ -79,13 +79,13 @@ QWaylandCursor::~QWaylandCursor() struct wl_cursor_image *QWaylandCursor::cursorImage(Qt::CursorShape newShape) { - struct wl_cursor *waylandCursor = 0; + struct wl_cursor *waylandCursor = nullptr; /* Hide cursor */ if (newShape == Qt::BlankCursor) { - mDisplay->setCursor(NULL, NULL); - return NULL; + mDisplay->setCursor(nullptr, nullptr); + return nullptr; } if (newShape < Qt::BitmapCursor) { @@ -99,14 +99,14 @@ struct wl_cursor_image *QWaylandCursor::cursorImage(Qt::CursorShape newShape) if (!waylandCursor) { qDebug("Could not find cursor for shape %d", newShape); - return NULL; + return nullptr; } struct wl_cursor_image *image = waylandCursor->images[0]; struct wl_buffer *buffer = wl_cursor_image_get_buffer(image); if (!buffer) { qDebug("Could not find buffer for cursor"); - return NULL; + return nullptr; } return image; @@ -166,7 +166,7 @@ wl_cursor *QWaylandCursor::requestCursor(WaylandCursor shape) //If the cursor has not been loaded already, load it if (!cursor) { if (!mCursorTheme) - return NULL; + return nullptr; QList<QByteArray> cursorNames = mCursorNamesMap.values(shape); foreach (const QByteArray &name, cursorNames) { diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp index 66f36f75b..83912035a 100644 --- a/src/client/qwaylanddatadevice.cpp +++ b/src/client/qwaylanddatadevice.cpp @@ -67,7 +67,7 @@ QWaylandDataDevice::QWaylandDataDevice(QWaylandDataDeviceManager *manager, QWayl , m_display(manager->display()) , m_inputDevice(inputDevice) , m_enterSerial(0) - , m_dragWindow(0) + , m_dragWindow(nullptr) , m_dragPoint() , m_dragOffer() , m_selectionOffer() @@ -135,7 +135,7 @@ void QWaylandDataDevice::data_device_drop() { QDrag *drag = static_cast<QWaylandDrag *>(QGuiApplicationPrivate::platformIntegration()->drag())->currentDrag(); - QMimeData *dragData = 0; + QMimeData *dragData = nullptr; Qt::DropActions supportedActions; if (drag) { dragData = drag->mimeData(); @@ -182,14 +182,14 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface, if (response.isAccepted()) { wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, m_dragOffer->firstFormat().toUtf8().constData()); } else { - wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, 0); + wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, nullptr); } } void QWaylandDataDevice::data_device_leave() { if (m_dragWindow) - QWindowSystemInterface::handleDrag(m_dragWindow, 0, QPoint(), Qt::IgnoreAction); + QWindowSystemInterface::handleDrag(m_dragWindow, nullptr, QPoint(), Qt::IgnoreAction); QDrag *drag = static_cast<QWaylandDrag *>(QGuiApplicationPrivate::platformIntegration()->drag())->currentDrag(); if (!drag) { @@ -227,7 +227,7 @@ void QWaylandDataDevice::data_device_motion(uint32_t time, wl_fixed_t x, wl_fixe if (response.isAccepted()) { wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, m_dragOffer->firstFormat().toUtf8().constData()); } else { - wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, 0); + wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, nullptr); } } #endif // QT_CONFIG(draganddrop) diff --git a/src/client/qwaylanddecorationfactory.cpp b/src/client/qwaylanddecorationfactory.cpp index ccf2c806c..32db96e58 100644 --- a/src/client/qwaylanddecorationfactory.cpp +++ b/src/client/qwaylanddecorationfactory.cpp @@ -91,7 +91,7 @@ QWaylandAbstractDecoration *QWaylandDecorationFactory::create(const QString &nam return ret; #endif - return 0; + return nullptr; } } diff --git a/src/client/qwaylanddecorationplugin_p.h b/src/client/qwaylanddecorationplugin_p.h index c549b24be..4255de46f 100644 --- a/src/client/qwaylanddecorationplugin_p.h +++ b/src/client/qwaylanddecorationplugin_p.h @@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDecorationPlugin : public QObject { Q_OBJECT public: - explicit QWaylandDecorationPlugin(QObject *parent = 0); + explicit QWaylandDecorationPlugin(QObject *parent = nullptr); ~QWaylandDecorationPlugin(); virtual QWaylandAbstractDecoration *create(const QString &key, const QStringList ¶mList) = 0; diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 02b1fd9a9..942494f93 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -89,7 +89,7 @@ struct wl_surface *QWaylandDisplay::createSurface(void *handle) QWaylandShellSurface *QWaylandDisplay::createShellSurface(QWaylandWindow *window) { if (!mWaylandIntegration->shellIntegration()) - return 0; + return nullptr; return mWaylandIntegration->shellIntegration()->createShellSurface(window); } @@ -106,7 +106,7 @@ struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion) ::wl_subsurface *QWaylandDisplay::createSubSurface(QWaylandWindow *window, QWaylandWindow *parent) { if (!mSubCompositor) { - return NULL; + return nullptr; } return mSubCompositor->get_subsurface(window->object(), parent->object()); @@ -125,24 +125,24 @@ QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() co QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration) : mWaylandIntegration(waylandIntegration) #if QT_CONFIG(wayland_datadevice) - , mDndSelectionHandler(0) + , mDndSelectionHandler(nullptr) #endif - , mWindowExtension(0) - , mSubCompositor(0) - , mTouchExtension(0) - , mQtKeyExtension(0) - , mTextInputManager(0) - , mHardwareIntegration(0) + , mWindowExtension(nullptr) + , mSubCompositor(nullptr) + , mTouchExtension(nullptr) + , mQtKeyExtension(nullptr) + , mTextInputManager(nullptr) + , mHardwareIntegration(nullptr) , mLastInputSerial(0) - , mLastInputDevice(0) - , mLastInputWindow(0) + , mLastInputDevice(nullptr) + , mLastInputWindow(nullptr) , mLastKeyboardFocus(nullptr) , mSyncCallback(nullptr) { qRegisterMetaType<uint32_t>("uint32_t"); - mDisplay = wl_display_connect(NULL); - if (mDisplay == NULL) { + mDisplay = wl_display_connect(nullptr); + if (mDisplay == nullptr) { qErrnoWarning(errno, "Failed to create display"); ::exit(1); } @@ -219,7 +219,7 @@ QWaylandScreen *QWaylandDisplay::screenForOutput(struct wl_output *output) const if (screen->output() == output) return screen; } - return 0; + return nullptr; } void QWaylandDisplay::waitForScreens() @@ -333,7 +333,7 @@ uint32_t QWaylandDisplay::currentTimeMillisec() { //### we throw away the time information struct timeval tv; - int ret = gettimeofday(&tv, 0); + int ret = gettimeofday(&tv, nullptr); if (ret == 0) return tv.tv_sec*1000 + tv.tv_usec/1000; return 0; diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp index fac5fb840..16ee057c5 100644 --- a/src/client/qwaylandinputcontext.cpp +++ b/src/client/qwaylandinputcontext.cpp @@ -403,7 +403,7 @@ QWaylandInputContext::~QWaylandInputContext() bool QWaylandInputContext::isValid() const { - return mDisplay->textInputManager() != 0; + return mDisplay->textInputManager() != nullptr; } void QWaylandInputContext::reset() diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index f0182218f..698abd8fd 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/qwaylandintegration.cpp @@ -121,7 +121,7 @@ public: }; QWaylandIntegration::QWaylandIntegration() - : mClientBufferIntegration(0) + : mClientBufferIntegration(nullptr) , mInputDeviceIntegration(nullptr) , mFontDb(new QGenericUnixFontDatabase()) , mNativeInterface(new QWaylandNativeInterface(this)) @@ -198,7 +198,7 @@ QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGL { if (mDisplay->clientBufferIntegration()) return mDisplay->clientBufferIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle()); - return 0; + return nullptr; } #endif // opengl diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp index b6336f2e6..fba755577 100644 --- a/src/client/qwaylandscreen.cpp +++ b/src/client/qwaylandscreen.cpp @@ -65,7 +65,7 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin , mOutputName(QStringLiteral("Screen%1").arg(id)) , m_orientation(Qt::PrimaryOrientation) #if QT_CONFIG(cursor) - , mWaylandCursor(0) + , mWaylandCursor(nullptr) #endif { } diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp index a13a5f764..24554ee44 100644 --- a/src/client/qwaylandshmbackingstore.cpp +++ b/src/client/qwaylandshmbackingstore.cpp @@ -73,8 +73,8 @@ Q_LOGGING_CATEGORY(logCategory, "qt.qpa.wayland.backingstore") QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display, const QSize &size, QImage::Format format, int scale) : QWaylandBuffer() - , mShmPool(0) - , mMarginsImage(0) + , mShmPool(nullptr) + , mMarginsImage(nullptr) { int stride = size.width() * 4; int alloc = stride * size.height(); @@ -105,7 +105,7 @@ QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display, // map ourselves: QFile::map() will unmap when the object is destroyed, // but we want this mapping to persist (unmapping in destructor) uchar *data = (uchar *) - mmap(NULL, alloc, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + mmap(nullptr, alloc, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (data == (uchar *) MAP_FAILED) { qErrnoWarning("QWaylandShmBuffer: mmap failed"); return; @@ -147,7 +147,7 @@ QImage *QWaylandShmBuffer::imageInsideMargins(const QMargins &marginsIn) } if (margins.isNull()) { delete mMarginsImage; - mMarginsImage = 0; + mMarginsImage = nullptr; } mMargins = margins; @@ -161,8 +161,8 @@ QImage *QWaylandShmBuffer::imageInsideMargins(const QMargins &marginsIn) QWaylandShmBackingStore::QWaylandShmBackingStore(QWindow *window) : QPlatformBackingStore(window) , mDisplay(QWaylandScreen::waylandScreenFromWindow(window)->display()) - , mFrontBuffer(0) - , mBackBuffer(0) + , mFrontBuffer(nullptr) + , mBackBuffer(nullptr) , mPainting(false) { @@ -249,7 +249,7 @@ QWaylandShmBuffer *QWaylandShmBackingStore::getBuffer(const QSize &size) } else { mBuffers.removeOne(b); if (mBackBuffer == b) - mBackBuffer = 0; + mBackBuffer = nullptr; delete b; } } @@ -262,7 +262,7 @@ QWaylandShmBuffer *QWaylandShmBackingStore::getBuffer(const QSize &size) mBuffers.prepend(b); return b; } - return 0; + return nullptr; } void QWaylandShmBackingStore::resize(const QSize &size) diff --git a/src/client/qwaylandtouch.cpp b/src/client/qwaylandtouch.cpp index f5521a31c..48c869a60 100644 --- a/src/client/qwaylandtouch.cpp +++ b/src/client/qwaylandtouch.cpp @@ -48,11 +48,11 @@ namespace QtWaylandClient { QWaylandTouchExtension::QWaylandTouchExtension(QWaylandDisplay *display, uint32_t id) : QtWayland::qt_touch_extension(display->wl_registry(), id, 1), mDisplay(display), - mTouchDevice(0), + mTouchDevice(nullptr), mPointsLeft(0), mFlags(0), mMouseSourceId(-1), - mInputDevice(0) + mInputDevice(nullptr) { } diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 2e709440f..75dfaa499 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -75,15 +75,15 @@ QT_BEGIN_NAMESPACE namespace QtWaylandClient { -QWaylandWindow *QWaylandWindow::mMouseGrab = 0; +QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr; QWaylandWindow::QWaylandWindow(QWindow *window) : QObject() , QPlatformWindow(window) , mDisplay(waylandScreen()->display()) - , mShellSurface(0) - , mSubSurfaceWindow(0) - , mWindowDecoration(0) + , mShellSurface(nullptr) + , mSubSurfaceWindow(nullptr) + , mWindowDecoration(nullptr) , mMouseEventsInContentArea(false) , mMousePressedInContentArea(Qt::NoButton) , mWaitingForFrameSync(false) @@ -124,7 +124,7 @@ QWaylandWindow::~QWaylandWindow() } if (mMouseGrab == this) { - mMouseGrab = 0; + mMouseGrab = nullptr; } } @@ -256,9 +256,9 @@ void QWaylandWindow::reset(bool sendDestroyEvent) QGuiApplication::sendEvent(window(), &e); } delete mShellSurface; - mShellSurface = 0; + mShellSurface = nullptr; delete mSubSurfaceWindow; - mSubSurfaceWindow = 0; + mSubSurfaceWindow = nullptr; if (isInitialized()) destroy(); @@ -285,7 +285,7 @@ void QWaylandWindow::setParent(const QPlatformWindow *parent) if (!window()->isVisible()) return; - QWaylandWindow *oldparent = mSubSurfaceWindow ? mSubSurfaceWindow->parent() : 0; + QWaylandWindow *oldparent = mSubSurfaceWindow ? mSubSurfaceWindow->parent() : nullptr; if (oldparent == parent) return; @@ -574,7 +574,7 @@ void QWaylandWindow::attach(QWaylandBuffer *buffer, int x, int y) attach(buffer->buffer(), x, y); } else { - QtWayland::wl_surface::attach(0, 0, 0); + QtWayland::wl_surface::attach(nullptr, 0, 0); } } @@ -777,7 +777,7 @@ bool QWaylandWindow::createDecoration() } } else { delete mWindowDecoration; - mWindowDecoration = 0; + mWindowDecoration = nullptr; } if (hadDecoration != (bool)mWindowDecoration) { @@ -984,7 +984,7 @@ bool QWaylandWindow::setMouseGrabEnabled(bool grab) return false; } - mMouseGrab = grab ? this : 0; + mMouseGrab = grab ? this : nullptr; return true; } diff --git a/src/client/qwaylandwlshellsurface.cpp b/src/client/qwaylandwlshellsurface.cpp index 185cfc4a9..7c8d51721 100644 --- a/src/client/qwaylandwlshellsurface.cpp +++ b/src/client/qwaylandwlshellsurface.cpp @@ -127,14 +127,14 @@ void QWaylandWlShellSurface::setMaximized() { m_maximized = true; m_size = m_window->window()->geometry().size(); - set_maximized(0); + set_maximized(nullptr); } void QWaylandWlShellSurface::setFullscreen() { m_fullscreen = true; m_size = m_window->window()->geometry().size(); - set_fullscreen(WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, 0); + set_fullscreen(WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, nullptr); } void QWaylandWlShellSurface::setNormal() diff --git a/src/client/shellintegration/qwaylandshellintegrationplugin_p.h b/src/client/shellintegration/qwaylandshellintegrationplugin_p.h index 266e6980c..8ec9a5423 100644 --- a/src/client/shellintegration/qwaylandshellintegrationplugin_p.h +++ b/src/client/shellintegration/qwaylandshellintegrationplugin_p.h @@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShellIntegrationPlugin : public QObject { Q_OBJECT public: - explicit QWaylandShellIntegrationPlugin(QObject *parent = 0); + explicit QWaylandShellIntegrationPlugin(QObject *parent = nullptr); ~QWaylandShellIntegrationPlugin(); virtual QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) = 0; |