Commit 98e814da authored by Albert Astals Cid's avatar Albert Astals Cid Committed by Albert Astals Cid

Enable override warnings (on gcc)

And add override markers as needed
parent 369544a3
......@@ -26,6 +26,12 @@ find_package(KF5 REQUIRED COMPONENTS
I18n
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" )
endif()
endif()
find_package(KF5DocTools)
include(ECMSetupVersion)
......
......@@ -55,7 +55,7 @@ public:
KeyClientEvent(int key, int pressed)
: m_key(key), m_pressed(pressed) {}
void fire(rfbClient*);
void fire(rfbClient*) override;
private:
int m_key;
......@@ -68,7 +68,7 @@ public:
PointerClientEvent(int x, int y, int buttonMask)
: m_x(x), m_y(y), m_buttonMask(buttonMask) {}
void fire(rfbClient*);
void fire(rfbClient*) override;
private:
int m_x;
......@@ -82,7 +82,7 @@ public:
explicit ClientCutEvent(const QString &text)
: text(text) {}
void fire(rfbClient*);
void fire(rfbClient*) override;
private:
QString text;
......@@ -148,7 +148,7 @@ public Q_SLOTS:
void clientCut(const QString &text);
protected:
void run();
void run() override;
private:
void setClientColorDepth(rfbClient *cl, ColorDepth cd);
......
......@@ -39,9 +39,9 @@ public:
RemoteView::Quality quality();
protected:
void acceptConfig();
void acceptConfig() override;
virtual QWidget* createProtocolSpecificConfigPage();
QWidget* createProtocolSpecificConfigPage() override;
private:
Ui::VncPreferences vncUi;
......
......@@ -36,8 +36,8 @@ public:
explicit VncPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
~VncPreferences();
virtual void save();
virtual void load();
void save() override;
void load() override;
};
......
......@@ -48,34 +48,34 @@ public:
explicit VncView(QWidget *parent = 0, const QUrl &url = QUrl(), KConfigGroup configGroup = KConfigGroup());
~VncView();
QSize framebufferSize();
QSize sizeHint() const;
QSize minimumSizeHint() const;
void startQuitting();
bool isQuitting();
bool start();
bool supportsScaling() const;
bool supportsLocalCursor() const;
bool supportsViewOnly() const;
QSize framebufferSize() override;
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
void startQuitting() override;
bool isQuitting() override;
bool start() override;
bool supportsScaling() const override;
bool supportsLocalCursor() const override;
bool supportsViewOnly() const override;
#ifndef QTONLY
HostPreferences* hostPreferences();
HostPreferences* hostPreferences() override;
#endif
void setViewOnly(bool viewOnly);
void showDotCursor(DotCursorState state);
void enableScaling(bool scale);
void setViewOnly(bool viewOnly) override;
void showDotCursor(DotCursorState state) override;
void enableScaling(bool scale) override;
virtual void updateConfiguration();
void updateConfiguration() override;
public Q_SLOTS:
void scaleResize(int w, int h);
void scaleResize(int w, int h) override;
protected:
void paintEvent(QPaintEvent *event);
bool event(QEvent *event);
void resizeEvent(QResizeEvent *event);
bool eventFilter(QObject *obj, QEvent *event);
void paintEvent(QPaintEvent *event) override;
bool event(QEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
bool eventFilter(QObject *obj, QEvent *event) override;
private:
VncClientThread vncThread;
......
......@@ -37,19 +37,19 @@ public:
virtual ~VncViewFactory();
virtual bool supportsUrl(const QUrl &url) const;
bool supportsUrl(const QUrl &url) const override;
virtual RemoteView *createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup);
RemoteView *createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup) override;
virtual HostPreferences *createHostPreferences(KConfigGroup configGroup, QWidget *parent);
HostPreferences *createHostPreferences(KConfigGroup configGroup, QWidget *parent) override;
virtual QString scheme() const;
QString scheme() const override;
virtual QString connectActionText() const;
QString connectActionText() const override;
virtual QString connectButtonText() const;
QString connectButtonText() const override;
virtual QString connectToolTipText() const;
QString connectToolTipText() const override;
};
#endif // VNCVIEWFACTORY_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment