diff options
Diffstat (limited to 'src/gui/kernel')
30 files changed, 88 insertions, 86 deletions
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h index ccce3d84ef..d62ee7a053 100644 --- a/src/gui/kernel/qcursor.h +++ b/src/gui/kernel/qcursor.h @@ -87,7 +87,7 @@ public: ~QCursor(); QCursor &operator=(const QCursor &cursor); #ifdef Q_COMPILER_RVALUE_REFS - QCursor(QCursor &&other) Q_DECL_NOTHROW : d(other.d) { other.d = Q_NULLPTR; } + QCursor(QCursor &&other) Q_DECL_NOTHROW : d(other.d) { other.d = nullptr; } inline QCursor &operator=(QCursor &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h index eaf6c74fd4..e7d83cbbaf 100644 --- a/src/gui/kernel/qdnd_p.h +++ b/src/gui/kernel/qdnd_p.h @@ -77,8 +77,8 @@ public: QInternalMimeData(); ~QInternalMimeData(); - bool hasFormat(const QString &mimeType) const Q_DECL_OVERRIDE; - QStringList formats() const Q_DECL_OVERRIDE; + bool hasFormat(const QString &mimeType) const override; + QStringList formats() const override; static bool canReadData(const QString &mimeType); @@ -87,7 +87,7 @@ public: static QByteArray renderDataHelper(const QString &mimeType, const QMimeData *data); protected: - QVariant retrieveData(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE; + QVariant retrieveData(const QString &mimeType, QVariant::Type type) const override; virtual bool hasFormat_sys(const QString &mimeType) const = 0; virtual QStringList formats_sys() const = 0; diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index a6f97a21dc..c3c7e52ece 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -725,7 +725,7 @@ class Q_GUI_EXPORT QActionEvent : public QEvent { QAction *act, *bef; public: - QActionEvent(int type, QAction *action, QAction *before = Q_NULLPTR); + QActionEvent(int type, QAction *action, QAction *before = nullptr); ~QActionEvent(); inline QAction *action() const { return act; } @@ -853,7 +853,7 @@ public: TouchPoint(const TouchPoint &other); #ifdef Q_COMPILER_RVALUE_REFS TouchPoint(TouchPoint &&other) Q_DECL_NOEXCEPT - : d(Q_NULLPTR) + : d(nullptr) { qSwap(d, other.d); } TouchPoint &operator=(TouchPoint &&other) Q_DECL_NOEXCEPT { qSwap(d, other.d); return *this; } @@ -941,7 +941,7 @@ public: #endif explicit QTouchEvent(QEvent::Type eventType, - QTouchDevice *device = Q_NULLPTR, + QTouchDevice *device = nullptr, Qt::KeyboardModifiers modifiers = Qt::NoModifier, Qt::TouchPointStates touchPointStates = Qt::TouchPointStates(), const QList<QTouchEvent::TouchPoint> &touchPoints = QList<QTouchEvent::TouchPoint>()); diff --git a/src/gui/kernel/qgenericplugin.h b/src/gui/kernel/qgenericplugin.h index e8aa2e6f32..69b4f29854 100644 --- a/src/gui/kernel/qgenericplugin.h +++ b/src/gui/kernel/qgenericplugin.h @@ -52,7 +52,7 @@ class Q_GUI_EXPORT QGenericPlugin : public QObject { Q_OBJECT public: - explicit QGenericPlugin(QObject *parent = Q_NULLPTR); + explicit QGenericPlugin(QObject *parent = nullptr); ~QGenericPlugin(); virtual QObject* create(const QString& name, const QString &spec) = 0; diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index b26567ad0c..35332831d4 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -190,7 +190,7 @@ QWindow *QGuiApplicationPrivate::focus_window = 0; static QBasicMutex applicationFontMutex; QFont *QGuiApplicationPrivate::app_font = 0; -QStyleHints *QGuiApplicationPrivate::styleHints = Q_NULLPTR; +QStyleHints *QGuiApplicationPrivate::styleHints = nullptr; bool QGuiApplicationPrivate::obey_desktop_settings = true; QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = 0; @@ -748,7 +748,7 @@ QString QGuiApplication::desktopFileName() */ QWindow *QGuiApplication::modalWindow() { - CHECK_QAPP_INSTANCE(Q_NULLPTR) + CHECK_QAPP_INSTANCE(nullptr) if (QGuiApplicationPrivate::self->modalWindowList.isEmpty()) return 0; return QGuiApplicationPrivate::self->modalWindowList.first(); @@ -1527,7 +1527,7 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate() cleanupThreadData(); delete QGuiApplicationPrivate::styleHints; - QGuiApplicationPrivate::styleHints = Q_NULLPTR; + QGuiApplicationPrivate::styleHints = nullptr; delete inputMethod; qt_cleanupFontDatabase(); @@ -1650,10 +1650,10 @@ QFunctionPointer QGuiApplication::platformFunction(const QByteArray &function) QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); if (!pi) { qWarning("QGuiApplication::platformFunction(): Must construct a QGuiApplication before accessing a platform function"); - return Q_NULLPTR; + return nullptr; } - return pi->nativeInterface() ? pi->nativeInterface()->platformFunction(function) : Q_NULLPTR; + return pi->nativeInterface() ? pi->nativeInterface()->platformFunction(function) : nullptr; } /*! @@ -2349,7 +2349,7 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T localValid = false; } if (type == QEvent::TabletRelease) - pointData.target = Q_NULLPTR; + pointData.target = nullptr; if (!window) return; } @@ -3506,7 +3506,7 @@ Qt::LayoutDirection QGuiApplication::layoutDirection() #ifndef QT_NO_CURSOR QCursor *QGuiApplication::overrideCursor() { - CHECK_QAPP_INSTANCE(Q_NULLPTR) + CHECK_QAPP_INSTANCE(nullptr) return qGuiApp->d_func()->cursor_list.isEmpty() ? 0 : &qGuiApp->d_func()->cursor_list.first(); } @@ -3706,7 +3706,7 @@ bool QGuiApplication::desktopSettingsAware() */ QInputMethod *QGuiApplication::inputMethod() { - CHECK_QAPP_INSTANCE(Q_NULLPTR) + CHECK_QAPP_INSTANCE(nullptr) if (!qGuiApp->d_func()->inputMethod) qGuiApp->d_func()->inputMethod = new QInputMethod(); return qGuiApp->d_func()->inputMethod; diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h index e130553b9d..8560fcf18a 100644 --- a/src/gui/kernel/qguiapplication.h +++ b/src/gui/kernel/qguiapplication.h @@ -157,7 +157,7 @@ public: static Qt::ApplicationState applicationState(); static int exec(); - bool notify(QObject *, QEvent *) Q_DECL_OVERRIDE; + bool notify(QObject *, QEvent *) override; #ifndef QT_NO_SESSIONMANAGER // session management @@ -189,8 +189,8 @@ Q_SIGNALS: void applicationDisplayNameChanged(); protected: - bool event(QEvent *) Q_DECL_OVERRIDE; - bool compressEvent(QEvent *, QObject *receiver, QPostEventList *) Q_DECL_OVERRIDE; + bool event(QEvent *) override; + bool compressEvent(QEvent *, QObject *receiver, QPostEventList *) override; QGuiApplication(QGuiApplicationPrivate &p); diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 014ed861df..b7b847785c 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -85,13 +85,13 @@ public: void init(); void createPlatformIntegration(); - void createEventDispatcher() Q_DECL_OVERRIDE; - void eventDispatcherReady() Q_DECL_OVERRIDE; + void createEventDispatcher() override; + void eventDispatcherReady() override; virtual void notifyLayoutDirectionChange(); virtual void notifyActiveWindowChange(QWindow *previous); - virtual bool shouldQuit() Q_DECL_OVERRIDE; + virtual bool shouldQuit() override; bool shouldQuitInternal(const QWindowList &processedWindows); virtual bool tryCloseAllWindows(); @@ -213,7 +213,7 @@ public: static bool highDpiScalingUpdated; struct TabletPointData { - TabletPointData(qint64 devId = 0) : deviceId(devId), state(Qt::NoButton), target(Q_NULLPTR) {} + TabletPointData(qint64 devId = 0) : deviceId(devId), state(Qt::NoButton), target(nullptr) {} qint64 deviceId; Qt::MouseButtons state; QWindow *target; diff --git a/src/gui/kernel/qoffscreensurface.h b/src/gui/kernel/qoffscreensurface.h index 3295ae0d40..9d4839cb25 100644 --- a/src/gui/kernel/qoffscreensurface.h +++ b/src/gui/kernel/qoffscreensurface.h @@ -59,10 +59,10 @@ class Q_GUI_EXPORT QOffscreenSurface : public QObject, public QSurface public: // ### Qt 6: merge overloads explicit QOffscreenSurface(QScreen *screen, QObject *parent); - explicit QOffscreenSurface(QScreen *screen = Q_NULLPTR); + explicit QOffscreenSurface(QScreen *screen = nullptr); virtual ~QOffscreenSurface(); - SurfaceType surfaceType() const Q_DECL_OVERRIDE; + SurfaceType surfaceType() const override; void create(); void destroy(); @@ -70,10 +70,10 @@ public: bool isValid() const; void setFormat(const QSurfaceFormat &format); - QSurfaceFormat format() const Q_DECL_OVERRIDE; + QSurfaceFormat format() const override; QSurfaceFormat requestedFormat() const; - QSize size() const Q_DECL_OVERRIDE; + QSize size() const override; QScreen *screen() const; void setScreen(QScreen *screen); @@ -91,7 +91,7 @@ private Q_SLOTS: private: - QPlatformSurface *surfaceHandle() const Q_DECL_OVERRIDE; + QPlatformSurface *surfaceHandle() const override; Q_DISABLE_COPY(QOffscreenSurface) }; diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h index 07153db84e..9cfaa52f17 100644 --- a/src/gui/kernel/qopenglcontext.h +++ b/src/gui/kernel/qopenglcontext.h @@ -151,7 +151,7 @@ class Q_GUI_EXPORT QOpenGLContext : public QObject Q_OBJECT Q_DECLARE_PRIVATE(QOpenGLContext) public: - explicit QOpenGLContext(QObject *parent = Q_NULLPTR); + explicit QOpenGLContext(QObject *parent = nullptr); ~QOpenGLContext(); void setFormat(const QSurfaceFormat &format); diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index 64bf55beee..c5239af69e 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -114,12 +114,12 @@ public: GLuint id() const { return m_id; } protected: - void invalidateResource() Q_DECL_OVERRIDE + void invalidateResource() override { m_id = 0; } - void freeResource(QOpenGLContext *context) Q_DECL_OVERRIDE; + void freeResource(QOpenGLContext *context) override; private: GLuint m_id; @@ -213,7 +213,7 @@ public: , workaround_missingPrecisionQualifiers(false) , active_engine(0) , qgl_current_fbo_invalid(false) - , qgl_current_fbo(Q_NULLPTR) + , qgl_current_fbo(nullptr) , defaultFboRedirect(0) { requestedFormat = QSurfaceFormat::defaultFormat(); @@ -266,7 +266,7 @@ public: static QOpenGLContextPrivate *get(QOpenGLContext *context) { - return context ? context->d_func() : Q_NULLPTR; + return context ? context->d_func() : nullptr; } #if !defined(QT_NO_DEBUG) diff --git a/src/gui/kernel/qopenglwindow.cpp b/src/gui/kernel/qopenglwindow.cpp index 5170c7ab63..cf3d712421 100644 --- a/src/gui/kernel/qopenglwindow.cpp +++ b/src/gui/kernel/qopenglwindow.cpp @@ -163,7 +163,7 @@ class QOpenGLWindowPaintDevice : public QOpenGLPaintDevice { public: QOpenGLWindowPaintDevice(QOpenGLWindow *window) : m_window(window) { } - void ensureActiveTarget() Q_DECL_OVERRIDE; + void ensureActiveTarget() override; QOpenGLWindow *m_window; }; @@ -188,9 +188,9 @@ public: void bindFBO(); void initialize(); - void beginPaint(const QRegion ®ion) Q_DECL_OVERRIDE; - void endPaint() Q_DECL_OVERRIDE; - void flush(const QRegion ®ion) Q_DECL_OVERRIDE; + void beginPaint(const QRegion ®ion) override; + void endPaint() override; + void flush(const QRegion ®ion) override; QOpenGLWindow::UpdateBehavior updateBehavior; bool hasFboBlit; @@ -344,7 +344,7 @@ void QOpenGLWindowPaintDevice::ensureActiveTarget() \sa QOpenGLWindow::UpdateBehavior */ QOpenGLWindow::QOpenGLWindow(QOpenGLWindow::UpdateBehavior updateBehavior, QWindow *parent) - : QPaintDeviceWindow(*(new QOpenGLWindowPrivate(Q_NULLPTR, updateBehavior)), parent) + : QPaintDeviceWindow(*(new QOpenGLWindowPrivate(nullptr, updateBehavior)), parent) { setSurfaceType(QSurface::OpenGLSurface); } diff --git a/src/gui/kernel/qopenglwindow.h b/src/gui/kernel/qopenglwindow.h index fe236f9538..7b3bf004a3 100644 --- a/src/gui/kernel/qopenglwindow.h +++ b/src/gui/kernel/qopenglwindow.h @@ -64,8 +64,8 @@ public: PartialUpdateBlend }; - explicit QOpenGLWindow(UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = Q_NULLPTR); - explicit QOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = Q_NULLPTR); + explicit QOpenGLWindow(UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = nullptr); + explicit QOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = nullptr); ~QOpenGLWindow(); UpdateBehavior updateBehavior() const; @@ -91,10 +91,10 @@ protected: virtual void paintUnderGL(); virtual void paintOverGL(); - void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; - void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; - int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE; - QPaintDevice *redirected(QPoint *) const Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *event) override; + void resizeEvent(QResizeEvent *event) override; + int metric(PaintDeviceMetric metric) const override; + QPaintDevice *redirected(QPoint *) const override; private: Q_DISABLE_COPY(QOpenGLWindow) diff --git a/src/gui/kernel/qpaintdevicewindow.h b/src/gui/kernel/qpaintdevicewindow.h index 81b41dcdd5..3be078132f 100644 --- a/src/gui/kernel/qpaintdevicewindow.h +++ b/src/gui/kernel/qpaintdevicewindow.h @@ -68,14 +68,14 @@ public Q_SLOTS: protected: virtual void paintEvent(QPaintEvent *event); - int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE; - void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE; - bool event(QEvent *event) Q_DECL_OVERRIDE; + int metric(PaintDeviceMetric metric) const override; + void exposeEvent(QExposeEvent *) override; + bool event(QEvent *event) override; QPaintDeviceWindow(QPaintDeviceWindowPrivate &dd, QWindow *parent); private: - QPaintEngine *paintEngine() const Q_DECL_OVERRIDE; + QPaintEngine *paintEngine() const override; Q_DISABLE_COPY(QPaintDeviceWindow) }; diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h index d04fb1f0c5..71f3d0c3b8 100644 --- a/src/gui/kernel/qpalette.h +++ b/src/gui/kernel/qpalette.h @@ -70,7 +70,7 @@ public: #ifdef Q_COMPILER_RVALUE_REFS QPalette(QPalette &&other) Q_DECL_NOTHROW : d(other.d), data(other.data) - { other.d = Q_NULLPTR; } + { other.d = nullptr; } inline QPalette &operator=(QPalette &&other) Q_DECL_NOEXCEPT { for_faster_swapping_dont_use = other.for_faster_swapping_dont_use; diff --git a/src/gui/kernel/qplatformgraphicsbuffer.cpp b/src/gui/kernel/qplatformgraphicsbuffer.cpp index d42231e958..cc01efd6db 100644 --- a/src/gui/kernel/qplatformgraphicsbuffer.cpp +++ b/src/gui/kernel/qplatformgraphicsbuffer.cpp @@ -217,7 +217,7 @@ void QPlatformGraphicsBuffer::unlock() the memory returned when not having a SWWriteAccess. */ const uchar *QPlatformGraphicsBuffer::data() const -{ return Q_NULLPTR; } +{ return nullptr; } /*! Accessor for the bytes of the buffer. This function needs to be called on a @@ -226,7 +226,7 @@ const uchar *QPlatformGraphicsBuffer::data() const */ uchar *QPlatformGraphicsBuffer::data() { - return Q_NULLPTR; + return nullptr; } /*! diff --git a/src/gui/kernel/qplatformgraphicsbufferhelper.h b/src/gui/kernel/qplatformgraphicsbufferhelper.h index 5b7daff65a..6307f54a3e 100644 --- a/src/gui/kernel/qplatformgraphicsbufferhelper.h +++ b/src/gui/kernel/qplatformgraphicsbufferhelper.h @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE namespace QPlatformGraphicsBufferHelper { bool lockAndBindToTexture(QPlatformGraphicsBuffer *graphicsBuffer, bool *swizzleRandB, bool *premultipliedB, const QRect &rect = QRect()); - bool bindSWToTexture(const QPlatformGraphicsBuffer *graphicsBuffer, bool *swizzleRandB = Q_NULLPTR, bool *premultipliedB = Q_NULLPTR, const QRect &rect = QRect()); + bool bindSWToTexture(const QPlatformGraphicsBuffer *graphicsBuffer, bool *swizzleRandB = nullptr, bool *premultipliedB = nullptr, const QRect &rect = QRect()); } QT_END_NAMESPACE diff --git a/src/gui/kernel/qplatformnativeinterface.cpp b/src/gui/kernel/qplatformnativeinterface.cpp index 6614d45b12..b24541d3ec 100644 --- a/src/gui/kernel/qplatformnativeinterface.cpp +++ b/src/gui/kernel/qplatformnativeinterface.cpp @@ -92,7 +92,7 @@ void *QPlatformNativeInterface::nativeResourceForCursor(const QByteArray &resour { Q_UNUSED(resource); Q_UNUSED(cursor); - return Q_NULLPTR; + return nullptr; } #endif // !QT_NO_CURSOR @@ -129,7 +129,7 @@ QPlatformNativeInterface::NativeResourceForBackingStoreFunction QPlatformNativeI QFunctionPointer QPlatformNativeInterface::platformFunction(const QByteArray &function) const { Q_UNUSED(function); - return Q_NULLPTR; + return nullptr; } /*! diff --git a/src/gui/kernel/qplatformoffscreensurface.cpp b/src/gui/kernel/qplatformoffscreensurface.cpp index 9d35b37c6a..c2952e166c 100644 --- a/src/gui/kernel/qplatformoffscreensurface.cpp +++ b/src/gui/kernel/qplatformoffscreensurface.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtGui module of the Qt Toolkit. diff --git a/src/gui/kernel/qplatformoffscreensurface.h b/src/gui/kernel/qplatformoffscreensurface.h index be15a98e28..cef0fab7e1 100644 --- a/src/gui/kernel/qplatformoffscreensurface.h +++ b/src/gui/kernel/qplatformoffscreensurface.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtGui module of the Qt Toolkit. @@ -68,7 +68,7 @@ public: QOffscreenSurface *offscreenSurface() const; - QPlatformScreen *screen() const; + QPlatformScreen *screen() const override; virtual QSurfaceFormat format() const override; virtual bool isValid() const; diff --git a/src/gui/kernel/qplatformsurface.h b/src/gui/kernel/qplatformsurface.h index 5a1e4fe82d..76e8767a05 100644 --- a/src/gui/kernel/qplatformsurface.h +++ b/src/gui/kernel/qplatformsurface.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtGui module of the Qt Toolkit. @@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE +class QPlatformScreen; class Q_GUI_EXPORT QPlatformSurface { @@ -64,6 +65,7 @@ public: virtual QSurfaceFormat format() const = 0; QSurface *surface() const; + virtual QPlatformScreen *screen() const = 0; private: explicit QPlatformSurface(QSurface *surface); diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index ae39411729..2284290d6c 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -104,7 +104,7 @@ QPlatformWindow *QPlatformWindow::parent() const QPlatformScreen *QPlatformWindow::screen() const { QScreen *scr = window()->screen(); - return scr ? scr->handle() : Q_NULLPTR; + return scr ? scr->handle() : nullptr; } /*! diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h index dff8f618e2..4105ef1c1a 100644 --- a/src/gui/kernel/qplatformwindow.h +++ b/src/gui/kernel/qplatformwindow.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtGui module of the Qt Toolkit. @@ -79,7 +79,7 @@ public: QWindow *window() const; QPlatformWindow *parent() const; - QPlatformScreen *screen() const; + QPlatformScreen *screen() const override; virtual QSurfaceFormat format() const override; diff --git a/src/gui/kernel/qrasterwindow.cpp b/src/gui/kernel/qrasterwindow.cpp index 73871e0f39..d06fee62cf 100644 --- a/src/gui/kernel/qrasterwindow.cpp +++ b/src/gui/kernel/qrasterwindow.cpp @@ -70,7 +70,7 @@ class QRasterWindowPrivate : public QPaintDeviceWindowPrivate { Q_DECLARE_PUBLIC(QRasterWindow) public: - void beginPaint(const QRegion ®ion) Q_DECL_OVERRIDE + void beginPaint(const QRegion ®ion) override { Q_Q(QRasterWindow); const QSize size = q->size(); @@ -81,12 +81,12 @@ public: backingstore->beginPaint(region); } - void endPaint() Q_DECL_OVERRIDE + void endPaint() override { backingstore->endPaint(); } - void flush(const QRegion ®ion) Q_DECL_OVERRIDE + void flush(const QRegion ®ion) override { Q_Q(QRasterWindow); backingstore->flush(region, q); diff --git a/src/gui/kernel/qrasterwindow.h b/src/gui/kernel/qrasterwindow.h index 9b29183ad6..9fe01c076b 100644 --- a/src/gui/kernel/qrasterwindow.h +++ b/src/gui/kernel/qrasterwindow.h @@ -53,12 +53,12 @@ class Q_GUI_EXPORT QRasterWindow : public QPaintDeviceWindow Q_DECLARE_PRIVATE(QRasterWindow) public: - explicit QRasterWindow(QWindow *parent = Q_NULLPTR); + explicit QRasterWindow(QWindow *parent = nullptr); ~QRasterWindow(); protected: - int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE; - QPaintDevice *redirected(QPoint *) const Q_DECL_OVERRIDE; + int metric(PaintDeviceMetric metric) const override; + QPaintDevice *redirected(QPoint *) const override; private: Q_DISABLE_COPY(QRasterWindow) diff --git a/src/gui/kernel/qshapedpixmapdndwindow_p.h b/src/gui/kernel/qshapedpixmapdndwindow_p.h index 2c25ca7c76..477938867c 100644 --- a/src/gui/kernel/qshapedpixmapdndwindow_p.h +++ b/src/gui/kernel/qshapedpixmapdndwindow_p.h @@ -71,7 +71,7 @@ public: void updateGeometry(const QPoint &pos); protected: - void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *) override; private: QPixmap m_pixmap; diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp index 99aaed0444..1b56c7d9f2 100644 --- a/src/gui/kernel/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -97,7 +97,7 @@ QBasicDrag::QBasicDrag() : m_restoreCursor(false), m_eventLoop(0), m_executed_drop_action(Qt::IgnoreAction), m_can_drop(false), m_drag(0), m_drag_icon_window(0), m_useCompositing(true), - m_screen(Q_NULLPTR) + m_screen(nullptr) { } diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h index 45c13e43b2..4db8eb4505 100644 --- a/src/gui/kernel/qsimpledrag_p.h +++ b/src/gui/kernel/qsimpledrag_p.h @@ -72,10 +72,10 @@ class Q_GUI_EXPORT QBasicDrag : public QPlatformDrag, public QObject public: virtual ~QBasicDrag(); - virtual Qt::DropAction drag(QDrag *drag) Q_DECL_OVERRIDE; - void cancelDrag() Q_DECL_OVERRIDE; + virtual Qt::DropAction drag(QDrag *drag) override; + void cancelDrag() override; - virtual bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE; + virtual bool eventFilter(QObject *o, QEvent *e) override; protected: QBasicDrag(); @@ -127,10 +127,10 @@ public: QSimpleDrag(); protected: - virtual void startDrag() Q_DECL_OVERRIDE; - virtual void cancel() Q_DECL_OVERRIDE; - virtual void move(const QPoint &globalPos) Q_DECL_OVERRIDE; - virtual void drop(const QPoint &globalPos) Q_DECL_OVERRIDE; + virtual void startDrag() override; + virtual void cancel() override; + virtual void move(const QPoint &globalPos) override; + virtual void drop(const QPoint &globalPos) override; private: QWindow *m_current_window; diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 44ff054fa3..ac5543f884 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -141,12 +141,12 @@ public: }; Q_ENUM(AncestorMode) - explicit QWindow(QScreen *screen = Q_NULLPTR); + explicit QWindow(QScreen *screen = nullptr); explicit QWindow(QWindow *parent); virtual ~QWindow(); void setSurfaceType(SurfaceType surfaceType); - SurfaceType surfaceType() const Q_DECL_OVERRIDE; + SurfaceType surfaceType() const override; bool isVisible() const; @@ -168,7 +168,7 @@ public: void setModality(Qt::WindowModality modality); void setFormat(const QSurfaceFormat &format); - QSurfaceFormat format() const Q_DECL_OVERRIDE; + QSurfaceFormat format() const override; QSurfaceFormat requestedFormat() const; void setFlags(Qt::WindowFlags flags); @@ -231,7 +231,7 @@ public: inline int x() const { return geometry().x(); } inline int y() const { return geometry().y(); } - QSize size() const Q_DECL_OVERRIDE { return geometry().size(); } + QSize size() const override { return geometry().size(); } inline QPoint position() const { return geometry().topLeft(); } void setPosition(const QPoint &pt); @@ -347,7 +347,7 @@ protected: virtual void hideEvent(QHideEvent *); // TODO Qt 6 - add closeEvent virtual handler - virtual bool event(QEvent *) Q_DECL_OVERRIDE; + virtual bool event(QEvent *) override; virtual void keyPressEvent(QKeyEvent *); virtual void keyReleaseEvent(QKeyEvent *); virtual void mousePressEvent(QMouseEvent *); @@ -367,7 +367,7 @@ protected: private: Q_PRIVATE_SLOT(d_func(), void _q_clearAlert()) - QPlatformSurface *surfaceHandle() const Q_DECL_OVERRIDE; + QPlatformSurface *surfaceHandle() const override; Q_DISABLE_COPY(QWindow) @@ -380,12 +380,12 @@ private: #ifndef Q_QDOC template <> inline QWindow *qobject_cast<QWindow*>(QObject *o) { - if (!o || !o->isWindowType()) return Q_NULLPTR; + if (!o || !o->isWindowType()) return nullptr; return static_cast<QWindow*>(o); } template <> inline const QWindow *qobject_cast<const QWindow*>(const QObject *o) { - if (!o || !o->isWindowType()) return Q_NULLPTR; + if (!o || !o->isWindowType()) return nullptr; return static_cast<const QWindow*>(o); } #endif // !Q_QDOC diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index 1ded12d88d..b9d8200c43 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -166,7 +166,7 @@ public: template<typename Delivery = QWindowSystemInterface::DefaultDelivery> static void handleExposeEvent(QWindow *window, const QRegion ®ion); - static void handleCloseEvent(QWindow *window, bool *accepted = Q_NULLPTR); + static void handleCloseEvent(QWindow *window, bool *accepted = nullptr); template<typename Delivery = QWindowSystemInterface::DefaultDelivery> static void handleEnterEvent(QWindow *window, const QPointF &local = QPointF(), const QPointF& global = QPointF()); diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 6a1360a26a..c45d13cde6 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -513,7 +513,7 @@ public: static QList<QTouchEvent::TouchPoint> fromNativeTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points, - const QWindow *window, quint8 deviceId, QEvent::Type *type = Q_NULLPTR); + const QWindow *window, quint8 deviceId, QEvent::Type *type = nullptr); static QList<QWindowSystemInterface::TouchPoint> toNativeTouchPoints(const QList<QTouchEvent::TouchPoint>& pointList, const QWindow *window); |