Use override when applicable
Applied automatic fixes using clang-tidy's modernize-use-override. This adds the "override" keyword where it's possible and also removes the "virtual" keyword when redundant. Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
parent
290e12e5a6
commit
bb409e849b
@ -70,7 +70,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegrationPlugin : public QOb
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandClientBufferIntegrationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandClientBufferIntegrationPlugin();
|
||||
~QWaylandClientBufferIntegrationPlugin() override;
|
||||
|
||||
virtual QWaylandClientBufferIntegration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
};
|
||||
|
@ -70,7 +70,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegrationPlugin : public QOb
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandServerBufferIntegrationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandServerBufferIntegrationPlugin();
|
||||
~QWaylandServerBufferIntegrationPlugin() override;
|
||||
|
||||
virtual QWaylandServerBufferIntegration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
};
|
||||
|
@ -70,7 +70,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDeviceIntegrationPlugin : public QObj
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandInputDeviceIntegrationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandInputDeviceIntegrationPlugin();
|
||||
~QWaylandInputDeviceIntegrationPlugin() override;
|
||||
|
||||
virtual QWaylandInputDeviceIntegration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
};
|
||||
|
@ -58,7 +58,7 @@ class QWaylandAbstractDecorationPrivate : public QObjectPrivate
|
||||
|
||||
public:
|
||||
QWaylandAbstractDecorationPrivate();
|
||||
~QWaylandAbstractDecorationPrivate();
|
||||
~QWaylandAbstractDecorationPrivate() override;
|
||||
|
||||
QWindow *m_window = nullptr;
|
||||
QWaylandWindow *m_wayland_window = nullptr;
|
||||
|
@ -85,7 +85,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandAbstractDecoration : public QObject
|
||||
Q_DECLARE_PRIVATE(QWaylandAbstractDecoration)
|
||||
public:
|
||||
QWaylandAbstractDecoration();
|
||||
virtual ~QWaylandAbstractDecoration();
|
||||
~QWaylandAbstractDecoration() override;
|
||||
|
||||
void setWaylandWindow(QWaylandWindow *window);
|
||||
QWaylandWindow *waylandWindow() const;
|
||||
|
@ -70,7 +70,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandClipboard : public QPlatformClipboard
|
||||
public:
|
||||
QWaylandClipboard(QWaylandDisplay *display);
|
||||
|
||||
~QWaylandClipboard();
|
||||
~QWaylandClipboard() override;
|
||||
|
||||
QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) override;
|
||||
void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) override;
|
||||
|
@ -73,7 +73,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandCursor : public QPlatformCursor
|
||||
{
|
||||
public:
|
||||
QWaylandCursor(QWaylandScreen *screen);
|
||||
~QWaylandCursor();
|
||||
~QWaylandCursor() override;
|
||||
|
||||
void changeCursor(QCursor *cursor, QWindow *window) override;
|
||||
void pointerEvent(const QMouseEvent &event) override;
|
||||
|
@ -80,7 +80,7 @@ class QWaylandDataDevice : public QObject, public QtWayland::wl_data_device
|
||||
Q_OBJECT
|
||||
public:
|
||||
QWaylandDataDevice(QWaylandDataDeviceManager *manager, QWaylandInputDevice *inputDevice);
|
||||
~QWaylandDataDevice();
|
||||
~QWaylandDataDevice() override;
|
||||
|
||||
QWaylandDataOffer *selectionOffer() const;
|
||||
void invalidateSelectionOffer();
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDataDeviceManager : public QtWayland::wl_d
|
||||
{
|
||||
public:
|
||||
QWaylandDataDeviceManager(QWaylandDisplay *display, uint32_t id);
|
||||
~QWaylandDataDeviceManager();
|
||||
~QWaylandDataDeviceManager() override;
|
||||
|
||||
QWaylandDataDevice *getDataDevice(QWaylandInputDevice *inputDevice);
|
||||
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDataOffer : public QtWayland::wl_data_offe
|
||||
{
|
||||
public:
|
||||
explicit QWaylandDataOffer(QWaylandDisplay *display, struct ::wl_data_offer *offer);
|
||||
~QWaylandDataOffer();
|
||||
~QWaylandDataOffer() override;
|
||||
|
||||
QString firstFormat() const;
|
||||
|
||||
@ -86,7 +86,7 @@ private:
|
||||
class QWaylandMimeData : public QInternalMimeData {
|
||||
public:
|
||||
explicit QWaylandMimeData(QWaylandDataOffer *dataOffer, QWaylandDisplay *display);
|
||||
~QWaylandMimeData();
|
||||
~QWaylandMimeData() override;
|
||||
|
||||
void appendFormat(const QString &mimeType);
|
||||
|
||||
|
@ -72,7 +72,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDataSource : public QObject, public QtWayl
|
||||
Q_OBJECT
|
||||
public:
|
||||
QWaylandDataSource(QWaylandDataDeviceManager *dataDeviceManager, QMimeData *mimeData);
|
||||
~QWaylandDataSource();
|
||||
~QWaylandDataSource() override;
|
||||
|
||||
QMimeData *mimeData() const;
|
||||
|
||||
|
@ -70,7 +70,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDecorationPlugin : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandDecorationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandDecorationPlugin();
|
||||
~QWaylandDecorationPlugin() override;
|
||||
|
||||
virtual QWaylandAbstractDecoration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
};
|
||||
|
@ -109,7 +109,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDisplay : public QObject, public QtWayland
|
||||
|
||||
public:
|
||||
QWaylandDisplay(QWaylandIntegration *waylandIntegration);
|
||||
~QWaylandDisplay(void);
|
||||
~QWaylandDisplay(void) override;
|
||||
|
||||
QList<QWaylandScreen *> screens() const { return mScreens; }
|
||||
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag
|
||||
{
|
||||
public:
|
||||
QWaylandDrag(QWaylandDisplay *display);
|
||||
~QWaylandDrag();
|
||||
~QWaylandDrag() override;
|
||||
|
||||
void updateTarget(const QString &mimeType);
|
||||
void setResponse(const QPlatformDragQtResponse &response);
|
||||
|
@ -70,7 +70,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandExtendedSurface : public QtWayland::qt_ext
|
||||
{
|
||||
public:
|
||||
QWaylandExtendedSurface(QWaylandWindow *window);
|
||||
~QWaylandExtendedSurface();
|
||||
~QWaylandExtendedSurface() override;
|
||||
|
||||
void setContentOrientationMask(Qt::ScreenOrientations mask);
|
||||
|
||||
|
@ -74,7 +74,7 @@ class QWaylandTextInput : public QtWayland::zwp_text_input_v2
|
||||
{
|
||||
public:
|
||||
QWaylandTextInput(QWaylandDisplay *display, struct ::zwp_text_input_v2 *text_input);
|
||||
~QWaylandTextInput();
|
||||
~QWaylandTextInput() override;
|
||||
|
||||
void reset();
|
||||
void commit();
|
||||
@ -132,7 +132,7 @@ class QWaylandInputContext : public QPlatformInputContext
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandInputContext(QWaylandDisplay *display);
|
||||
~QWaylandInputContext();
|
||||
~QWaylandInputContext() override;
|
||||
|
||||
bool isValid() const override;
|
||||
|
||||
|
@ -102,7 +102,7 @@ public:
|
||||
class Touch;
|
||||
|
||||
QWaylandInputDevice(QWaylandDisplay *display, int version, uint32_t id);
|
||||
~QWaylandInputDevice();
|
||||
~QWaylandInputDevice() override;
|
||||
|
||||
uint32_t capabilities() const { return mCaps; }
|
||||
|
||||
@ -187,7 +187,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Keyboard : public QObject, pu
|
||||
|
||||
public:
|
||||
Keyboard(QWaylandInputDevice *p);
|
||||
virtual ~Keyboard();
|
||||
~Keyboard() override;
|
||||
|
||||
void stopRepeat();
|
||||
|
||||
@ -247,7 +247,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Pointer : public QtWayland::w
|
||||
|
||||
public:
|
||||
Pointer(QWaylandInputDevice *p);
|
||||
virtual ~Pointer();
|
||||
~Pointer() override;
|
||||
|
||||
void pointer_enter(uint32_t serial, struct wl_surface *surface,
|
||||
wl_fixed_t sx, wl_fixed_t sy) override;
|
||||
@ -281,7 +281,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Touch : public QtWayland::wl_
|
||||
{
|
||||
public:
|
||||
Touch(QWaylandInputDevice *p);
|
||||
virtual ~Touch();
|
||||
~Touch() override;
|
||||
|
||||
void touch_down(uint32_t serial,
|
||||
uint32_t time,
|
||||
|
@ -71,7 +71,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandIntegration : public QPlatformIntegration
|
||||
{
|
||||
public:
|
||||
QWaylandIntegration();
|
||||
~QWaylandIntegration();
|
||||
~QWaylandIntegration() override;
|
||||
|
||||
bool hasFailed() { return mFailed; }
|
||||
|
||||
|
@ -67,7 +67,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandScreen : public QPlatformScreen, QtWayland
|
||||
{
|
||||
public:
|
||||
QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id);
|
||||
~QWaylandScreen();
|
||||
~QWaylandScreen() override;
|
||||
|
||||
void init();
|
||||
QWaylandDisplay *display() const;
|
||||
|
@ -74,7 +74,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShellSurface : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandShellSurface(QWaylandWindow *window);
|
||||
virtual ~QWaylandShellSurface() {}
|
||||
~QWaylandShellSurface() override {}
|
||||
virtual void resize(QWaylandInputDevice * /*inputDevice*/, enum wl_shell_surface_resize /*edges*/)
|
||||
{}
|
||||
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShm : public QtWayland::wl_shm
|
||||
public:
|
||||
|
||||
QWaylandShm(QWaylandDisplay *display, int version, uint32_t id);
|
||||
~QWaylandShm();
|
||||
~QWaylandShm() override;
|
||||
|
||||
bool formatSupported(wl_shm_format format) const;
|
||||
bool formatSupported(QImage::Format format) const;
|
||||
@ -78,7 +78,7 @@ public:
|
||||
static QImage::Format formatFrom(wl_shm_format format);
|
||||
|
||||
protected:
|
||||
virtual void shm_format(uint32_t format);
|
||||
void shm_format(uint32_t format) override;
|
||||
|
||||
private:
|
||||
QVector<uint32_t> m_formats;
|
||||
|
@ -71,7 +71,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShmBuffer : public QWaylandBuffer {
|
||||
public:
|
||||
QWaylandShmBuffer(QWaylandDisplay *display,
|
||||
const QSize &size, QImage::Format format, int scale = 1);
|
||||
~QWaylandShmBuffer();
|
||||
~QWaylandShmBuffer() override;
|
||||
QSize size() const override { return mImage.size(); }
|
||||
int scale() const override { return int(mImage.devicePixelRatio()); }
|
||||
QImage *image() { return &mImage; }
|
||||
@ -88,7 +88,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShmBackingStore : public QPlatformBackingS
|
||||
{
|
||||
public:
|
||||
QWaylandShmBackingStore(QWindow *window);
|
||||
~QWaylandShmBackingStore();
|
||||
~QWaylandShmBackingStore() override;
|
||||
|
||||
QPaintDevice *paintDevice() override;
|
||||
void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override;
|
||||
|
@ -62,7 +62,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShmWindow : public QWaylandWindow
|
||||
{
|
||||
public:
|
||||
QWaylandShmWindow(QWindow *window);
|
||||
~QWaylandShmWindow();
|
||||
~QWaylandShmWindow() override;
|
||||
|
||||
WindowType windowType() const override;
|
||||
QSurfaceFormat format() const override { return QSurfaceFormat(); }
|
||||
|
@ -70,7 +70,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandSubSurface : public QtWayland::wl_subsurfa
|
||||
{
|
||||
public:
|
||||
QWaylandSubSurface(QWaylandWindow *window, QWaylandWindow *parent, ::wl_subsurface *subsurface);
|
||||
~QWaylandSubSurface();
|
||||
~QWaylandSubSurface() override;
|
||||
|
||||
QWaylandWindow *window() const { return m_window; }
|
||||
QWaylandWindow *parent() const { return m_parent; }
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
};
|
||||
|
||||
QWaylandWindow(QWindow *window);
|
||||
~QWaylandWindow();
|
||||
~QWaylandWindow() override;
|
||||
|
||||
virtual WindowType windowType() const = 0;
|
||||
virtual void ensureSize();
|
||||
|
@ -75,7 +75,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandWindowManagerIntegration : public QObject,
|
||||
Q_DECLARE_PRIVATE(QWaylandWindowManagerIntegration)
|
||||
public:
|
||||
explicit QWaylandWindowManagerIntegration(QWaylandDisplay *waylandDisplay);
|
||||
virtual ~QWaylandWindowManagerIntegration();
|
||||
~QWaylandWindowManagerIntegration() override;
|
||||
|
||||
bool openUrl(const QUrl &url) override;
|
||||
bool openDocument(const QUrl &url) override;
|
||||
|
@ -75,7 +75,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandWlShellSurface : public QWaylandShellSurfa
|
||||
Q_OBJECT
|
||||
public:
|
||||
QWaylandWlShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window);
|
||||
virtual ~QWaylandWlShellSurface();
|
||||
~QWaylandWlShellSurface() override;
|
||||
|
||||
using QtWayland::wl_shell_surface::resize;
|
||||
void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
|
||||
|
@ -72,7 +72,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgPopup : public QWaylandShellSurface
|
||||
Q_OBJECT
|
||||
public:
|
||||
QWaylandXdgPopup(struct ::xdg_popup *popup, QWaylandWindow *window);
|
||||
virtual ~QWaylandXdgPopup();
|
||||
~QWaylandXdgPopup() override;
|
||||
|
||||
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShell : public QtWayland::xdg_shell
|
||||
public:
|
||||
QWaylandXdgShell(struct ::xdg_shell *shell);
|
||||
QWaylandXdgShell(struct ::wl_registry *registry, uint32_t id);
|
||||
virtual ~QWaylandXdgShell();
|
||||
~QWaylandXdgShell() override;
|
||||
|
||||
QWaylandXdgSurface *createXdgSurface(QWaylandWindow *window);
|
||||
QWaylandXdgPopup *createXdgPopup(QWaylandWindow *window);
|
||||
|
@ -75,7 +75,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgSurfaceV6 : public QWaylandShellSurface
|
||||
{
|
||||
public:
|
||||
QWaylandXdgSurfaceV6(QWaylandXdgShellV6 *shell, ::zxdg_surface_v6 *surface, QWaylandWindow *window);
|
||||
~QWaylandXdgSurfaceV6();
|
||||
~QWaylandXdgSurfaceV6() override;
|
||||
|
||||
void resize(QWaylandInputDevice *inputDevice, enum zxdg_toplevel_v6_resize_edge edges);
|
||||
void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
|
||||
@ -94,7 +94,7 @@ private:
|
||||
{
|
||||
public:
|
||||
Toplevel(QWaylandXdgSurfaceV6 *xdgSurface);
|
||||
~Toplevel();
|
||||
~Toplevel() override;
|
||||
|
||||
void applyConfigure();
|
||||
|
||||
@ -112,7 +112,7 @@ private:
|
||||
class Popup : public QtWayland::zxdg_popup_v6 {
|
||||
public:
|
||||
Popup(QWaylandXdgSurfaceV6 *xdgSurface, QWaylandXdgSurfaceV6 *parent, QtWayland::zxdg_positioner_v6 *positioner);
|
||||
~Popup();
|
||||
~Popup() override;
|
||||
|
||||
void applyConfigure();
|
||||
void zxdg_popup_v6_popup_done() override;
|
||||
@ -138,7 +138,7 @@ public:
|
||||
|
||||
QWaylandXdgSurfaceV6 *getXdgSurface(QWaylandWindow *window);
|
||||
|
||||
virtual ~QWaylandXdgShellV6();
|
||||
~QWaylandXdgShellV6() override;
|
||||
|
||||
private:
|
||||
void zxdg_shell_v6_ping(uint32_t serial) override;
|
||||
|
@ -77,7 +77,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgSurface : public QWaylandShellSurface
|
||||
Q_OBJECT
|
||||
public:
|
||||
QWaylandXdgSurface(QWaylandXdgShell *shell, QWaylandWindow *window);
|
||||
virtual ~QWaylandXdgSurface();
|
||||
~QWaylandXdgSurface() override;
|
||||
|
||||
using QtWayland::xdg_surface::resize;
|
||||
void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges);
|
||||
|
@ -70,7 +70,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShellIntegrationPlugin : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandShellIntegrationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandShellIntegrationPlugin();
|
||||
~QWaylandShellIntegrationPlugin() override;
|
||||
|
||||
virtual QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
};
|
||||
|
@ -54,35 +54,35 @@ public:
|
||||
create();
|
||||
}
|
||||
|
||||
void focusInEvent(QFocusEvent *)
|
||||
void focusInEvent(QFocusEvent *) override
|
||||
{
|
||||
++focusInEventCount;
|
||||
}
|
||||
|
||||
void focusOutEvent(QFocusEvent *)
|
||||
void focusOutEvent(QFocusEvent *) override
|
||||
{
|
||||
++focusOutEventCount;
|
||||
}
|
||||
|
||||
void keyPressEvent(QKeyEvent *event)
|
||||
void keyPressEvent(QKeyEvent *event) override
|
||||
{
|
||||
++keyPressEventCount;
|
||||
keyCode = event->nativeScanCode();
|
||||
}
|
||||
|
||||
void keyReleaseEvent(QKeyEvent *event)
|
||||
void keyReleaseEvent(QKeyEvent *event) override
|
||||
{
|
||||
++keyReleaseEventCount;
|
||||
keyCode = event->nativeScanCode();
|
||||
}
|
||||
|
||||
void mousePressEvent(QMouseEvent *event)
|
||||
void mousePressEvent(QMouseEvent *event) override
|
||||
{
|
||||
++mousePressEventCount;
|
||||
mousePressPos = event->pos();
|
||||
}
|
||||
|
||||
void mouseReleaseEvent(QMouseEvent *)
|
||||
void mouseReleaseEvent(QMouseEvent *) override
|
||||
{
|
||||
++mouseReleaseEventCount;
|
||||
}
|
||||
@ -401,7 +401,7 @@ public:
|
||||
cursorImage.fill(Qt::blue);
|
||||
m_dragIcon = QPixmap::fromImage(cursorImage);
|
||||
}
|
||||
~DndWindow(){}
|
||||
~DndWindow() override{}
|
||||
QPoint frameOffset() const { return QPoint(frameMargins().left(), frameMargins().top()); }
|
||||
bool dragStarted = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user