aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-04-03 17:26:03 +0200
committerPierre Ossman <ossman@cendio.se>2024-06-24 13:47:18 +0200
commite3132b406de025ec4ecd612977425c7e7273ecf9 (patch)
tree815ab6630f84810b0e4c9b2c65917287b4e01692 /vncviewer
parent8530a1bd034feee8bd6e3a436887af187b058f2b (diff)
downloadtigervnc-e3132b406de025ec4ecd612977425c7e7273ecf9.tar.gz
tigervnc-e3132b406de025ec4ecd612977425c7e7273ecf9.zip
Mark overridden virtual functions
Use the new "override" keyword to properly differentiate between new virtual methods, and existing virtual methods being overridden.
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/CConn.h37
-rw-r--r--vncviewer/DesktopWindow.h8
-rw-r--r--vncviewer/EmulateMB.h2
-rw-r--r--vncviewer/GestureHandler.h2
-rw-r--r--vncviewer/MonitorIndicesParameter.h2
-rw-r--r--vncviewer/OptionsDialog.h2
-rw-r--r--vncviewer/PlatformPixelBuffer.h2
-rw-r--r--vncviewer/UserDialog.h4
-rw-r--r--vncviewer/Viewport.h8
-rw-r--r--vncviewer/Win32TouchHandler.h10
-rw-r--r--vncviewer/XInputTouchHandler.h12
-rw-r--r--vncviewer/fltk/Fl_Monitor_Arrangement.h2
-rw-r--r--vncviewer/fltk/Fl_Navigation.h2
13 files changed, 48 insertions, 45 deletions
diff --git a/vncviewer/CConn.h b/vncviewer/CConn.h
index 835699e5..fcaf49f6 100644
--- a/vncviewer/CConn.h
+++ b/vncviewer/CConn.h
@@ -45,37 +45,40 @@ public:
static void socketEvent(FL_SOCKET fd, void *data);
// CConnection callback methods
- void initDone();
+ void initDone() override;
- void setDesktopSize(int w, int h);
+ void setDesktopSize(int w, int h) override;
void setExtendedDesktopSize(unsigned reason, unsigned result,
- int w, int h, const rfb::ScreenSet& layout);
+ int w, int h,
+ const rfb::ScreenSet& layout) override;
- void setName(const char* name);
+ void setName(const char* name) override;
- void setColourMapEntries(int firstColour, int nColours, uint16_t* rgbs);
+ void setColourMapEntries(int firstColour, int nColours,
+ uint16_t* rgbs) override;
- void bell();
+ void bell() override;
- void framebufferUpdateStart();
- void framebufferUpdateEnd();
- bool dataRect(const rfb::Rect& r, int encoding);
+ void framebufferUpdateStart() override;
+ void framebufferUpdateEnd() override;
+ bool dataRect(const rfb::Rect& r, int encoding) override;
void setCursor(int width, int height, const rfb::Point& hotspot,
- const uint8_t* data);
- void setCursorPos(const rfb::Point& pos);
+ const uint8_t* data) override;
+ void setCursorPos(const rfb::Point& pos) override;
- void fence(uint32_t flags, unsigned len, const uint8_t data[]);
+ void fence(uint32_t flags, unsigned len,
+ const uint8_t data[]) override;
- void setLEDState(unsigned int state);
+ void setLEDState(unsigned int state) override;
- virtual void handleClipboardRequest();
- virtual void handleClipboardAnnounce(bool available);
- virtual void handleClipboardData(const char* data);
+ void handleClipboardRequest() override;
+ void handleClipboardAnnounce(bool available) override;
+ void handleClipboardData(const char* data) override;
private:
- void resizeFramebuffer();
+ void resizeFramebuffer() override;
void autoSelectFormatAndEncoding();
void updatePixelFormat();
diff --git a/vncviewer/DesktopWindow.h b/vncviewer/DesktopWindow.h
index fd622c6d..ce7960ce 100644
--- a/vncviewer/DesktopWindow.h
+++ b/vncviewer/DesktopWindow.h
@@ -71,11 +71,11 @@ public:
void handleClipboardData(const char* data);
// Fl_Window callback methods
- virtual void show();
- virtual void draw();
- virtual void resize(int x, int y, int w, int h);
+ void show() override;
+ void draw() override;
+ void resize(int x, int y, int w, int h) override;
- virtual int handle(int event);
+ int handle(int event) override;
void fullscreen_on();
diff --git a/vncviewer/EmulateMB.h b/vncviewer/EmulateMB.h
index 77fdec66..caf3c32a 100644
--- a/vncviewer/EmulateMB.h
+++ b/vncviewer/EmulateMB.h
@@ -31,7 +31,7 @@ public:
protected:
virtual void sendPointerEvent(const rfb::Point& pos, int buttonMask)=0;
- virtual void handleTimeout(rfb::Timer *t);
+ void handleTimeout(rfb::Timer *t) override;
private:
void sendAction(const rfb::Point& pos, int buttonMask, int action);
diff --git a/vncviewer/GestureHandler.h b/vncviewer/GestureHandler.h
index b07454df..df30ebc2 100644
--- a/vncviewer/GestureHandler.h
+++ b/vncviewer/GestureHandler.h
@@ -42,7 +42,7 @@ class GestureHandler : public rfb::Timer::Callback {
private:
bool hasDetectedGesture();
- virtual void handleTimeout(rfb::Timer* t);
+ void handleTimeout(rfb::Timer* t) override;
void longpressTimeout();
void twoTouchTimeout();
diff --git a/vncviewer/MonitorIndicesParameter.h b/vncviewer/MonitorIndicesParameter.h
index 58e55e43..80512c32 100644
--- a/vncviewer/MonitorIndicesParameter.h
+++ b/vncviewer/MonitorIndicesParameter.h
@@ -29,7 +29,7 @@ public:
MonitorIndicesParameter(const char* name_, const char* desc_, const char* v);
std::set<int> getParam();
bool setParam(std::set<int> indices);
- bool setParam(const char* value);
+ bool setParam(const char* value) override;
private:
typedef struct {
int x, y, w, h;
diff --git a/vncviewer/OptionsDialog.h b/vncviewer/OptionsDialog.h
index 0129037d..f6ca89b1 100644
--- a/vncviewer/OptionsDialog.h
+++ b/vncviewer/OptionsDialog.h
@@ -45,7 +45,7 @@ public:
static void addCallback(OptionsCallback *cb, void *data = nullptr);
static void removeCallback(OptionsCallback *cb);
- void show(void);
+ void show(void) override;
protected:
void loadOptions(void);
diff --git a/vncviewer/PlatformPixelBuffer.h b/vncviewer/PlatformPixelBuffer.h
index ec439f64..24763d46 100644
--- a/vncviewer/PlatformPixelBuffer.h
+++ b/vncviewer/PlatformPixelBuffer.h
@@ -40,7 +40,7 @@ public:
PlatformPixelBuffer(int width, int height);
~PlatformPixelBuffer();
- virtual void commitBufferRW(const rfb::Rect& r);
+ void commitBufferRW(const rfb::Rect& r) override;
rfb::Rect getDamage(void);
diff --git a/vncviewer/UserDialog.h b/vncviewer/UserDialog.h
index 913af841..db4e7c45 100644
--- a/vncviewer/UserDialog.h
+++ b/vncviewer/UserDialog.h
@@ -32,11 +32,11 @@ public:
// UserPasswdGetter callbacks
void getUserPasswd(bool secure, std::string* user,
- std::string* password);
+ std::string* password) override;
// UserMsgBox callbacks
- bool showMsgBox(int flags, const char* title, const char* text);
+ bool showMsgBox(int flags, const char* title, const char* text) override;
};
#endif
diff --git a/vncviewer/Viewport.h b/vncviewer/Viewport.h
index 4b674aa1..d936c708 100644
--- a/vncviewer/Viewport.h
+++ b/vncviewer/Viewport.h
@@ -63,14 +63,14 @@ public:
// Fl_Widget callback methods
- void draw();
+ void draw() override;
- void resize(int x, int y, int w, int h);
+ void resize(int x, int y, int w, int h) override;
- int handle(int event);
+ int handle(int event) override;
protected:
- virtual void sendPointerEvent(const rfb::Point& pos, int buttonMask);
+ void sendPointerEvent(const rfb::Point& pos, int buttonMask) override;
private:
bool hasFocus();
diff --git a/vncviewer/Win32TouchHandler.h b/vncviewer/Win32TouchHandler.h
index 05039c88..a0554ccd 100644
--- a/vncviewer/Win32TouchHandler.h
+++ b/vncviewer/Win32TouchHandler.h
@@ -35,11 +35,11 @@ class Win32TouchHandler: public BaseTouchHandler {
bool isSinglePan(GESTUREINFO gi);
protected:
- virtual void fakeMotionEvent(const GestureEvent origEvent);
- virtual void fakeButtonEvent(bool press, int button,
- const GestureEvent origEvent);
- virtual void fakeKeyEvent(bool press, int keycode,
- const GestureEvent origEvent);
+ void fakeMotionEvent(const GestureEvent origEvent) override;
+ void fakeButtonEvent(bool press, int button,
+ const GestureEvent origEvent) override;
+ void fakeKeyEvent(bool press, int keycode,
+ const GestureEvent origEvent) override;
private:
void pushFakeEvent(UINT Msg, WPARAM wParam, LPARAM lParam);
diff --git a/vncviewer/XInputTouchHandler.h b/vncviewer/XInputTouchHandler.h
index 6360b974..897c55ae 100644
--- a/vncviewer/XInputTouchHandler.h
+++ b/vncviewer/XInputTouchHandler.h
@@ -39,13 +39,13 @@ class XInputTouchHandler: public BaseTouchHandler, GestureHandler {
const XIDeviceEvent* origEvent);
void preparePointerEvent(XEvent* dst, const GestureEvent src);
- virtual void fakeMotionEvent(const GestureEvent origEvent);
- virtual void fakeButtonEvent(bool press, int button,
- const GestureEvent origEvent);
- virtual void fakeKeyEvent(bool press, int keycode,
- const GestureEvent origEvent);
+ void fakeMotionEvent(const GestureEvent origEvent) override;
+ void fakeButtonEvent(bool press, int button,
+ const GestureEvent origEvent) override;
+ void fakeKeyEvent(bool press, int keycode,
+ const GestureEvent origEvent) override;
- virtual void handleGestureEvent(const GestureEvent& event);
+ void handleGestureEvent(const GestureEvent& event) override;
private:
void pushFakeEvent(XEvent* event);
diff --git a/vncviewer/fltk/Fl_Monitor_Arrangement.h b/vncviewer/fltk/Fl_Monitor_Arrangement.h
index c71dd199..d8bf582b 100644
--- a/vncviewer/fltk/Fl_Monitor_Arrangement.h
+++ b/vncviewer/fltk/Fl_Monitor_Arrangement.h
@@ -45,7 +45,7 @@ public:
int value(std::set<int> indices);
protected:
- virtual void draw();
+ void draw() override;
private:
const Fl_Color AVAILABLE_COLOR;
diff --git a/vncviewer/fltk/Fl_Navigation.h b/vncviewer/fltk/Fl_Navigation.h
index 7f5e44ac..44515691 100644
--- a/vncviewer/fltk/Fl_Navigation.h
+++ b/vncviewer/fltk/Fl_Navigation.h
@@ -38,7 +38,7 @@ public:
void client_area(int &rx, int &ry, int &rw, int &rh, int lw);
- virtual void draw();
+ void draw() override;
// Delegation to underlying widget
void begin();