Skip to content

Commit 47d6977

Browse files
authored
Fix override syntax
Overrides go at the end of the declaration. Qt also has the `Q_DECL_OVERRIDE` preprocessor define, which expands to `override` only when building the code using C++11 or higher.
1 parent 4a1d133 commit 47d6977

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/Qt/PlayerDemo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class PlayerDemo : public QWidget
5757
~PlayerDemo();
5858

5959
protected:
60-
override void keyPressEvent(QKeyEvent *event);
60+
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
6161
void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
6262

6363
private slots:

0 commit comments

Comments
 (0)