summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/corelib/threads/mandelbrot/mandelbrotwidget.h14
-rw-r--r--examples/corelib/threads/mandelbrot/renderthread.h2
-rw-r--r--examples/corelib/threads/semaphores/semaphores.cpp4
-rw-r--r--examples/corelib/threads/waitconditions/waitconditions.cpp4
-rw-r--r--examples/corelib/tools/contiguouscache/randomlistmodel.h4
-rw-r--r--examples/gui/analogclock/main.cpp4
-rw-r--r--examples/gui/openglwindow/main.cpp4
-rw-r--r--examples/gui/openglwindow/openglwindow.h4
-rw-r--r--examples/gui/rasterwindow/rasterwindow.h6
-rw-r--r--examples/network/bearermonitor/sessionwidget.h2
-rw-r--r--examples/network/blockingfortuneclient/fortunethread.h2
-rw-r--r--examples/network/googlesuggest/googlesuggest.h2
-rw-r--r--examples/network/network-chat/connection.h2
-rw-r--r--examples/network/network-chat/server.h2
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.h2
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.h2
-rw-r--r--examples/network/torrent/filemanager.h2
-rw-r--r--examples/network/torrent/mainwindow.cpp6
-rw-r--r--examples/network/torrent/mainwindow.h4
-rw-r--r--examples/network/torrent/peerwireclient.h14
-rw-r--r--examples/network/torrent/torrentclient.h2
-rw-r--r--examples/network/torrent/torrentserver.h2
-rw-r--r--examples/network/torrent/trackerclient.h2
-rw-r--r--examples/opengl/2dpainting/glwidget.h2
-rw-r--r--examples/opengl/2dpainting/widget.h2
-rw-r--r--examples/opengl/contextinfo/renderwindow.h2
-rw-r--r--examples/opengl/cube/mainwidget.h12
-rw-r--r--examples/opengl/hellogl2/glwidget.h14
-rw-r--r--examples/opengl/hellogl2/window.h2
-rw-r--r--examples/opengl/hellowindow/hellowindow.h4
-rw-r--r--examples/opengl/legacy/framebufferobject2/glwidget.h12
-rw-r--r--examples/opengl/legacy/grabber/glwidget.h10
-rw-r--r--examples/opengl/legacy/hellogl/glwidget.h14
-rw-r--r--examples/opengl/legacy/hellogl/window.h2
-rw-r--r--examples/opengl/legacy/overpainting/glwidget.h14
-rw-r--r--examples/opengl/legacy/pbuffers/glwidget.h10
-rw-r--r--examples/opengl/legacy/samplebuffers/glwidget.h8
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.h4
-rw-r--r--examples/opengl/qopenglwidget/glwidget.h6
-rw-r--r--examples/opengl/qopenglwindow/main.cpp6
-rw-r--r--examples/opengl/textures/glwidget.h16
-rw-r--r--examples/opengl/threadedqopenglwidget/glwidget.h2
-rw-r--r--examples/qpa/windows/window.h14
-rw-r--r--examples/sql/books/bookdelegate.h8
-rw-r--r--examples/sql/drilldown/imageitem.h4
-rw-r--r--examples/sql/drilldown/view.h2
-rw-r--r--examples/sql/querymodel/customsqlmodel.h2
-rw-r--r--examples/sql/querymodel/editablesqlmodel.h4
-rw-r--r--examples/sql/sqlbrowser/browser.h2
-rw-r--r--examples/touch/fingerpaint/mainwindow.h2
-rw-r--r--examples/touch/fingerpaint/scribblearea.h6
-rw-r--r--examples/touch/knobs/knob.h2
-rw-r--r--examples/touch/pinchzoom/graphicsview.h2
-rw-r--r--examples/touch/pinchzoom/mouse.h8
-rw-r--r--examples/widgets/animation/animatedtiles/main.cpp12
-rw-r--r--examples/widgets/animation/appchooser/main.cpp8
-rw-r--r--examples/widgets/animation/easing/animation.h2
-rw-r--r--examples/widgets/animation/moveblocks/main.cpp12
-rw-r--r--examples/widgets/animation/states/main.cpp6
-rw-r--r--examples/widgets/animation/stickman/graphicsview.h4
-rw-r--r--examples/widgets/animation/stickman/lifecycle.cpp4
-rw-r--r--examples/widgets/animation/stickman/node.h12
-rw-r--r--examples/widgets/animation/stickman/rectbutton.h6
-rw-r--r--examples/widgets/animation/stickman/stickman.h6
-rw-r--r--examples/widgets/animation/sub-attaq/boat.h2
-rw-r--r--examples/widgets/animation/sub-attaq/boat_p.h18
-rw-r--r--examples/widgets/animation/sub-attaq/pixmapitem.h4
-rw-r--r--examples/widgets/animation/sub-attaq/qanimationstate.h6
-rw-r--r--examples/widgets/animation/sub-attaq/states.h22
-rw-r--r--examples/widgets/animation/sub-attaq/submarine.h2
-rw-r--r--examples/widgets/animation/sub-attaq/submarine_p.h6
-rw-r--r--examples/widgets/desktop/screenshot/screenshot.h2
-rw-r--r--examples/widgets/desktop/systray/window.h4
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.h8
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.h14
-rw-r--r--examples/widgets/draganddrop/draggableicons/dragwidget.h8
-rw-r--r--examples/widgets/draganddrop/draggabletext/dragwidget.h6
-rw-r--r--examples/widgets/draganddrop/dropsite/droparea.h8
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/dragwidget.h8
-rw-r--r--examples/widgets/draganddrop/puzzle/pieceslist.h8
-rw-r--r--examples/widgets/draganddrop/puzzle/puzzlewidget.h12
-rw-r--r--examples/widgets/effects/blurpicker/blureffect.h2
-rw-r--r--examples/widgets/effects/blurpicker/blurpicker.h6
-rw-r--r--examples/widgets/effects/lighting/lighting.h2
-rw-r--r--examples/widgets/gestures/imagegestures/imagewidget.h8
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h8
-rw-r--r--examples/widgets/graphicsview/boxes/glbuffers.h14
-rw-r--r--examples/widgets/graphicsview/boxes/main.cpp2
-rw-r--r--examples/widgets/graphicsview/boxes/qtbox.h32
-rw-r--r--examples/widgets/graphicsview/boxes/scene.h26
-rw-r--r--examples/widgets/graphicsview/chip/chip.h12
-rw-r--r--examples/widgets/graphicsview/chip/view.h2
-rw-r--r--examples/widgets/graphicsview/collidingmice/mouse.h8
-rw-r--r--examples/widgets/graphicsview/diagramscene/arrow.h8
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramitem.h6
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.h6
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramtextitem.h8
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/coloritem.h10
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/main.cpp2
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/robot.h26
-rw-r--r--examples/widgets/graphicsview/elasticnodes/edge.h6
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.h8
-rw-r--r--examples/widgets/graphicsview/elasticnodes/node.h14
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/customproxy.h12
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.h10
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.h2
-rw-r--r--examples/widgets/graphicsview/padnavigator/roundrectitem.h4
-rw-r--r--examples/widgets/graphicsview/padnavigator/splashitem.h4
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/main.cpp2
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/main.cpp12
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.h16
-rw-r--r--examples/widgets/itemviews/chart/pieview.h40
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.h4
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treemodel.h26
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.h8
-rw-r--r--examples/widgets/itemviews/frozencolumn/freezetablewidget.h6
-rw-r--r--examples/widgets/itemviews/interview/model.h16
-rw-r--r--examples/widgets/itemviews/pixelator/imagemodel.h8
-rw-r--r--examples/widgets/itemviews/pixelator/pixeldelegate.h4
-rw-r--r--examples/widgets/itemviews/puzzle/piecesmodel.h16
-rw-r--r--examples/widgets/itemviews/puzzle/puzzlewidget.h12
-rw-r--r--examples/widgets/itemviews/simpledommodel/dommodel.h14
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treemodel.h14
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/delegate.h8
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h6
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetitem.h6
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.h10
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.h8
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.h18
-rw-r--r--examples/widgets/layouts/flowlayout/flowlayout.h20
-rw-r--r--examples/widgets/mainwindows/application/mainwindow.h2
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.cpp6
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.h12
-rw-r--r--examples/widgets/mainwindows/mdi/mainwindow.h2
-rw-r--r--examples/widgets/mainwindows/mdi/mdichild.h2
-rw-r--r--examples/widgets/mainwindows/menus/mainwindow.h2
-rw-r--r--examples/widgets/mainwindows/sdi/mainwindow.h2
-rw-r--r--examples/widgets/painting/affine/xform.h12
-rw-r--r--examples/widgets/painting/basicdrawing/renderarea.h6
-rw-r--r--examples/widgets/painting/composition/composition.h12
-rw-r--r--examples/widgets/painting/concentriccircles/circlewidget.h6
-rw-r--r--examples/widgets/painting/deform/pathdeform.h12
-rw-r--r--examples/widgets/painting/gradients/gradients.h10
-rw-r--r--examples/widgets/painting/painterpaths/renderarea.h6
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.h16
-rw-r--r--examples/widgets/painting/shared/arthurstyle.h20
-rw-r--r--examples/widgets/painting/shared/arthurwidgets.h8
-rw-r--r--examples/widgets/painting/shared/hoverpoints.h2
-rw-r--r--examples/widgets/painting/transformations/renderarea.h6
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/highlighter.h2
-rw-r--r--examples/widgets/richtext/textedit/textedit.h2
-rw-r--r--examples/widgets/scroller/graphicsview/main.cpp18
-rw-r--r--examples/widgets/statemachine/factorial/main.cpp8
-rw-r--r--examples/widgets/statemachine/pingpong/main.cpp10
-rw-r--r--examples/widgets/statemachine/rogue/movementtransition.h4
-rw-r--r--examples/widgets/statemachine/rogue/window.h4
-rw-r--r--examples/widgets/statemachine/trafficlight/main.cpp2
-rw-r--r--examples/widgets/tools/completer/fsmodel.h2
-rw-r--r--examples/widgets/tools/customcompleter/textedit.h4
-rw-r--r--examples/widgets/tools/echoplugin/plugin/echoplugin.h2
-rw-r--r--examples/widgets/tools/i18n/languagechooser.h4
-rw-r--r--examples/widgets/tools/plugandpaint/app/paintarea.h10
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/basictoolsplugin.h16
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafiltersplugin.h4
-rw-r--r--examples/widgets/tools/settingseditor/settingstree.h4
-rw-r--r--examples/widgets/tools/settingseditor/variantdelegate.h8
-rw-r--r--examples/widgets/tools/styleplugin/plugin/simplestyle.h2
-rw-r--r--examples/widgets/tools/styleplugin/plugin/simplestyleplugin.h2
-rw-r--r--examples/widgets/tools/treemodelcompleter/treemodelcompleter.h4
-rw-r--r--examples/widgets/tools/undo/commands.h24
-rw-r--r--examples/widgets/tools/undo/document.h8
-rw-r--r--examples/widgets/tools/undoframework/commands.h16
-rw-r--r--examples/widgets/tools/undoframework/diagramitem.h2
-rw-r--r--examples/widgets/tools/undoframework/diagramscene.h4
-rw-r--r--examples/widgets/tutorials/modelview/1_readonly/mymodel.h6
-rw-r--r--examples/widgets/tutorials/modelview/2_formatting/mymodel.h6
-rw-r--r--examples/widgets/tutorials/modelview/3_changingmodel/mymodel.h6
-rw-r--r--examples/widgets/tutorials/modelview/4_headers/mymodel.h8
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/mymodel.h10
-rw-r--r--examples/widgets/widgets/analogclock/analogclock.h2
-rw-r--r--examples/widgets/widgets/calculator/button.h2
-rw-r--r--examples/widgets/widgets/charactermap/characterwidget.h8
-rw-r--r--examples/widgets/widgets/codeeditor/codeeditor.h6
-rw-r--r--examples/widgets/widgets/elidedlabel/elidedlabel.h2
-rw-r--r--examples/widgets/widgets/elidedlabel/testwidget.h2
-rw-r--r--examples/widgets/widgets/icons/iconsizespinbox.h4
-rw-r--r--examples/widgets/widgets/icons/imagedelegate.h6
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.h8
-rw-r--r--examples/widgets/widgets/scribble/mainwindow.h2
-rw-r--r--examples/widgets/widgets/scribble/scribblearea.h10
-rw-r--r--examples/widgets/widgets/shapedclock/shapedclock.h10
-rw-r--r--examples/widgets/widgets/styles/norwegianwoodstyle.h14
-rw-r--r--examples/widgets/widgets/tablet/tabletapplication.h2
-rw-r--r--examples/widgets/widgets/tablet/tabletcanvas.h6
-rw-r--r--examples/widgets/widgets/tetrix/tetrixboard.h10
-rw-r--r--examples/widgets/widgets/tooltips/sortingbox.h12
-rw-r--r--examples/widgets/widgets/wiggly/wigglywidget.h4
-rw-r--r--examples/widgets/windowcontainer/windowcontainer.cpp16
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.h10
199 files changed, 752 insertions, 752 deletions
diff --git a/examples/corelib/threads/mandelbrot/mandelbrotwidget.h b/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
index 14946b44fb..cbacc2cdd0 100644
--- a/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
@@ -65,15 +65,15 @@ public:
MandelbrotWidget(QWidget *parent = 0);
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
#ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *event) override;
#endif
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
private slots:
void updatePixmap(const QImage &image, double scaleFactor);
diff --git a/examples/corelib/threads/mandelbrot/renderthread.h b/examples/corelib/threads/mandelbrot/renderthread.h
index b9b59ba4cf..b5e9226fb8 100644
--- a/examples/corelib/threads/mandelbrot/renderthread.h
+++ b/examples/corelib/threads/mandelbrot/renderthread.h
@@ -75,7 +75,7 @@ signals:
void renderedImage(const QImage &image, double scaleFactor);
protected:
- void run() Q_DECL_OVERRIDE;
+ void run() override;
private:
uint rgbFromWaveLength(double wave);
diff --git a/examples/corelib/threads/semaphores/semaphores.cpp b/examples/corelib/threads/semaphores/semaphores.cpp
index f44f709d72..37dd4cda20 100644
--- a/examples/corelib/threads/semaphores/semaphores.cpp
+++ b/examples/corelib/threads/semaphores/semaphores.cpp
@@ -68,7 +68,7 @@ class Producer : public QThread
//! [1] //! [2]
{
public:
- void run() Q_DECL_OVERRIDE
+ void run() override
{
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
for (int i = 0; i < DataSize; ++i) {
@@ -86,7 +86,7 @@ class Consumer : public QThread
{
Q_OBJECT
public:
- void run() Q_DECL_OVERRIDE
+ void run() override
{
for (int i = 0; i < DataSize; ++i) {
usedBytes.acquire();
diff --git a/examples/corelib/threads/waitconditions/waitconditions.cpp b/examples/corelib/threads/waitconditions/waitconditions.cpp
index 7040246937..9eab28f94c 100644
--- a/examples/corelib/threads/waitconditions/waitconditions.cpp
+++ b/examples/corelib/threads/waitconditions/waitconditions.cpp
@@ -74,7 +74,7 @@ public:
{
}
- void run() Q_DECL_OVERRIDE
+ void run() override
{
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
@@ -105,7 +105,7 @@ public:
{
}
- void run() Q_DECL_OVERRIDE
+ void run() override
{
for (int i = 0; i < DataSize; ++i) {
mutex.lock();
diff --git a/examples/corelib/tools/contiguouscache/randomlistmodel.h b/examples/corelib/tools/contiguouscache/randomlistmodel.h
index f1f9bd247e..e6192b434f 100644
--- a/examples/corelib/tools/contiguouscache/randomlistmodel.h
+++ b/examples/corelib/tools/contiguouscache/randomlistmodel.h
@@ -62,8 +62,8 @@ public:
RandomListModel(QObject *parent = 0);
~RandomListModel();
- int rowCount(const QModelIndex & = QModelIndex()) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &, int) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex & = QModelIndex()) const override;
+ QVariant data(const QModelIndex &, int) const override;
private:
void cacheRows(int, int) const;
diff --git a/examples/gui/analogclock/main.cpp b/examples/gui/analogclock/main.cpp
index 29b21410e3..053ccb54b5 100644
--- a/examples/gui/analogclock/main.cpp
+++ b/examples/gui/analogclock/main.cpp
@@ -59,8 +59,8 @@ public:
AnalogClockWindow();
protected:
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
- void render(QPainter *p) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *) override;
+ void render(QPainter *p) override;
private:
int m_timerId;
diff --git a/examples/gui/openglwindow/main.cpp b/examples/gui/openglwindow/main.cpp
index ba56ba39f5..90c93f0d37 100644
--- a/examples/gui/openglwindow/main.cpp
+++ b/examples/gui/openglwindow/main.cpp
@@ -63,8 +63,8 @@ class TriangleWindow : public OpenGLWindow
public:
TriangleWindow();
- void initialize() Q_DECL_OVERRIDE;
- void render() Q_DECL_OVERRIDE;
+ void initialize() override;
+ void render() override;
private:
GLuint m_posAttr;
diff --git a/examples/gui/openglwindow/openglwindow.h b/examples/gui/openglwindow/openglwindow.h
index 820eaf1b8f..276f94f84c 100644
--- a/examples/gui/openglwindow/openglwindow.h
+++ b/examples/gui/openglwindow/openglwindow.h
@@ -77,9 +77,9 @@ public slots:
void renderNow();
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
- void exposeEvent(QExposeEvent *event) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *event) override;
private:
bool m_update_pending;
diff --git a/examples/gui/rasterwindow/rasterwindow.h b/examples/gui/rasterwindow/rasterwindow.h
index f03975a808..be640814d4 100644
--- a/examples/gui/rasterwindow/rasterwindow.h
+++ b/examples/gui/rasterwindow/rasterwindow.h
@@ -67,10 +67,10 @@ public slots:
void renderNow();
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void exposeEvent(QExposeEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) override;
+ void exposeEvent(QExposeEvent *event) override;
private:
QBackingStore *m_backingStore;
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
index 6bc0aef7c1..ba352eefee 100644
--- a/examples/network/bearermonitor/sessionwidget.h
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -65,7 +65,7 @@ public:
explicit SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0);
~SessionWidget();
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *) override;
private:
void updateSessionState(QNetworkSession::State state);
diff --git a/examples/network/blockingfortuneclient/fortunethread.h b/examples/network/blockingfortuneclient/fortunethread.h
index 2ab1adb921..0cbc3961fc 100644
--- a/examples/network/blockingfortuneclient/fortunethread.h
+++ b/examples/network/blockingfortuneclient/fortunethread.h
@@ -65,7 +65,7 @@ public:
~FortuneThread();
void requestNewFortune(const QString &hostName, quint16 port);
- void run() Q_DECL_OVERRIDE;
+ void run() override;
signals:
void newFortune(const QString &fortune);
diff --git a/examples/network/googlesuggest/googlesuggest.h b/examples/network/googlesuggest/googlesuggest.h
index 561d94efde..1d42f31571 100644
--- a/examples/network/googlesuggest/googlesuggest.h
+++ b/examples/network/googlesuggest/googlesuggest.h
@@ -70,7 +70,7 @@ class GSuggestCompletion : public QObject
public:
GSuggestCompletion(QLineEdit *parent = 0);
~GSuggestCompletion();
- bool eventFilter(QObject *obj, QEvent *ev) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *obj, QEvent *ev) override;
void showCompletion(const QStringList &choices);
public slots:
diff --git a/examples/network/network-chat/connection.h b/examples/network/network-chat/connection.h
index bcd9e889f7..67d25d4d1e 100644
--- a/examples/network/network-chat/connection.h
+++ b/examples/network/network-chat/connection.h
@@ -88,7 +88,7 @@ signals:
void newMessage(const QString &from, const QString &message);
protected:
- void timerEvent(QTimerEvent *timerEvent) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *timerEvent) override;
private slots:
void processReadyRead();
diff --git a/examples/network/network-chat/server.h b/examples/network/network-chat/server.h
index 47adfc63c7..d86ed36bce 100644
--- a/examples/network/network-chat/server.h
+++ b/examples/network/network-chat/server.h
@@ -66,7 +66,7 @@ signals:
void newConnection(Connection *connection);
protected:
- void incomingConnection(qintptr socketDescriptor) Q_DECL_OVERRIDE;
+ void incomingConnection(qintptr socketDescriptor) override;
};
#endif
diff --git a/examples/network/threadedfortuneserver/fortuneserver.h b/examples/network/threadedfortuneserver/fortuneserver.h
index 3922add519..dc0949bcb2 100644
--- a/examples/network/threadedfortuneserver/fortuneserver.h
+++ b/examples/network/threadedfortuneserver/fortuneserver.h
@@ -63,7 +63,7 @@ public:
FortuneServer(QObject *parent = 0);
protected:
- void incomingConnection(qintptr socketDescriptor) Q_DECL_OVERRIDE;
+ void incomingConnection(qintptr socketDescriptor) override;
private:
QStringList fortunes;
diff --git a/examples/network/threadedfortuneserver/fortunethread.h b/examples/network/threadedfortuneserver/fortunethread.h
index 038998d9ab..0a4948e1de 100644
--- a/examples/network/threadedfortuneserver/fortunethread.h
+++ b/examples/network/threadedfortuneserver/fortunethread.h
@@ -62,7 +62,7 @@ class FortuneThread : public QThread
public:
FortuneThread(int socketDescriptor, const QString &fortune, QObject *parent);
- void run() Q_DECL_OVERRIDE;
+ void run() override;
signals:
void error(QTcpSocket::SocketError socketError);
diff --git a/examples/network/torrent/filemanager.h b/examples/network/torrent/filemanager.h
index 73061ad059..82f9983ea6 100644
--- a/examples/network/torrent/filemanager.h
+++ b/examples/network/torrent/filemanager.h
@@ -100,7 +100,7 @@ signals:
void pieceVerified(int pieceIndex, bool verified);
protected:
- void run() Q_DECL_OVERRIDE;
+ void run() override;
private slots:
bool verifySinglePiece(int pieceIndex);
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 2b3d3e8b3a..efdf187174 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -67,8 +67,8 @@ signals:
void fileDropped(const QString &fileName);
protected:
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
#endif
};
@@ -80,7 +80,7 @@ public:
inline TorrentViewDelegate(MainWindow *mainWindow) : QItemDelegate(mainWindow) {}
void paint(QPainter *painter, const QStyleOptionViewItem &option,
- const QModelIndex &index ) const Q_DECL_OVERRIDE
+ const QModelIndex &index ) const override
{
if (index.column() != 2) {
QItemDelegate::paint(painter, option, index);
diff --git a/examples/network/torrent/mainwindow.h b/examples/network/torrent/mainwindow.h
index 7c18f770f8..9c55b72256 100644
--- a/examples/network/torrent/mainwindow.h
+++ b/examples/network/torrent/mainwindow.h
@@ -73,11 +73,11 @@ class MainWindow : public QMainWindow
public:
MainWindow(QWidget *parent = 0);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
const TorrentClient *clientForRow(int row) const;
protected:
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void loadSettings();
diff --git a/examples/network/torrent/peerwireclient.h b/examples/network/torrent/peerwireclient.h
index 6fee52bee0..e03b538f63 100644
--- a/examples/network/torrent/peerwireclient.h
+++ b/examples/network/torrent/peerwireclient.h
@@ -122,14 +122,14 @@ public:
qint64 uploadSpeed() const;
bool canTransferMore() const;
- qint64 bytesAvailable() const Q_DECL_OVERRIDE { return incomingBuffer.size() + QTcpSocket::bytesAvailable(); }
+ qint64 bytesAvailable() const override { return incomingBuffer.size() + QTcpSocket::bytesAvailable(); }
qint64 socketBytesAvailable() const { return socket.bytesAvailable(); }
qint64 socketBytesToWrite() const { return socket.bytesToWrite(); }
- void setReadBufferSize(qint64 size) Q_DECL_OVERRIDE;
+ void setReadBufferSize(qint64 size) override;
void connectToHost(const QHostAddress &address,
- quint16 port, OpenMode openMode = ReadWrite) Q_DECL_OVERRIDE;
+ quint16 port, OpenMode openMode = ReadWrite) override;
void diconnectFromHost();
signals:
@@ -148,11 +148,11 @@ signals:
void bytesReceived(qint64 size);
protected:
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *event) override;
- qint64 readData(char *data, qint64 maxlen) Q_DECL_OVERRIDE;
- qint64 readLineData(char *data, qint64 maxlen) Q_DECL_OVERRIDE;
- qint64 writeData(const char *data, qint64 len) Q_DECL_OVERRIDE;
+ qint64 readData(char *data, qint64 maxlen) override;
+ qint64 readLineData(char *data, qint64 maxlen) override;
+ qint64 writeData(const char *data, qint64 len) override;
private slots:
void sendHandShake();
diff --git a/examples/network/torrent/torrentclient.h b/examples/network/torrent/torrentclient.h
index 4db60b9a8c..b9b88b3a07 100644
--- a/examples/network/torrent/torrentclient.h
+++ b/examples/network/torrent/torrentclient.h
@@ -168,7 +168,7 @@ public slots:
void setupIncomingConnection(PeerWireClient *client);
protected slots:
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *event) override;
private slots:
// File management
diff --git a/examples/network/torrent/torrentserver.h b/examples/network/torrent/torrentserver.h
index 884cce1db8..b0d2b3c012 100644
--- a/examples/network/torrent/torrentserver.h
+++ b/examples/network/torrent/torrentserver.h
@@ -68,7 +68,7 @@ public:
void removeClient(TorrentClient *client);
protected:
- void incomingConnection(qintptr socketDescriptor) Q_DECL_OVERRIDE;
+ void incomingConnection(qintptr socketDescriptor) override;
private slots:
void removeClient();
diff --git a/examples/network/torrent/trackerclient.h b/examples/network/torrent/trackerclient.h
index 787e7b2c84..323fc67eba 100644
--- a/examples/network/torrent/trackerclient.h
+++ b/examples/network/torrent/trackerclient.h
@@ -88,7 +88,7 @@ signals:
void stopped();
protected:
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *event) override;
private slots:
void fetchPeerList();
diff --git a/examples/opengl/2dpainting/glwidget.h b/examples/opengl/2dpainting/glwidget.h
index 6f0a20022b..16ad1a95f3 100644
--- a/examples/opengl/2dpainting/glwidget.h
+++ b/examples/opengl/2dpainting/glwidget.h
@@ -67,7 +67,7 @@ public slots:
void animate();
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
private:
Helper *helper;
diff --git a/examples/opengl/2dpainting/widget.h b/examples/opengl/2dpainting/widget.h
index a1f36be183..40d20bc0a1 100644
--- a/examples/opengl/2dpainting/widget.h
+++ b/examples/opengl/2dpainting/widget.h
@@ -67,7 +67,7 @@ public slots:
void animate();
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
private:
Helper *helper;
diff --git a/examples/opengl/contextinfo/renderwindow.h b/examples/opengl/contextinfo/renderwindow.h
index 5e9212e04c..c148b71c3c 100644
--- a/examples/opengl/contextinfo/renderwindow.h
+++ b/examples/opengl/contextinfo/renderwindow.h
@@ -65,7 +65,7 @@ class RenderWindow : public QWindow
public:
RenderWindow(const QSurfaceFormat &format);
QOpenGLContext *context() { return m_context; }
- void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *) override;
void setForceGLSL110(bool enable) { m_forceGLSL110 = enable; }
signals:
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
index 92182e82c2..cd2f8098ad 100644
--- a/examples/opengl/cube/mainwidget.h
+++ b/examples/opengl/cube/mainwidget.h
@@ -73,13 +73,13 @@ public:
~MainWidget();
protected:
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
+ void timerEvent(QTimerEvent *e) override;
- void initializeGL() Q_DECL_OVERRIDE;
- void resizeGL(int w, int h) Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void resizeGL(int w, int h) override;
+ void paintGL() override;
void initShaders();
void initTextures();
diff --git a/examples/opengl/hellogl2/glwidget.h b/examples/opengl/hellogl2/glwidget.h
index 9b4a087fd8..cff5633893 100644
--- a/examples/opengl/hellogl2/glwidget.h
+++ b/examples/opengl/hellogl2/glwidget.h
@@ -68,8 +68,8 @@ public:
GLWidget(QWidget *parent = 0);
~GLWidget();
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize minimumSizeHint() const override;
+ QSize sizeHint() const override;
public slots:
void setXRotation(int angle);
@@ -83,11 +83,11 @@ signals:
void zRotationChanged(int angle);
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void resizeGL(int width, int height) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void paintGL() override;
+ void resizeGL(int width, int height) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
private:
void setupVertexAttribs();
diff --git a/examples/opengl/hellogl2/window.h b/examples/opengl/hellogl2/window.h
index 68ee754d8e..5cec60ff06 100644
--- a/examples/opengl/hellogl2/window.h
+++ b/examples/opengl/hellogl2/window.h
@@ -69,7 +69,7 @@ public:
Window(MainWindow *mw);
protected:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
private slots:
void dockUndock();
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h
index 0229c393f9..1372152e93 100644
--- a/examples/opengl/hellowindow/hellowindow.h
+++ b/examples/opengl/hellowindow/hellowindow.h
@@ -112,10 +112,10 @@ public:
QColor color() const;
void updateColor();
- void exposeEvent(QExposeEvent *event) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *event) override;
private:
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *) override;
int m_colorIndex;
QColor m_color;
diff --git a/examples/opengl/legacy/framebufferobject2/glwidget.h b/examples/opengl/legacy/framebufferobject2/glwidget.h
index 8f46f65b29..d3e4aa5af5 100644
--- a/examples/opengl/legacy/framebufferobject2/glwidget.h
+++ b/examples/opengl/legacy/framebufferobject2/glwidget.h
@@ -55,12 +55,12 @@ class GLWidget : public QGLWidget
public:
GLWidget(QWidget *parent);
~GLWidget();
- void initializeGL() Q_DECL_OVERRIDE;
- void resizeGL(int w, int h) Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE { update(); }
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE { killTimer(timerId); }
- void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE { timerId = startTimer(20); }
+ void initializeGL() override;
+ void resizeGL(int w, int h) override;
+ void paintGL() override;
+ void timerEvent(QTimerEvent *) override { update(); }
+ void mousePressEvent(QMouseEvent *) override { killTimer(timerId); }
+ void mouseReleaseEvent(QMouseEvent *) override { timerId = startTimer(20); }
void drawCube(int i, GLfloat z, GLfloat ri, GLfloat jmp, GLfloat amp);
diff --git a/examples/opengl/legacy/grabber/glwidget.h b/examples/opengl/legacy/grabber/glwidget.h
index 3a6e2fb3bb..67020b0ada 100644
--- a/examples/opengl/legacy/grabber/glwidget.h
+++ b/examples/opengl/legacy/grabber/glwidget.h
@@ -76,11 +76,11 @@ signals:
void zRotationChanged(int angle);
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void resizeGL(int width, int height) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void paintGL() override;
+ void resizeGL(int width, int height) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
private slots:
void advanceGears();
diff --git a/examples/opengl/legacy/hellogl/glwidget.h b/examples/opengl/legacy/hellogl/glwidget.h
index 89446d5937..8154d7405c 100644
--- a/examples/opengl/legacy/hellogl/glwidget.h
+++ b/examples/opengl/legacy/hellogl/glwidget.h
@@ -65,8 +65,8 @@ public:
GLWidget(QWidget *parent = 0);
~GLWidget();
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize minimumSizeHint() const override;
+ QSize sizeHint() const override;
//! [0]
//! [1]
@@ -83,11 +83,11 @@ signals:
//! [2]
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void resizeGL(int width, int height) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void paintGL() override;
+ void resizeGL(int width, int height) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
//! [2]
//! [3]
diff --git a/examples/opengl/legacy/hellogl/window.h b/examples/opengl/legacy/hellogl/window.h
index 8d684a155b..04e83694a4 100644
--- a/examples/opengl/legacy/hellogl/window.h
+++ b/examples/opengl/legacy/hellogl/window.h
@@ -67,7 +67,7 @@ public:
Window();
protected:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
private:
QSlider *createSlider();
diff --git a/examples/opengl/legacy/overpainting/glwidget.h b/examples/opengl/legacy/overpainting/glwidget.h
index ffa7922061..e5ea539f6d 100644
--- a/examples/opengl/legacy/overpainting/glwidget.h
+++ b/examples/opengl/legacy/overpainting/glwidget.h
@@ -68,7 +68,7 @@ public:
~GLWidget();
//! [0]
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
int xRotation() const { return xRot; }
int yRotation() const { return yRot; }
int zRotation() const { return zRot; }
@@ -80,12 +80,12 @@ public slots:
//! [1]
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeGL(int width, int height) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeGL(int width, int height) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void showEvent(QShowEvent *event) override;
private slots:
void animate();
diff --git a/examples/opengl/legacy/pbuffers/glwidget.h b/examples/opengl/legacy/pbuffers/glwidget.h
index d447abb638..397329c428 100644
--- a/examples/opengl/legacy/pbuffers/glwidget.h
+++ b/examples/opengl/legacy/pbuffers/glwidget.h
@@ -67,11 +67,11 @@ public:
~GLWidget();
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void resizeGL(int width, int height) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE { setAnimationPaused(true); }
- void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE { setAnimationPaused(false); }
+ void initializeGL() override;
+ void paintGL() override;
+ void resizeGL(int width, int height) override;
+ void mousePressEvent(QMouseEvent *) override { setAnimationPaused(true); }
+ void mouseReleaseEvent(QMouseEvent *) override { setAnimationPaused(false); }
private:
void initializeGeometry();
diff --git a/examples/opengl/legacy/samplebuffers/glwidget.h b/examples/opengl/legacy/samplebuffers/glwidget.h
index f46f8e19ac..f02f0835ef 100644
--- a/examples/opengl/legacy/samplebuffers/glwidget.h
+++ b/examples/opengl/legacy/samplebuffers/glwidget.h
@@ -56,10 +56,10 @@ public:
GLWidget(QWidget *parent);
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void resizeGL(int w, int h) Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void resizeGL(int w, int h) override;
+ void paintGL() override;
+ void timerEvent(QTimerEvent *) override;
void makeObject();
void quad(GLenum primitive, GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h
index 73a4b2e63d..7281451924 100644
--- a/examples/opengl/paintedwindow/paintedwindow.h
+++ b/examples/opengl/paintedwindow/paintedwindow.h
@@ -84,8 +84,8 @@ private slots:
void rotationDone();
private:
- void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *) override;
+ void mousePressEvent(QMouseEvent *) override;
void paint(QPainter *painter, const QRect &rect);
diff --git a/examples/opengl/qopenglwidget/glwidget.h b/examples/opengl/qopenglwidget/glwidget.h
index d677e414f7..de7805a907 100644
--- a/examples/opengl/qopenglwidget/glwidget.h
+++ b/examples/opengl/qopenglwidget/glwidget.h
@@ -85,9 +85,9 @@ private slots:
void handleButtonPress();
protected:
- void resizeGL(int w, int h) Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void initializeGL() Q_DECL_OVERRIDE;
+ void resizeGL(int w, int h) override;
+ void paintGL() override;
+ void initializeGL() override;
private:
void paintTexturedCube();
diff --git a/examples/opengl/qopenglwindow/main.cpp b/examples/opengl/qopenglwindow/main.cpp
index 5640acccc7..4287d42d24 100644
--- a/examples/opengl/qopenglwindow/main.cpp
+++ b/examples/opengl/qopenglwindow/main.cpp
@@ -79,9 +79,9 @@ public:
OpenGLWindow();
protected:
- void paintGL() Q_DECL_OVERRIDE;
- void resizeGL(int w, int h) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
+ void paintGL() override;
+ void resizeGL(int w, int h) override;
+ void keyPressEvent(QKeyEvent *e) override;
private:
void setAnimating(bool enabled);
diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h
index c4c06f3864..0db2695c6a 100644
--- a/examples/opengl/textures/glwidget.h
+++ b/examples/opengl/textures/glwidget.h
@@ -66,8 +66,8 @@ public:
explicit GLWidget(QWidget *parent = 0);
~GLWidget();
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize minimumSizeHint() const override;
+ QSize sizeHint() const override;
void rotateBy(int xAngle, int yAngle, int zAngle);
void setClearColor(const QColor &color);
@@ -75,12 +75,12 @@ signals:
void clicked();
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void resizeGL(int width, int height) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void paintGL() override;
+ void resizeGL(int width, int height) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
private:
void makeObject();
diff --git a/examples/opengl/threadedqopenglwidget/glwidget.h b/examples/opengl/threadedqopenglwidget/glwidget.h
index 8d2d8bbc70..c33f7e51a7 100644
--- a/examples/opengl/threadedqopenglwidget/glwidget.h
+++ b/examples/opengl/threadedqopenglwidget/glwidget.h
@@ -114,7 +114,7 @@ public:
~GLWidget();
protected:
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE { }
+ void paintEvent(QPaintEvent *) override { }
signals:
void renderRequested();
diff --git a/examples/qpa/windows/window.h b/examples/qpa/windows/window.h
index f64bea1676..5647688fbc 100644
--- a/examples/qpa/windows/window.h
+++ b/examples/qpa/windows/window.h
@@ -58,16 +58,16 @@ public:
Window(QScreen *screen);
protected:
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *) override;
+ void mouseMoveEvent(QMouseEvent *) override;
+ void mouseReleaseEvent(QMouseEvent *) override;
- void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *) override;
- void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *) override;
+ void resizeEvent(QResizeEvent *) override;
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *) override;
private:
void render();
diff --git a/examples/sql/books/bookdelegate.h b/examples/sql/books/bookdelegate.h
index ba46f7d60a..d07f2b9534 100644
--- a/examples/sql/books/bookdelegate.h
+++ b/examples/sql/books/bookdelegate.h
@@ -64,16 +64,16 @@ public:
BookDelegate(QObject *parent);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
- QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
bool editorEvent(QEvent *event, QAbstractItemModel *model,
const QStyleOptionViewItem &option,
- const QModelIndex &index) Q_DECL_OVERRIDE;
+ const QModelIndex &index) override;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
private:
QPixmap star;
diff --git a/examples/sql/drilldown/imageitem.h b/examples/sql/drilldown/imageitem.h
index 7b1c869066..4f773a6dfc 100644
--- a/examples/sql/drilldown/imageitem.h
+++ b/examples/sql/drilldown/imageitem.h
@@ -66,8 +66,8 @@ public:
int id();
protected:
- void hoverEnterEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
private slots:
void setFrame(int frame);
diff --git a/examples/sql/drilldown/view.h b/examples/sql/drilldown/view.h
index 3aecf5ab58..9d6ef0e853 100644
--- a/examples/sql/drilldown/view.h
+++ b/examples/sql/drilldown/view.h
@@ -66,7 +66,7 @@ public:
View(const QString &items, const QString &images, QWidget *parent = 0);
protected:
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent *event) override;
//! [0]
//! [1]
diff --git a/examples/sql/querymodel/customsqlmodel.h b/examples/sql/querymodel/customsqlmodel.h
index b9b4dd4f95..5d2f625665 100644
--- a/examples/sql/querymodel/customsqlmodel.h
+++ b/examples/sql/querymodel/customsqlmodel.h
@@ -61,7 +61,7 @@ class CustomSqlModel : public QSqlQueryModel
public:
CustomSqlModel(QObject *parent = 0);
- QVariant data(const QModelIndex &item, int role) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &item, int role) const override;
};
//! [0]
diff --git a/examples/sql/querymodel/editablesqlmodel.h b/examples/sql/querymodel/editablesqlmodel.h
index b88c9a3fb1..1341dd372a 100644
--- a/examples/sql/querymodel/editablesqlmodel.h
+++ b/examples/sql/querymodel/editablesqlmodel.h
@@ -60,8 +60,8 @@ class EditableSqlModel : public QSqlQueryModel
public:
EditableSqlModel(QObject *parent = 0);
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
- bool setData(const QModelIndex &index, const QVariant &value, int role) Q_DECL_OVERRIDE;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
+ bool setData(const QModelIndex &index, const QVariant &value, int role) override;
private:
bool setFirstName(int personId, const QString &firstName);
diff --git a/examples/sql/sqlbrowser/browser.h b/examples/sql/sqlbrowser/browser.h
index 8b36952ce4..fef410778b 100644
--- a/examples/sql/sqlbrowser/browser.h
+++ b/examples/sql/sqlbrowser/browser.h
@@ -117,7 +117,7 @@ class CustomModel: public QSqlTableModel
Q_OBJECT
public:
explicit CustomModel(QObject *parent = 0, QSqlDatabase db = QSqlDatabase()):QSqlTableModel(parent, db) {}
- QVariant data(const QModelIndex &idx, int role) const Q_DECL_OVERRIDE
+ QVariant data(const QModelIndex &idx, int role) const override
{
if (role == Qt::BackgroundRole && isDirty(idx))
return QBrush(QColor(Qt::yellow));
diff --git a/examples/touch/fingerpaint/mainwindow.h b/examples/touch/fingerpaint/mainwindow.h
index 3686947065..47c339050e 100644
--- a/examples/touch/fingerpaint/mainwindow.h
+++ b/examples/touch/fingerpaint/mainwindow.h
@@ -65,7 +65,7 @@ public:
MainWindow();
protected:
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void open();
diff --git a/examples/touch/fingerpaint/scribblearea.h b/examples/touch/fingerpaint/scribblearea.h
index d81414e8b9..5138e3a1ab 100644
--- a/examples/touch/fingerpaint/scribblearea.h
+++ b/examples/touch/fingerpaint/scribblearea.h
@@ -74,9 +74,9 @@ public slots:
void print();
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ bool event(QEvent *event) override;
private:
void resizeImage(QImage *image, const QSize &newSize);
diff --git a/examples/touch/knobs/knob.h b/examples/touch/knobs/knob.h
index b35b16aabe..c16b61d6f1 100644
--- a/examples/touch/knobs/knob.h
+++ b/examples/touch/knobs/knob.h
@@ -58,7 +58,7 @@ class Knob : public QGraphicsEllipseItem
public:
Knob();
- bool sceneEvent(QEvent *event) Q_DECL_OVERRIDE;
+ bool sceneEvent(QEvent *event) override;
};
#endif // KNOB_H
diff --git a/examples/touch/pinchzoom/graphicsview.h b/examples/touch/pinchzoom/graphicsview.h
index f9dbc43980..d4e2e32d36 100644
--- a/examples/touch/pinchzoom/graphicsview.h
+++ b/examples/touch/pinchzoom/graphicsview.h
@@ -58,7 +58,7 @@ class GraphicsView : public QGraphicsView
public:
GraphicsView(QGraphicsScene *scene = 0, QWidget *parent = 0);
- bool viewportEvent(QEvent *event) Q_DECL_OVERRIDE;
+ bool viewportEvent(QEvent *event) override;
private:
qreal totalScaleFactor;
diff --git a/examples/touch/pinchzoom/mouse.h b/examples/touch/pinchzoom/mouse.h
index a01c4d629c..870bfcd6c0 100644
--- a/examples/touch/pinchzoom/mouse.h
+++ b/examples/touch/pinchzoom/mouse.h
@@ -61,13 +61,13 @@ class Mouse : public QGraphicsObject
public:
Mouse();
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
- QWidget *widget) Q_DECL_OVERRIDE;
+ QWidget *widget) override;
protected:
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *event) override;
private:
qreal angle;
diff --git a/examples/widgets/animation/animatedtiles/main.cpp b/examples/widgets/animation/animatedtiles/main.cpp
index 2202f6194b..0511fe8162 100644
--- a/examples/widgets/animation/animatedtiles/main.cpp
+++ b/examples/widgets/animation/animatedtiles/main.cpp
@@ -75,19 +75,19 @@ public:
setCacheMode(DeviceCoordinateCache);
}
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
return QRectF(-65, -65, 130, 130);
}
- QPainterPath shape() const Q_DECL_OVERRIDE
+ QPainterPath shape() const override
{
QPainterPath path;
path.addEllipse(boundingRect());
return path;
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *) override
{
bool down = option->state & QStyle::State_Sunken;
QRectF r = boundingRect();
@@ -112,13 +112,13 @@ signals:
void pressed();
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE
+ void mousePressEvent(QGraphicsSceneMouseEvent *) override
{
emit pressed();
update();
}
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override
{
update();
}
@@ -133,7 +133,7 @@ public:
View(QGraphicsScene *scene) : QGraphicsView(scene) { }
protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE
+ void resizeEvent(QResizeEvent *event) override
{
QGraphicsView::resizeEvent(event);
fitInView(sceneRect(), Qt::KeepAspectRatio);
diff --git a/examples/widgets/animation/appchooser/main.cpp b/examples/widgets/animation/appchooser/main.cpp
index 59611274ef..c9821450c9 100644
--- a/examples/widgets/animation/appchooser/main.cpp
+++ b/examples/widgets/animation/appchooser/main.cpp
@@ -62,17 +62,17 @@ public:
{
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
{
painter->drawPixmap(QPointF(), p);
}
- virtual void mousePressEvent(QGraphicsSceneMouseEvent * ) Q_DECL_OVERRIDE
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent *) override
{
emit clicked();
}
- virtual void setGeometry(const QRectF &rect) Q_DECL_OVERRIDE
+ virtual void setGeometry(const QRectF &rect) override
{
QGraphicsWidget::setGeometry(rect);
@@ -98,7 +98,7 @@ public:
{
}
- virtual void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE
+ virtual void resizeEvent(QResizeEvent *) override
{
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
diff --git a/examples/widgets/animation/easing/animation.h b/examples/widgets/animation/easing/animation.h
index f8373ef686..696257bb4a 100644
--- a/examples/widgets/animation/easing/animation.h
+++ b/examples/widgets/animation/easing/animation.h
@@ -77,7 +77,7 @@ public:
m_path = QPainterPath();
}
- void updateCurrentTime(int currentTime) Q_DECL_OVERRIDE
+ void updateCurrentTime(int currentTime) override
{
if (m_pathType == CirclePath) {
if (m_path.isEmpty()) {
diff --git a/examples/widgets/animation/moveblocks/main.cpp b/examples/widgets/animation/moveblocks/main.cpp
index 3b271339e4..f85211ef88 100644
--- a/examples/widgets/animation/moveblocks/main.cpp
+++ b/examples/widgets/animation/moveblocks/main.cpp
@@ -80,7 +80,7 @@ class QGraphicsRectWidget : public QGraphicsWidget
{
public:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *,
- QWidget *) Q_DECL_OVERRIDE
+ QWidget *) override
{
painter->fillRect(rect(), Qt::blue);
}
@@ -98,14 +98,14 @@ public:
protected:
//![14]
- virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE
+ virtual bool eventTest(QEvent *event) override
{
return (event->type() == QEvent::Type(StateSwitchEvent::StateSwitchType))
&& (static_cast<StateSwitchEvent *>(event)->rand() == m_rand);
}
//![14]
- virtual void onTransition(QEvent *) Q_DECL_OVERRIDE {}
+ virtual void onTransition(QEvent *) override {}
private:
int m_rand;
@@ -122,7 +122,7 @@ public:
//![10]
//![11]
- virtual void onEntry(QEvent *) Q_DECL_OVERRIDE
+ virtual void onEntry(QEvent *) override
{
int n;
while ((n = (qrand() % m_stateCount + 1)) == m_lastIndex)
@@ -130,7 +130,7 @@ public:
m_lastIndex = n;
machine()->postEvent(new StateSwitchEvent(n));
}
- virtual void onExit(QEvent *) Q_DECL_OVERRIDE {}
+ virtual void onExit(QEvent *) override {}
//![11]
//![12]
@@ -174,7 +174,7 @@ public:
}
protected:
- virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE
+ virtual void resizeEvent(QResizeEvent *event) override
{
fitInView(scene()->sceneRect());
QGraphicsView::resizeEvent(event);
diff --git a/examples/widgets/animation/states/main.cpp b/examples/widgets/animation/states/main.cpp
index 1c5cb2d12d..a3c7256933 100644
--- a/examples/widgets/animation/states/main.cpp
+++ b/examples/widgets/animation/states/main.cpp
@@ -58,12 +58,12 @@ public:
{
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
{
painter->drawPixmap(QPointF(), p);
}
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
return QRectF( QPointF(0, 0), p.size());
}
@@ -79,7 +79,7 @@ public:
{
}
- virtual void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE
+ virtual void resizeEvent(QResizeEvent *) override
{
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
diff --git a/examples/widgets/animation/stickman/graphicsview.h b/examples/widgets/animation/stickman/graphicsview.h
index 64201f4e3d..4b9b8fc028 100644
--- a/examples/widgets/animation/stickman/graphicsview.h
+++ b/examples/widgets/animation/stickman/graphicsview.h
@@ -61,8 +61,8 @@ public:
GraphicsView(QWidget *parent = 0);
protected:
- virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
+ virtual void resizeEvent(QResizeEvent *event) override;
+ void keyPressEvent(QKeyEvent *) override;
signals:
void keyPressed(int key);
diff --git a/examples/widgets/animation/stickman/lifecycle.cpp b/examples/widgets/animation/stickman/lifecycle.cpp
index c0623d02fe..fcb351cf36 100644
--- a/examples/widgets/animation/stickman/lifecycle.cpp
+++ b/examples/widgets/animation/stickman/lifecycle.cpp
@@ -70,7 +70,7 @@ public:
setTargetState(target);
}
- virtual bool eventTest(QEvent *e) Q_DECL_OVERRIDE
+ virtual bool eventTest(QEvent *e) override
{
if (QSignalTransition::eventTest(e)) {
QVariant key = static_cast<QStateMachine::SignalEvent*>(e)->arguments().at(0);
@@ -95,7 +95,7 @@ public:
startTimer(1000);
}
- virtual bool eventTest(QEvent *e) Q_DECL_OVERRIDE
+ virtual bool eventTest(QEvent *e) override
{
return QEventTransition::eventTest(e) && ((qrand() % 50) == 0);
}
diff --git a/examples/widgets/animation/stickman/node.h b/examples/widgets/animation/stickman/node.h
index cdf2df46cb..679999b7e8 100644
--- a/examples/widgets/animation/stickman/node.h
+++ b/examples/widgets/animation/stickman/node.h
@@ -60,18 +60,18 @@ public:
explicit Node(const QPointF &pos, QGraphicsItem *parent = 0);
~Node();
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
signals:
void positionChanged();
protected:
- QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
- void mousePressEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE;
+ void mousePressEvent(QGraphicsSceneMouseEvent *) override;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *) override;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override;
private:
bool m_dragging;
diff --git a/examples/widgets/animation/stickman/rectbutton.h b/examples/widgets/animation/stickman/rectbutton.h
index 79902c9d38..864a2c179e 100644
--- a/examples/widgets/animation/stickman/rectbutton.h
+++ b/examples/widgets/animation/stickman/rectbutton.h
@@ -60,13 +60,13 @@ public:
RectButton(QString buttonText);
~RectButton();
- virtual QRectF boundingRect() const Q_DECL_OVERRIDE;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ virtual QRectF boundingRect() const override;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
protected:
QString m_ButtonText;
- virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) override;
signals:
void clicked();
diff --git a/examples/widgets/animation/stickman/stickman.h b/examples/widgets/animation/stickman/stickman.h
index 302de06704..b5fbd14872 100644
--- a/examples/widgets/animation/stickman/stickman.h
+++ b/examples/widgets/animation/stickman/stickman.h
@@ -69,8 +69,8 @@ public:
StickMan();
~StickMan();
- virtual QRectF boundingRect() const Q_DECL_OVERRIDE;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ virtual QRectF boundingRect() const override;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
int nodeCount() const;
Node *node(int idx) const;
@@ -92,7 +92,7 @@ public slots:
void childPositionChanged();
protected:
- void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *e) override;
private:
diff --git a/examples/widgets/animation/sub-attaq/boat.h b/examples/widgets/animation/sub-attaq/boat.h
index 4b7b20c390..24b004a108 100644
--- a/examples/widgets/animation/sub-attaq/boat.h
+++ b/examples/widgets/animation/sub-attaq/boat.h
@@ -86,7 +86,7 @@ public:
void updateBoatMovement();
- virtual int type() const Q_DECL_OVERRIDE;
+ virtual int type() const override;
signals:
void boatDestroyed();
diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h
index 6d3c3f69f8..5cad6bde96 100644
--- a/examples/widgets/animation/sub-attaq/boat_p.h
+++ b/examples/widgets/animation/sub-attaq/boat_p.h
@@ -81,7 +81,7 @@ public:
{
}
protected:
- virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE
+ virtual bool eventTest(QEvent *event) override
{
if (!QKeyEventTransition::eventTest(event))
return false;
@@ -100,13 +100,13 @@ public:
{
}
protected:
- virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE
+ virtual bool eventTest(QEvent *event) override
{
if (!QKeyEventTransition::eventTest(event))
return false;
return (boat->currentSpeed() >= 0);
}
- void onTransition(QEvent *) Q_DECL_OVERRIDE
+ void onTransition(QEvent *) override
{
//We decrease the speed if needed
if (key == Qt::Key_Left && boat->currentDirection() == Boat::Right)
@@ -131,7 +131,7 @@ public:
{
}
protected:
- virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE
+ virtual bool eventTest(QEvent *event) override
{
if (!QKeyEventTransition::eventTest(event))
return false;
@@ -150,7 +150,7 @@ public:
{
}
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE
+ void onEntry(QEvent *) override
{
boat->setCurrentDirection(Boat::Right);
boat->updateBoatMovement();
@@ -167,7 +167,7 @@ public:
{
}
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE
+ void onEntry(QEvent *) override
{
boat->setCurrentDirection(Boat::Left);
boat->updateBoatMovement();
@@ -184,7 +184,7 @@ public:
{
}
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE
+ void onEntry(QEvent *) override
{
boat->setCurrentSpeed(0);
boat->setCurrentDirection(Boat::None);
@@ -202,7 +202,7 @@ public:
{
}
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE
+ void onEntry(QEvent *) override
{
Bomb *b = new Bomb();
b->setPos(boat->x()+boat->size().width(),boat->y());
@@ -223,7 +223,7 @@ public:
{
}
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE
+ void onEntry(QEvent *) override
{
Bomb *b = new Bomb();
b->setPos(boat->x() - b->size().width(), boat->y());
diff --git a/examples/widgets/animation/sub-attaq/pixmapitem.h b/examples/widgets/animation/sub-attaq/pixmapitem.h
index 139537bcc9..de8ed67a38 100644
--- a/examples/widgets/animation/sub-attaq/pixmapitem.h
+++ b/examples/widgets/animation/sub-attaq/pixmapitem.h
@@ -63,8 +63,8 @@ public:
PixmapItem(const QString &fileName, GraphicsScene::Mode mode, QGraphicsItem * parent = 0);
PixmapItem(const QString &fileName, QGraphicsScene *scene);
QSizeF size() const;
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
private:
QPixmap pix;
};
diff --git a/examples/widgets/animation/sub-attaq/qanimationstate.h b/examples/widgets/animation/sub-attaq/qanimationstate.h
index b4afdd699d..06ab4dfbcf 100644
--- a/examples/widgets/animation/sub-attaq/qanimationstate.h
+++ b/examples/widgets/animation/sub-attaq/qanimationstate.h
@@ -80,9 +80,9 @@ signals:
void animationFinished();
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE;
- void onExit(QEvent *) Q_DECL_OVERRIDE;
- bool event(QEvent *e) Q_DECL_OVERRIDE;
+ void onEntry(QEvent *) override;
+ void onExit(QEvent *) override;
+ bool event(QEvent *e) override;
private:
Q_DISABLE_COPY(QAnimationState)
diff --git a/examples/widgets/animation/sub-attaq/states.h b/examples/widgets/animation/sub-attaq/states.h
index 5b6b38bee7..1d50abbf02 100644
--- a/examples/widgets/animation/sub-attaq/states.h
+++ b/examples/widgets/animation/sub-attaq/states.h
@@ -72,7 +72,7 @@ public:
~PlayState();
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE;
+ void onEntry(QEvent *) override;
private :
GraphicsScene *scene;
@@ -94,7 +94,7 @@ class LevelState : public QState
public:
LevelState(GraphicsScene *scene, PlayState *game, QState *parent = 0);
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE;
+ void onEntry(QEvent *) override;
private :
void initializeLevel();
GraphicsScene *scene;
@@ -107,8 +107,8 @@ public:
explicit PauseState(GraphicsScene *scene, QState *parent = 0);
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE;
- void onExit(QEvent *) Q_DECL_OVERRIDE;
+ void onEntry(QEvent *) override;
+ void onExit(QEvent *) override;
private :
GraphicsScene *scene;
};
@@ -119,8 +119,8 @@ public:
LostState(GraphicsScene *scene, PlayState *game, QState *parent = 0);
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE;
- void onExit(QEvent *) Q_DECL_OVERRIDE;
+ void onEntry(QEvent *) override;
+ void onExit(QEvent *) override;
private :
GraphicsScene *scene;
PlayState *game;
@@ -132,8 +132,8 @@ public:
WinState(GraphicsScene *scene, PlayState *game, QState *parent = 0);
protected:
- void onEntry(QEvent *) Q_DECL_OVERRIDE;
- void onExit(QEvent *) Q_DECL_OVERRIDE;
+ void onEntry(QEvent *) override;
+ void onExit(QEvent *) override;
private :
GraphicsScene *scene;
PlayState *game;
@@ -152,7 +152,7 @@ class UpdateScoreTransition : public QSignalTransition
public:
UpdateScoreTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target);
protected:
- virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE;
+ virtual bool eventTest(QEvent *event) override;
private:
PlayState * game;
GraphicsScene *scene;
@@ -164,7 +164,7 @@ class WinTransition : public QSignalTransition
public:
WinTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target);
protected:
- virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE;
+ virtual bool eventTest(QEvent *event) override;
private:
PlayState * game;
GraphicsScene *scene;
@@ -176,7 +176,7 @@ private:
public:
CustomSpaceTransition(QWidget *widget, PlayState *game, QEvent::Type type, int key);
protected:
- virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE;
+ virtual bool eventTest(QEvent *event) override;
private:
PlayState *game;
};
diff --git a/examples/widgets/animation/sub-attaq/submarine.h b/examples/widgets/animation/sub-attaq/submarine.h
index 179fe62ed0..abfdca6195 100644
--- a/examples/widgets/animation/sub-attaq/submarine.h
+++ b/examples/widgets/animation/sub-attaq/submarine.h
@@ -81,7 +81,7 @@ public:
void launchTorpedo(int speed);
void destroy();
- virtual int type() const Q_DECL_OVERRIDE;
+ virtual int type() const override;
QGraphicsRotation *rotation() const { return graphicsRotation; }
diff --git a/examples/widgets/animation/sub-attaq/submarine_p.h b/examples/widgets/animation/sub-attaq/submarine_p.h
index 72aa761ed4..b8d5532962 100644
--- a/examples/widgets/animation/sub-attaq/submarine_p.h
+++ b/examples/widgets/animation/sub-attaq/submarine_p.h
@@ -93,7 +93,7 @@ protected slots:
}
protected:
- void onEntry(QEvent *e) Q_DECL_OVERRIDE
+ void onEntry(QEvent *e) override
{
if (submarine->currentDirection() == SubMarine::Left) {
movementAnimation->setEndValue(QPointF(0,submarine->y()));
@@ -125,14 +125,14 @@ public:
}
protected:
- void onEntry(QEvent *e) Q_DECL_OVERRIDE
+ void onEntry(QEvent *e) override
{
returnAnimation->stop();
returnAnimation->setEndValue(submarine->currentDirection() == SubMarine::Right ? 360. : 180.);
QAnimationState::onEntry(e);
}
- void onExit(QEvent *e) Q_DECL_OVERRIDE
+ void onExit(QEvent *e) override
{
submarine->currentDirection() == SubMarine::Right ? submarine->setCurrentDirection(SubMarine::Left) : submarine->setCurrentDirection(SubMarine::Right);
QAnimationState::onExit(e);
diff --git a/examples/widgets/desktop/screenshot/screenshot.h b/examples/widgets/desktop/screenshot/screenshot.h
index 6db722fa76..240952120d 100644
--- a/examples/widgets/desktop/screenshot/screenshot.h
+++ b/examples/widgets/desktop/screenshot/screenshot.h
@@ -74,7 +74,7 @@ public:
Screenshot();
protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) override;
private slots:
void newScreenshot();
diff --git a/examples/widgets/desktop/systray/window.h b/examples/widgets/desktop/systray/window.h
index b9ebe2c57f..001338df0c 100644
--- a/examples/widgets/desktop/systray/window.h
+++ b/examples/widgets/desktop/systray/window.h
@@ -78,10 +78,10 @@ class Window : public QDialog
public:
Window();
- void setVisible(bool visible) Q_DECL_OVERRIDE;
+ void setVisible(bool visible) override;
protected:
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void setIcon(int index);
diff --git a/examples/widgets/dialogs/classwizard/classwizard.h b/examples/widgets/dialogs/classwizard/classwizard.h
index 8be08f180c..fee0f6df66 100644
--- a/examples/widgets/dialogs/classwizard/classwizard.h
+++ b/examples/widgets/dialogs/classwizard/classwizard.h
@@ -69,7 +69,7 @@ class ClassWizard : public QWizard
public:
ClassWizard(QWidget *parent = 0);
- void accept() Q_DECL_OVERRIDE;
+ void accept() override;
};
//! [0]
@@ -117,7 +117,7 @@ public:
CodeStylePage(QWidget *parent = 0);
protected:
- void initializePage() Q_DECL_OVERRIDE;
+ void initializePage() override;
private:
QCheckBox *commentCheckBox;
@@ -138,7 +138,7 @@ public:
OutputFilesPage(QWidget *parent = 0);
protected:
- void initializePage() Q_DECL_OVERRIDE;
+ void initializePage() override;
private:
QLabel *outputDirLabel;
@@ -157,7 +157,7 @@ public:
ConclusionPage(QWidget *parent = 0);
protected:
- void initializePage() Q_DECL_OVERRIDE;
+ void initializePage() override;
private:
QLabel *label;
diff --git a/examples/widgets/dialogs/licensewizard/licensewizard.h b/examples/widgets/dialogs/licensewizard/licensewizard.h
index 4e7e6feb09..c7709d88b3 100644
--- a/examples/widgets/dialogs/licensewizard/licensewizard.h
+++ b/examples/widgets/dialogs/licensewizard/licensewizard.h
@@ -88,7 +88,7 @@ class IntroPage : public QWizardPage
public:
IntroPage(QWidget *parent = 0);
- int nextId() const Q_DECL_OVERRIDE;
+ int nextId() const override;
private:
QLabel *topLabel;
@@ -105,7 +105,7 @@ class EvaluatePage : public QWizardPage
public:
EvaluatePage(QWidget *parent = 0);
- int nextId() const Q_DECL_OVERRIDE;
+ int nextId() const override;
private:
QLabel *nameLabel;
@@ -122,7 +122,7 @@ class RegisterPage : public QWizardPage
public:
RegisterPage(QWidget *parent = 0);
- int nextId() const Q_DECL_OVERRIDE;
+ int nextId() const override;
private:
QLabel *nameLabel;
@@ -138,7 +138,7 @@ class DetailsPage : public QWizardPage
public:
DetailsPage(QWidget *parent = 0);
- int nextId() const Q_DECL_OVERRIDE;
+ int nextId() const override;
private:
QLabel *companyLabel;
@@ -157,9 +157,9 @@ class ConclusionPage : public QWizardPage
public:
ConclusionPage(QWidget *parent = 0);
- void initializePage() Q_DECL_OVERRIDE;
- int nextId() const Q_DECL_OVERRIDE;
- void setVisible(bool visible) Q_DECL_OVERRIDE;
+ void initializePage() override;
+ int nextId() const override;
+ void setVisible(bool visible) override;
private slots:
void printButtonClicked();
diff --git a/examples/widgets/draganddrop/draggableicons/dragwidget.h b/examples/widgets/draganddrop/draggableicons/dragwidget.h
index 3d02742530..18be074b61 100644
--- a/examples/widgets/draganddrop/draggableicons/dragwidget.h
+++ b/examples/widgets/draganddrop/draggableicons/dragwidget.h
@@ -65,10 +65,10 @@ public:
DragWidget(QWidget *parent = 0);
protected:
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
};
//! [0]
diff --git a/examples/widgets/draganddrop/draggabletext/dragwidget.h b/examples/widgets/draganddrop/draggabletext/dragwidget.h
index aa686fd4a4..24d1f6f5c7 100644
--- a/examples/widgets/draganddrop/draggabletext/dragwidget.h
+++ b/examples/widgets/draganddrop/draggabletext/dragwidget.h
@@ -64,9 +64,9 @@ public:
DragWidget(QWidget *parent = 0);
protected:
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
};
#endif // DRAGWIDGET_H
diff --git a/examples/widgets/draganddrop/dropsite/droparea.h b/examples/widgets/draganddrop/dropsite/droparea.h
index 71084318c1..5b6e209dfa 100644
--- a/examples/widgets/draganddrop/dropsite/droparea.h
+++ b/examples/widgets/draganddrop/dropsite/droparea.h
@@ -74,10 +74,10 @@ signals:
//! [DropArea header part2]
protected:
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dragLeaveEvent(QDragLeaveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
private:
QLabel *label;
diff --git a/examples/widgets/draganddrop/fridgemagnets/dragwidget.h b/examples/widgets/draganddrop/fridgemagnets/dragwidget.h
index 1117822fe2..104e500134 100644
--- a/examples/widgets/draganddrop/fridgemagnets/dragwidget.h
+++ b/examples/widgets/draganddrop/fridgemagnets/dragwidget.h
@@ -65,10 +65,10 @@ public:
DragWidget(QWidget *parent = 0);
protected:
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
};
//! [0]
diff --git a/examples/widgets/draganddrop/puzzle/pieceslist.h b/examples/widgets/draganddrop/puzzle/pieceslist.h
index 2cd6c83373..b67d2bdaf7 100644
--- a/examples/widgets/draganddrop/puzzle/pieceslist.h
+++ b/examples/widgets/draganddrop/puzzle/pieceslist.h
@@ -64,10 +64,10 @@ public:
static QString puzzleMimeType() { return QStringLiteral("image/x-puzzle-piece"); }
protected:
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
- void startDrag(Qt::DropActions supportedActions) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
+ void startDrag(Qt::DropActions supportedActions) override;
int m_PieceSize;
};
diff --git a/examples/widgets/draganddrop/puzzle/puzzlewidget.h b/examples/widgets/draganddrop/puzzle/puzzlewidget.h
index 48c66b7b58..7dcb7dd497 100644
--- a/examples/widgets/draganddrop/puzzle/puzzlewidget.h
+++ b/examples/widgets/draganddrop/puzzle/puzzlewidget.h
@@ -77,12 +77,12 @@ signals:
void puzzleCompleted();
protected:
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragLeaveEvent(QDragLeaveEvent *event) override;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
private:
const QRect targetSquare(const QPoint &position) const;
diff --git a/examples/widgets/effects/blurpicker/blureffect.h b/examples/widgets/effects/blurpicker/blureffect.h
index 2ae2519bd7..241a0ea535 100644
--- a/examples/widgets/effects/blurpicker/blureffect.h
+++ b/examples/widgets/effects/blurpicker/blureffect.h
@@ -63,7 +63,7 @@ public:
QRectF boundingRect() const;
- void draw(QPainter *painter) Q_DECL_OVERRIDE;
+ void draw(QPainter *painter) override;
private:
void adjustForItem();
diff --git a/examples/widgets/effects/blurpicker/blurpicker.h b/examples/widgets/effects/blurpicker/blurpicker.h
index ba004a0a2b..3f444419a8 100644
--- a/examples/widgets/effects/blurpicker/blurpicker.h
+++ b/examples/widgets/effects/blurpicker/blurpicker.h
@@ -69,9 +69,9 @@ public:
void setIndex(qreal);
protected:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
private:
void setupScene();
diff --git a/examples/widgets/effects/lighting/lighting.h b/examples/widgets/effects/lighting/lighting.h
index e77024b1c6..615824d46f 100644
--- a/examples/widgets/effects/lighting/lighting.h
+++ b/examples/widgets/effects/lighting/lighting.h
@@ -68,7 +68,7 @@ private:
void setupScene();
protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) override;
private:
qreal angle;
diff --git a/examples/widgets/gestures/imagegestures/imagewidget.h b/examples/widgets/gestures/imagegestures/imagewidget.h
index 9ffc7491de..5e92541067 100644
--- a/examples/widgets/gestures/imagegestures/imagewidget.h
+++ b/examples/widgets/gestures/imagegestures/imagewidget.h
@@ -75,10 +75,10 @@ public:
void grabGestures(const QList<Qt::GestureType> &gestures);
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
private:
bool gestureEvent(QGestureEvent *event);
diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h b/examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h
index 8a940738a6..3535a26670 100644
--- a/examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h
+++ b/examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h
@@ -61,12 +61,12 @@ public:
LayoutItem(QGraphicsItem *parent = 0);
~LayoutItem();
// Inherited from QGraphicsLayoutItem
- void setGeometry(const QRectF &geom) Q_DECL_OVERRIDE;
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
+ void setGeometry(const QRectF &geom) override;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
// Inherited from QGraphicsItem
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
QPixmap *m_pix;
diff --git a/examples/widgets/graphicsview/boxes/glbuffers.h b/examples/widgets/graphicsview/boxes/glbuffers.h
index 25ab66fca6..0c2ff43c7e 100644
--- a/examples/widgets/graphicsview/boxes/glbuffers.h
+++ b/examples/widgets/graphicsview/boxes/glbuffers.h
@@ -110,8 +110,8 @@ public:
GLTexture2D(int width, int height);
explicit GLTexture2D(const QString& fileName, int width = 0, int height = 0);
void load(int width, int height, QRgb *data);
- virtual void bind() Q_DECL_OVERRIDE;
- virtual void unbind() Q_DECL_OVERRIDE;
+ virtual void bind() override;
+ virtual void unbind() override;
};
class GLTexture3D : public GLTexture
@@ -121,8 +121,8 @@ public:
// TODO: Implement function below
//GLTexture3D(const QString& fileName, int width = 0, int height = 0);
void load(int width, int height, int depth, QRgb *data);
- virtual void bind() Q_DECL_OVERRIDE;
- virtual void unbind() Q_DECL_OVERRIDE;
+ virtual void bind() override;
+ virtual void unbind() override;
};
class GLTextureCube : public GLTexture
@@ -131,8 +131,8 @@ public:
GLTextureCube(int size);
explicit GLTextureCube(const QStringList& fileNames, int size = 0);
void load(int size, int face, QRgb *data);
- virtual void bind() Q_DECL_OVERRIDE;
- virtual void unbind() Q_DECL_OVERRIDE;
+ virtual void bind() override;
+ virtual void unbind() override;
};
// TODO: Define and implement class below
@@ -146,7 +146,7 @@ public:
void begin(int face);
// end rendering
void end();
- virtual bool failed() const Q_DECL_OVERRIDE {return m_failed || m_fbo.failed();}
+ virtual bool failed() const override {return m_failed || m_fbo.failed();}
static void getViewMatrix(QMatrix4x4& mat, int face);
static void getProjectionMatrix(QMatrix4x4& mat, float nearZ, float farZ);
diff --git a/examples/widgets/graphicsview/boxes/main.cpp b/examples/widgets/graphicsview/boxes/main.cpp
index cc708e9433..b7242d529b 100644
--- a/examples/widgets/graphicsview/boxes/main.cpp
+++ b/examples/widgets/graphicsview/boxes/main.cpp
@@ -67,7 +67,7 @@ public:
}
protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE {
+ void resizeEvent(QResizeEvent *event) override {
if (scene())
scene()->setSceneRect(QRect(QPoint(0, 0), event->size()));
QGraphicsView::resizeEvent(event);
diff --git a/examples/widgets/graphicsview/boxes/qtbox.h b/examples/widgets/graphicsview/boxes/qtbox.h
index 6eb3a39224..e283dccfb4 100644
--- a/examples/widgets/graphicsview/boxes/qtbox.h
+++ b/examples/widgets/graphicsview/boxes/qtbox.h
@@ -63,18 +63,18 @@ public:
ItemBase(int size, int x, int y);
virtual ~ItemBase();
- virtual QRectF boundingRect() const Q_DECL_OVERRIDE;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ virtual QRectF boundingRect() const override;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
protected:
virtual ItemBase *createNew(int size, int x, int y) = 0;
- virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE;
- virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- virtual void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- virtual void wheelEvent(QGraphicsSceneWheelEvent *event) Q_DECL_OVERRIDE;
- virtual int type() const Q_DECL_OVERRIDE;
+ virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
+ virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
+ virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
+ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
+ virtual void keyPressEvent(QKeyEvent *event) override;
+ virtual void wheelEvent(QGraphicsSceneWheelEvent *event) override;
+ virtual int type() const override;
bool isInResizeArea(const QPointF &pos);
static void duplicateSelectedItems(QGraphicsScene *scene);
@@ -92,9 +92,9 @@ class QtBox : public ItemBase
public:
QtBox(int size, int x, int y);
virtual ~QtBox();
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
protected:
- virtual ItemBase *createNew(int size, int x, int y) Q_DECL_OVERRIDE;
+ virtual ItemBase *createNew(int size, int x, int y) override;
private:
QVector3D m_vertices[8];
QVector3D m_texCoords[4];
@@ -106,9 +106,9 @@ class CircleItem : public ItemBase
{
public:
CircleItem(int size, int x, int y);
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
protected:
- virtual ItemBase *createNew(int size, int x, int y) Q_DECL_OVERRIDE;
+ virtual ItemBase *createNew(int size, int x, int y) override;
QColor m_color;
};
@@ -117,9 +117,9 @@ class SquareItem : public ItemBase
{
public:
SquareItem(int size, int x, int y);
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
protected:
- virtual ItemBase *createNew(int size, int x, int y) Q_DECL_OVERRIDE;
+ virtual ItemBase *createNew(int size, int x, int y) override;
QPixmap m_image;
};
diff --git a/examples/widgets/graphicsview/boxes/scene.h b/examples/widgets/graphicsview/boxes/scene.h
index 843b48a656..b76fb1057c 100644
--- a/examples/widgets/graphicsview/boxes/scene.h
+++ b/examples/widgets/graphicsview/boxes/scene.h
@@ -81,13 +81,13 @@ class ColorEdit : public ParameterEdit
public:
ColorEdit(QRgb initialColor, int id);
QRgb color() const {return m_color;}
- virtual void emitChange() Q_DECL_OVERRIDE {emit colorChanged(m_color, m_id);}
+ virtual void emitChange() override { emit colorChanged(m_color, m_id); }
public slots:
void editDone();
signals:
void colorChanged(QRgb color, int id);
protected:
- virtual void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ virtual void mousePressEvent(QMouseEvent *event) override;
void setColor(QRgb color); // also emits colorChanged()
private:
QGraphicsScene *m_dialogParentScene;
@@ -103,7 +103,7 @@ class FloatEdit : public ParameterEdit
public:
FloatEdit(float initialValue, int id);
float value() const {return m_value;}
- virtual void emitChange() Q_DECL_OVERRIDE {emit valueChanged(m_value, m_id);}
+ virtual void emitChange() override { emit valueChanged(m_value, m_id); }
public slots:
void editDone();
signals:
@@ -120,9 +120,9 @@ class GraphicsWidget : public QGraphicsProxyWidget
public:
GraphicsWidget() : QGraphicsProxyWidget(0, Qt::Window) {}
protected:
- virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
- virtual void resizeEvent(QGraphicsSceneResizeEvent *event) Q_DECL_OVERRIDE;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
+ virtual void resizeEvent(QGraphicsSceneResizeEvent *event) override;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
};
class TwoSidedGraphicsWidget : public QObject
@@ -162,7 +162,7 @@ signals:
void shaderChanged(int);
void doubleClicked();
protected:
- virtual void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
QVector<QByteArray> m_parameterNames;
QComboBox *m_textureCombo;
@@ -189,7 +189,7 @@ signals:
void doubleClicked();
void newItemTriggered(ItemDialog::ItemType type);
protected:
- virtual void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
};
class Scene : public QGraphicsScene
@@ -198,7 +198,7 @@ class Scene : public QGraphicsScene
public:
Scene(int width, int height, int maxTextureSize);
~Scene();
- virtual void drawBackground(QPainter *painter, const QRectF &rect) Q_DECL_OVERRIDE;
+ virtual void drawBackground(QPainter *painter, const QRectF &rect) override;
public slots:
void setShader(int index);
@@ -214,10 +214,10 @@ protected:
void defaultStates();
void renderCubemaps();
- virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- virtual void wheelEvent(QGraphicsSceneWheelEvent * event) Q_DECL_OVERRIDE;
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
+ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
+ virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
+ virtual void wheelEvent(QGraphicsSceneWheelEvent * event) override;
private:
void initGL();
QPointF pixelPosToViewPos(const QPointF& p);
diff --git a/examples/widgets/graphicsview/chip/chip.h b/examples/widgets/graphicsview/chip/chip.h
index c1d6523122..f3d54e6295 100644
--- a/examples/widgets/graphicsview/chip/chip.h
+++ b/examples/widgets/graphicsview/chip/chip.h
@@ -59,14 +59,14 @@ class Chip : public QGraphicsItem
public:
Chip(const QColor &color, int x, int y);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget) override;
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
private:
int x;
diff --git a/examples/widgets/graphicsview/chip/view.h b/examples/widgets/graphicsview/chip/view.h
index 8f0049c628..2d174250c2 100644
--- a/examples/widgets/graphicsview/chip/view.h
+++ b/examples/widgets/graphicsview/chip/view.h
@@ -70,7 +70,7 @@ public:
protected:
#ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *) override;
#endif
private:
diff --git a/examples/widgets/graphicsview/collidingmice/mouse.h b/examples/widgets/graphicsview/collidingmice/mouse.h
index 1cc0d52c62..bd9e592242 100644
--- a/examples/widgets/graphicsview/collidingmice/mouse.h
+++ b/examples/widgets/graphicsview/collidingmice/mouse.h
@@ -59,13 +59,13 @@ class Mouse : public QGraphicsItem
public:
Mouse();
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
- QWidget *widget) Q_DECL_OVERRIDE;
+ QWidget *widget) override;
protected:
- void advance(int step) Q_DECL_OVERRIDE;
+ void advance(int step) override;
private:
qreal angle;
diff --git a/examples/widgets/graphicsview/diagramscene/arrow.h b/examples/widgets/graphicsview/diagramscene/arrow.h
index 2252091d4b..e0fa389d53 100644
--- a/examples/widgets/graphicsview/diagramscene/arrow.h
+++ b/examples/widgets/graphicsview/diagramscene/arrow.h
@@ -73,9 +73,9 @@ public:
Arrow(DiagramItem *startItem, DiagramItem *endItem,
QGraphicsItem *parent = 0);
- int type() const Q_DECL_OVERRIDE { return Type; }
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
+ int type() const override { return Type; }
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
void setColor(const QColor &color) { myColor = color; }
DiagramItem *startItem() const { return myStartItem; }
DiagramItem *endItem() const { return myEndItem; }
@@ -83,7 +83,7 @@ public:
void updatePosition();
protected:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
DiagramItem *myStartItem;
diff --git a/examples/widgets/graphicsview/diagramscene/diagramitem.h b/examples/widgets/graphicsview/diagramscene/diagramitem.h
index f1c4222aed..3a43ec57fc 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramitem.h
+++ b/examples/widgets/graphicsview/diagramscene/diagramitem.h
@@ -85,11 +85,11 @@ public:
QPolygonF polygon() const { return myPolygon; }
void addArrow(Arrow *arrow);
QPixmap image() const;
- int type() const Q_DECL_OVERRIDE { return Type;}
+ int type() const override { return Type;}
protected:
- void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE;
- QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
+ void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
private:
DiagramType myDiagramType;
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.h b/examples/widgets/graphicsview/diagramscene/diagramscene.h
index 6f38201f00..95f7f3c621 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramscene.h
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene.h
@@ -95,9 +95,9 @@ signals:
void itemSelected(QGraphicsItem *item);
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) Q_DECL_OVERRIDE;
+ void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) override;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) override;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) override;
private:
bool isItemChange(int type);
diff --git a/examples/widgets/graphicsview/diagramscene/diagramtextitem.h b/examples/widgets/graphicsview/diagramscene/diagramtextitem.h
index 9db03141b1..f5d3d3b95e 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramtextitem.h
+++ b/examples/widgets/graphicsview/diagramscene/diagramtextitem.h
@@ -71,16 +71,16 @@ public:
DiagramTextItem(QGraphicsItem *parent = 0);
- int type() const Q_DECL_OVERRIDE { return Type; }
+ int type() const override { return Type; }
signals:
void lostFocus(DiagramTextItem *item);
void selectedChange(QGraphicsItem *item);
protected:
- QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
+ void focusOutEvent(QFocusEvent *event) override;
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
};
//! [0]
diff --git a/examples/widgets/graphicsview/dragdroprobot/coloritem.h b/examples/widgets/graphicsview/dragdroprobot/coloritem.h
index 9c7471ffbd..7701928c27 100644
--- a/examples/widgets/graphicsview/dragdroprobot/coloritem.h
+++ b/examples/widgets/graphicsview/dragdroprobot/coloritem.h
@@ -59,13 +59,13 @@ class ColorItem : public QGraphicsItem
public:
ColorItem();
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
private:
QColor color;
diff --git a/examples/widgets/graphicsview/dragdroprobot/main.cpp b/examples/widgets/graphicsview/dragdroprobot/main.cpp
index 6906976cb6..ff3758ac60 100644
--- a/examples/widgets/graphicsview/dragdroprobot/main.cpp
+++ b/examples/widgets/graphicsview/dragdroprobot/main.cpp
@@ -63,7 +63,7 @@ public:
}
protected:
- virtual void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE
+ virtual void resizeEvent(QResizeEvent *) override
{
}
};
diff --git a/examples/widgets/graphicsview/dragdroprobot/robot.h b/examples/widgets/graphicsview/dragdroprobot/robot.h
index 8e20bf2cbf..e25966c7c4 100644
--- a/examples/widgets/graphicsview/dragdroprobot/robot.h
+++ b/examples/widgets/graphicsview/dragdroprobot/robot.h
@@ -65,9 +65,9 @@ public:
RobotPart(QGraphicsItem *parent = 0);
protected:
- void dragEnterEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dropEvent(QGraphicsSceneDragDropEvent *event) override;
QColor color;
bool dragOver;
@@ -80,12 +80,12 @@ class RobotHead : public RobotPart
public:
RobotHead(QGraphicsItem *parent = 0);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
protected:
- void dragEnterEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QGraphicsSceneDragDropEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override;
+ void dropEvent(QGraphicsSceneDragDropEvent *event) override;
private:
QPixmap pixmap;
@@ -98,8 +98,8 @@ class RobotTorso : public RobotPart
public:
RobotTorso(QGraphicsItem *parent = 0);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
};
//! [2]
@@ -109,8 +109,8 @@ class RobotLimb : public RobotPart
public:
RobotLimb(QGraphicsItem *parent = 0);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
};
//! [3]
@@ -120,8 +120,8 @@ class Robot : public RobotPart
public:
Robot(QGraphicsItem *parent = 0);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
};
//! [4]
diff --git a/examples/widgets/graphicsview/elasticnodes/edge.h b/examples/widgets/graphicsview/elasticnodes/edge.h
index 6409af3a89..19072b8b33 100644
--- a/examples/widgets/graphicsview/elasticnodes/edge.h
+++ b/examples/widgets/graphicsview/elasticnodes/edge.h
@@ -67,11 +67,11 @@ public:
void adjust();
enum { Type = UserType + 2 };
- int type() const Q_DECL_OVERRIDE { return Type; }
+ int type() const override { return Type; }
protected:
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
Node *source, *dest;
diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.h b/examples/widgets/graphicsview/elasticnodes/graphwidget.h
index 2b26cb6d67..79acb89985 100644
--- a/examples/widgets/graphicsview/elasticnodes/graphwidget.h
+++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.h
@@ -71,12 +71,12 @@ public slots:
void zoomOut();
protected:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
+ void timerEvent(QTimerEvent *event) override;
#ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *event) override;
#endif
- void drawBackground(QPainter *painter, const QRectF &rect) Q_DECL_OVERRIDE;
+ void drawBackground(QPainter *painter, const QRectF &rect) override;
void scaleView(qreal scaleFactor);
diff --git a/examples/widgets/graphicsview/elasticnodes/node.h b/examples/widgets/graphicsview/elasticnodes/node.h
index 6c8a49ca4f..487ae0d68e 100644
--- a/examples/widgets/graphicsview/elasticnodes/node.h
+++ b/examples/widgets/graphicsview/elasticnodes/node.h
@@ -70,20 +70,20 @@ public:
QList<Edge *> edges() const;
enum { Type = UserType + 1 };
- int type() const Q_DECL_OVERRIDE { return Type; }
+ int type() const override { return Type; }
void calculateForces();
bool advance();
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QPainterPath shape() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
protected:
- QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
- void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
private:
QList<Edge *> edgeList;
diff --git a/examples/widgets/graphicsview/embeddeddialogs/customproxy.h b/examples/widgets/graphicsview/embeddeddialogs/customproxy.h
index 05ae087931..36209b7073 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/customproxy.h
+++ b/examples/widgets/graphicsview/embeddeddialogs/customproxy.h
@@ -61,15 +61,15 @@ class CustomProxy : public QGraphicsProxyWidget
public:
explicit CustomProxy(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
void paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option,
- QWidget *widget) Q_DECL_OVERRIDE;
+ QWidget *widget) override;
protected:
- void hoverEnterEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
- bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) Q_DECL_OVERRIDE;
- QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
+ bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
private slots:
void updateStep(qreal step);
diff --git a/examples/widgets/graphicsview/flowlayout/flowlayout.h b/examples/widgets/graphicsview/flowlayout/flowlayout.h
index cb3d2ad590..808f5d2c77 100644
--- a/examples/widgets/graphicsview/flowlayout/flowlayout.h
+++ b/examples/widgets/graphicsview/flowlayout/flowlayout.h
@@ -60,14 +60,14 @@ public:
qreal spacing(Qt::Orientation o) const;
// inherited functions
- void setGeometry(const QRectF &geom) Q_DECL_OVERRIDE;
+ void setGeometry(const QRectF &geom) override;
- int count() const Q_DECL_OVERRIDE;
- QGraphicsLayoutItem *itemAt(int index) const Q_DECL_OVERRIDE;
- void removeAt(int index) Q_DECL_OVERRIDE;
+ int count() const override;
+ QGraphicsLayoutItem *itemAt(int index) const override;
+ void removeAt(int index) override;
protected:
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
private:
qreal doLayout(const QRectF &geom, bool applyNewGeometry) const;
diff --git a/examples/widgets/graphicsview/padnavigator/padnavigator.h b/examples/widgets/graphicsview/padnavigator/padnavigator.h
index 1fcc9b0cf3..00cf2c0212 100644
--- a/examples/widgets/graphicsview/padnavigator/padnavigator.h
+++ b/examples/widgets/graphicsview/padnavigator/padnavigator.h
@@ -67,7 +67,7 @@ public:
explicit PadNavigator(const QSize &size, QWidget *parent = 0);
protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) override;
private:
Ui::Form form;
diff --git a/examples/widgets/graphicsview/padnavigator/roundrectitem.h b/examples/widgets/graphicsview/padnavigator/roundrectitem.h
index 3fbf8d2c2f..e76862c08c 100644
--- a/examples/widgets/graphicsview/padnavigator/roundrectitem.h
+++ b/examples/widgets/graphicsview/padnavigator/roundrectitem.h
@@ -66,8 +66,8 @@ public:
QPixmap pixmap() const;
void setPixmap(const QPixmap &pixmap);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
bool fill() const;
void setFill(bool fill);
diff --git a/examples/widgets/graphicsview/padnavigator/splashitem.h b/examples/widgets/graphicsview/padnavigator/splashitem.h
index 6945e90a86..2ad54f82a1 100644
--- a/examples/widgets/graphicsview/padnavigator/splashitem.h
+++ b/examples/widgets/graphicsview/padnavigator/splashitem.h
@@ -60,8 +60,8 @@ class SplashItem : public QGraphicsObject
public:
explicit SplashItem(QGraphicsItem *parent = 0);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
QString text;
diff --git a/examples/widgets/graphicsview/simpleanchorlayout/main.cpp b/examples/widgets/graphicsview/simpleanchorlayout/main.cpp
index 99cb2d01fa..299a5ad7bd 100644
--- a/examples/widgets/graphicsview/simpleanchorlayout/main.cpp
+++ b/examples/widgets/graphicsview/simpleanchorlayout/main.cpp
@@ -62,7 +62,7 @@ public:
{
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * = 0) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * = 0) override
{
QFont font;
font.setPixelSize(0.75 * qMin(boundingRect().width(), boundingRect().height()));
diff --git a/examples/widgets/graphicsview/weatheranchorlayout/main.cpp b/examples/widgets/graphicsview/weatheranchorlayout/main.cpp
index 01ce1ce0f0..ec1f73bf9c 100644
--- a/examples/widgets/graphicsview/weatheranchorlayout/main.cpp
+++ b/examples/widgets/graphicsview/weatheranchorlayout/main.cpp
@@ -69,7 +69,7 @@ public:
{
}
- virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE
+ virtual void resizeEvent(QResizeEvent *event) override
{
w->setGeometry(0, 0, event->size().width(), event->size().height());
}
@@ -101,7 +101,7 @@ public:
original->setZValue(z);
}
- void setGeometry (const QRectF &rect) Q_DECL_OVERRIDE
+ void setGeometry (const QRectF &rect) override
{
original->setTransform(QTransform::fromScale(rect.width() / r.width(),
rect.height() / r.height()), true);
@@ -110,7 +110,7 @@ public:
}
protected:
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override
{
Q_UNUSED(constraint);
QSizeF sh;
@@ -148,7 +148,7 @@ public:
{
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
{
QPointF reflection = QPointF();
reflection.setY(scaled.height() + 2);
@@ -180,14 +180,14 @@ public:
painter->drawPixmap(reflection, tmp);
}
- void resizeEvent(QGraphicsSceneResizeEvent *event) Q_DECL_OVERRIDE
+ void resizeEvent(QGraphicsSceneResizeEvent *event) override
{
QSize newSize = event->newSize().toSize();
newSize.setHeight(newSize.height() / 2);
scaled = original.scaled(newSize);
}
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
QSize size(scaled.width(), scaled.height() * 2 + 2);
return QRectF(QPointF(0, 0), size);
diff --git a/examples/widgets/itemviews/addressbook/tablemodel.h b/examples/widgets/itemviews/addressbook/tablemodel.h
index de81df1430..9a669c508d 100644
--- a/examples/widgets/itemviews/addressbook/tablemodel.h
+++ b/examples/widgets/itemviews/addressbook/tablemodel.h
@@ -64,14 +64,14 @@ public:
TableModel(QObject *parent = 0);
TableModel(QList<QPair<QString, QString> > listofPairs, QObject *parent = 0);
- int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
- QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
- bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex()) Q_DECL_OVERRIDE;
- bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex()) Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent) const override;
+ int columnCount(const QModelIndex &parent) const override;
+ QVariant data(const QModelIndex &index, int role) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
+ bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex()) override;
+ bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex()) override;
QList<QPair<QString, QString> > getList();
private:
diff --git a/examples/widgets/itemviews/chart/pieview.h b/examples/widgets/itemviews/chart/pieview.h
index 9e2011499e..aa397e6d55 100644
--- a/examples/widgets/itemviews/chart/pieview.h
+++ b/examples/widgets/itemviews/chart/pieview.h
@@ -61,44 +61,44 @@ class PieView : public QAbstractItemView
public:
PieView(QWidget *parent = 0);
- QRect visualRect(const QModelIndex &index) const Q_DECL_OVERRIDE;
- void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible) Q_DECL_OVERRIDE;
- QModelIndex indexAt(const QPoint &point) const Q_DECL_OVERRIDE;
+ QRect visualRect(const QModelIndex &index) const override;
+ void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible) override;
+ QModelIndex indexAt(const QPoint &point) const override;
protected slots:
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
- const QVector<int> &roles = QVector<int>()) Q_DECL_OVERRIDE;
- void rowsInserted(const QModelIndex &parent, int start, int end) Q_DECL_OVERRIDE;
- void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) Q_DECL_OVERRIDE;
+ const QVector<int> &roles = QVector<int>()) override;
+ void rowsInserted(const QModelIndex &parent, int start, int end) override;
+ void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) override;
protected:
- bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event) Q_DECL_OVERRIDE;
+ bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event) override;
QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction,
- Qt::KeyboardModifiers modifiers) Q_DECL_OVERRIDE;
+ Qt::KeyboardModifiers modifiers) override;
- int horizontalOffset() const Q_DECL_OVERRIDE;
- int verticalOffset() const Q_DECL_OVERRIDE;
+ int horizontalOffset() const override;
+ int verticalOffset() const override;
- bool isIndexHidden(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ bool isIndexHidden(const QModelIndex &index) const override;
- void setSelection(const QRect&, QItemSelectionModel::SelectionFlags command) Q_DECL_OVERRIDE;
+ void setSelection(const QRect&, QItemSelectionModel::SelectionFlags command) override;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void scrollContentsBy(int dx, int dy) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void scrollContentsBy(int dx, int dy) override;
- QRegion visualRegionForSelection(const QItemSelection &selection) const Q_DECL_OVERRIDE;
+ QRegion visualRegionForSelection(const QItemSelection &selection) const override;
private:
QRect itemRect(const QModelIndex &item) const;
QRegion itemRegion(const QModelIndex &index) const;
int rows(const QModelIndex &index = QModelIndex()) const;
- void updateGeometries() Q_DECL_OVERRIDE;
+ void updateGeometries() override;
int margin;
int totalSize;
diff --git a/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.h b/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.h
index 00db49220a..e2aff3c829 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.h
+++ b/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.h
@@ -69,8 +69,8 @@ public:
void setFilterMaximumDate(const QDate &date);
protected:
- bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE;
- bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
+ bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
+ bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
private:
bool dateInRange(const QDate &date) const;
diff --git a/examples/widgets/itemviews/editabletreemodel/treemodel.h b/examples/widgets/itemviews/editabletreemodel/treemodel.h
index e9dfbf63d2..d76d138831 100644
--- a/examples/widgets/itemviews/editabletreemodel/treemodel.h
+++ b/examples/widgets/itemviews/editabletreemodel/treemodel.h
@@ -68,33 +68,33 @@ public:
~TreeModel();
//! [0] //! [1]
- QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role) const override;
QVariant headerData(int section, Qt::Orientation orientation,
- int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column,
- const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex parent(const QModelIndex &index) const override;
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
//! [1]
//! [2]
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value,
- int role = Qt::EditRole) Q_DECL_OVERRIDE;
+ int role = Qt::EditRole) override;
bool setHeaderData(int section, Qt::Orientation orientation,
- const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
+ const QVariant &value, int role = Qt::EditRole) override;
bool insertColumns(int position, int columns,
- const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
+ const QModelIndex &parent = QModelIndex()) override;
bool removeColumns(int position, int columns,
- const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
+ const QModelIndex &parent = QModelIndex()) override;
bool insertRows(int position, int rows,
- const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
+ const QModelIndex &parent = QModelIndex()) override;
bool removeRows(int position, int rows,
- const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
+ const QModelIndex &parent = QModelIndex()) override;
private:
void setupModelData(const QStringList &lines, TreeItem *parent);
diff --git a/examples/widgets/itemviews/fetchmore/filelistmodel.h b/examples/widgets/itemviews/fetchmore/filelistmodel.h
index 79646799b2..9251eaf959 100644
--- a/examples/widgets/itemviews/fetchmore/filelistmodel.h
+++ b/examples/widgets/itemviews/fetchmore/filelistmodel.h
@@ -63,8 +63,8 @@ class FileListModel : public QAbstractListModel
public:
FileListModel(QObject *parent = 0);
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
signals:
void numberPopulated(int number);
@@ -73,8 +73,8 @@ public slots:
void setDirPath(const QString &path);
protected:
- bool canFetchMore(const QModelIndex &parent) const Q_DECL_OVERRIDE;
- void fetchMore(const QModelIndex &parent) Q_DECL_OVERRIDE;
+ bool canFetchMore(const QModelIndex &parent) const override;
+ void fetchMore(const QModelIndex &parent) override;
private:
QStringList fileList;
diff --git a/examples/widgets/itemviews/frozencolumn/freezetablewidget.h b/examples/widgets/itemviews/frozencolumn/freezetablewidget.h
index 137ee83d5d..51c46fb7e7 100644
--- a/examples/widgets/itemviews/frozencolumn/freezetablewidget.h
+++ b/examples/widgets/itemviews/frozencolumn/freezetablewidget.h
@@ -63,9 +63,9 @@ public:
protected:
- virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) Q_DECL_OVERRIDE;
- void scrollTo (const QModelIndex & index, ScrollHint hint = EnsureVisible) Q_DECL_OVERRIDE;
+ virtual void resizeEvent(QResizeEvent *event) override;
+ virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override;
+ void scrollTo (const QModelIndex & index, ScrollHint hint = EnsureVisible) override;
private:
QTableView *frozenTableView;
diff --git a/examples/widgets/itemviews/interview/model.h b/examples/widgets/itemviews/interview/model.h
index cd69cb6986..969cf693b2 100644
--- a/examples/widgets/itemviews/interview/model.h
+++ b/examples/widgets/itemviews/interview/model.h
@@ -64,17 +64,17 @@ public:
Model(int rows, int columns, QObject *parent = 0);
~Model();
- QModelIndex index(int row, int column, const QModelIndex &parent) const Q_DECL_OVERRIDE;
- QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
+ QModelIndex index(int row, int column, const QModelIndex &parent) const override;
+ QModelIndex parent(const QModelIndex &child) const override;
- int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent) const override;
+ int columnCount(const QModelIndex &parent) const override;
- QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
- QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
- bool hasChildren(const QModelIndex &parent) const Q_DECL_OVERRIDE;
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ bool hasChildren(const QModelIndex &parent) const override;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
private:
diff --git a/examples/widgets/itemviews/pixelator/imagemodel.h b/examples/widgets/itemviews/pixelator/imagemodel.h
index 8b476a3d04..c6c510dcac 100644
--- a/examples/widgets/itemviews/pixelator/imagemodel.h
+++ b/examples/widgets/itemviews/pixelator/imagemodel.h
@@ -64,11 +64,11 @@ public:
void setImage(const QImage &image);
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
private:
QImage modelImage;
diff --git a/examples/widgets/itemviews/pixelator/pixeldelegate.h b/examples/widgets/itemviews/pixelator/pixeldelegate.h
index 85ef0e0b1c..d968d9e8d2 100644
--- a/examples/widgets/itemviews/pixelator/pixeldelegate.h
+++ b/examples/widgets/itemviews/pixelator/pixeldelegate.h
@@ -72,10 +72,10 @@ public:
PixelDelegate(QObject *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option,
- const QModelIndex &index ) const Q_DECL_OVERRIDE;
+ const QModelIndex &index ) const override;
public slots:
void setPixelSize(int size);
diff --git a/examples/widgets/itemviews/puzzle/piecesmodel.h b/examples/widgets/itemviews/puzzle/piecesmodel.h
index d7293ffa6c..bd979f4c7e 100644
--- a/examples/widgets/itemviews/puzzle/piecesmodel.h
+++ b/examples/widgets/itemviews/puzzle/piecesmodel.h
@@ -68,16 +68,16 @@ class PiecesModel : public QAbstractListModel
public:
explicit PiecesModel(int pieceSize, QObject *parent = 0);
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
- bool removeRows(int row, int count, const QModelIndex &parent) Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
+ bool removeRows(int row, int count, const QModelIndex &parent) override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
- int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
- QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
- QStringList mimeTypes() const Q_DECL_OVERRIDE;
- int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
- Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
+ int row, int column, const QModelIndex &parent) override;
+ QMimeData *mimeData(const QModelIndexList &indexes) const override;
+ QStringList mimeTypes() const override;
+ int rowCount(const QModelIndex &parent) const override;
+ Qt::DropActions supportedDropActions() const override;
void addPiece(const QPixmap &pixmap, const QPoint &location);
void addPieces(const QPixmap& pixmap);
diff --git a/examples/widgets/itemviews/puzzle/puzzlewidget.h b/examples/widgets/itemviews/puzzle/puzzlewidget.h
index 2b6bd061ba..137e0b7162 100644
--- a/examples/widgets/itemviews/puzzle/puzzlewidget.h
+++ b/examples/widgets/itemviews/puzzle/puzzlewidget.h
@@ -77,12 +77,12 @@ signals:
void puzzleCompleted();
protected:
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragLeaveEvent(QDragLeaveEvent *event) override;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
private:
int findPiece(const QRect &pieceRect) const;
diff --git a/examples/widgets/itemviews/simpledommodel/dommodel.h b/examples/widgets/itemviews/simpledommodel/dommodel.h
index 7028aa89b2..411f58295c 100644
--- a/examples/widgets/itemviews/simpledommodel/dommodel.h
+++ b/examples/widgets/itemviews/simpledommodel/dommodel.h
@@ -66,15 +66,15 @@ public:
explicit DomModel(QDomDocument document, QObject *parent = 0);
~DomModel();
- QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role) const override;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant headerData(int section, Qt::Orientation orientation,
- int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column,
- const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex parent(const QModelIndex &child) const override;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
private:
QDomDocument domDocument;
diff --git a/examples/widgets/itemviews/simpletreemodel/treemodel.h b/examples/widgets/itemviews/simpletreemodel/treemodel.h
index 8c67477d4b..800728fb82 100644
--- a/examples/widgets/itemviews/simpletreemodel/treemodel.h
+++ b/examples/widgets/itemviews/simpletreemodel/treemodel.h
@@ -66,15 +66,15 @@ public:
explicit TreeModel(const QString &data, QObject *parent = 0);
~TreeModel();
- QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role) const override;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant headerData(int section, Qt::Orientation orientation,
- int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column,
- const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE;
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex parent(const QModelIndex &index) const override;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
private:
void setupModelData(const QStringList &lines, TreeItem *parent);
diff --git a/examples/widgets/itemviews/spinboxdelegate/delegate.h b/examples/widgets/itemviews/spinboxdelegate/delegate.h
index 7c9c50706e..47ef1555f7 100644
--- a/examples/widgets/itemviews/spinboxdelegate/delegate.h
+++ b/examples/widgets/itemviews/spinboxdelegate/delegate.h
@@ -62,14 +62,14 @@ public:
SpinBoxDelegate(QObject *parent = 0);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
- void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor,
- const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QStyleOptionViewItem &option, const QModelIndex &index) const override;
};
//! [0]
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h b/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h
index 5fbd4894d5..333467720f 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h
@@ -62,10 +62,10 @@ class SpreadSheetDelegate : public QItemDelegate
public:
SpreadSheetDelegate(QObject *parent = 0);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
- void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
private slots:
void commitAndCloseEditor();
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheetitem.h b/examples/widgets/itemviews/spreadsheet/spreadsheetitem.h
index e43d222f48..46460df527 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheetitem.h
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheetitem.h
@@ -61,10 +61,10 @@ public:
SpreadSheetItem();
SpreadSheetItem(const QString &text);
- QTableWidgetItem *clone() const Q_DECL_OVERRIDE;
+ QTableWidgetItem *clone() const override;
- QVariant data(int role) const Q_DECL_OVERRIDE;
- void setData(int role, const QVariant &value) Q_DECL_OVERRIDE;
+ QVariant data(int role) const override;
+ void setData(int role, const QVariant &value) override;
QVariant display() const;
inline QString formula() const
diff --git a/examples/widgets/itemviews/stardelegate/stardelegate.h b/examples/widgets/itemviews/stardelegate/stardelegate.h
index f8e49e5bd1..ffc65fbedd 100644
--- a/examples/widgets/itemviews/stardelegate/stardelegate.h
+++ b/examples/widgets/itemviews/stardelegate/stardelegate.h
@@ -62,14 +62,14 @@ public:
StarDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
void paint(QPainter *painter, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
- void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
private slots:
void commitAndCloseEditor();
diff --git a/examples/widgets/itemviews/stardelegate/stareditor.h b/examples/widgets/itemviews/stardelegate/stareditor.h
index 6bd5008d50..4a4c3a4954 100644
--- a/examples/widgets/itemviews/stardelegate/stareditor.h
+++ b/examples/widgets/itemviews/stardelegate/stareditor.h
@@ -63,7 +63,7 @@ class StarEditor : public QWidget
public:
StarEditor(QWidget *parent = 0);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
void setStarRating(const StarRating &starRating) {
myStarRating = starRating;
}
@@ -73,9 +73,9 @@ signals:
void editingFinished();
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
private:
int starAtPosition(int x);
diff --git a/examples/widgets/layouts/borderlayout/borderlayout.h b/examples/widgets/layouts/borderlayout/borderlayout.h
index 0ccdb1be60..4c0c01f90b 100644
--- a/examples/widgets/layouts/borderlayout/borderlayout.h
+++ b/examples/widgets/layouts/borderlayout/borderlayout.h
@@ -63,16 +63,16 @@ public:
BorderLayout(int spacing = -1);
~BorderLayout();
- void addItem(QLayoutItem *item) Q_DECL_OVERRIDE;
+ void addItem(QLayoutItem *item) override;
void addWidget(QWidget *widget, Position position);
- Qt::Orientations expandingDirections() const Q_DECL_OVERRIDE;
- bool hasHeightForWidth() const Q_DECL_OVERRIDE;
- int count() const Q_DECL_OVERRIDE;
- QLayoutItem *itemAt(int index) const Q_DECL_OVERRIDE;
- QSize minimumSize() const Q_DECL_OVERRIDE;
- void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
- QLayoutItem *takeAt(int index) Q_DECL_OVERRIDE;
+ Qt::Orientations expandingDirections() const override;
+ bool hasHeightForWidth() const override;
+ int count() const override;
+ QLayoutItem *itemAt(int index) const override;
+ QSize minimumSize() const override;
+ void setGeometry(const QRect &rect) override;
+ QSize sizeHint() const override;
+ QLayoutItem *takeAt(int index) override;
void add(QLayoutItem *item, Position position);
diff --git a/examples/widgets/layouts/flowlayout/flowlayout.h b/examples/widgets/layouts/flowlayout/flowlayout.h
index 90cc59dcfd..3155d5d347 100644
--- a/examples/widgets/layouts/flowlayout/flowlayout.h
+++ b/examples/widgets/layouts/flowlayout/flowlayout.h
@@ -62,18 +62,18 @@ public:
explicit FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1);
~FlowLayout();
- void addItem(QLayoutItem *item) Q_DECL_OVERRIDE;
+ void addItem(QLayoutItem *item) override;
int horizontalSpacing() const;
int verticalSpacing() const;
- Qt::Orientations expandingDirections() const Q_DECL_OVERRIDE;
- bool hasHeightForWidth() const Q_DECL_OVERRIDE;
- int heightForWidth(int) const Q_DECL_OVERRIDE;
- int count() const Q_DECL_OVERRIDE;
- QLayoutItem *itemAt(int index) const Q_DECL_OVERRIDE;
- QSize minimumSize() const Q_DECL_OVERRIDE;
- void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
- QLayoutItem *takeAt(int index) Q_DECL_OVERRIDE;
+ Qt::Orientations expandingDirections() const override;
+ bool hasHeightForWidth() const override;
+ int heightForWidth(int) const override;
+ int count() const override;
+ QLayoutItem *itemAt(int index) const override;
+ QSize minimumSize() const override;
+ void setGeometry(const QRect &rect) override;
+ QSize sizeHint() const override;
+ QLayoutItem *takeAt(int index) override;
private:
int doLayout(const QRect &rect, bool testOnly) const;
diff --git a/examples/widgets/mainwindows/application/mainwindow.h b/examples/widgets/mainwindows/application/mainwindow.h
index 9e3e1e907a..1300247ce7 100644
--- a/examples/widgets/mainwindows/application/mainwindow.h
+++ b/examples/widgets/mainwindows/application/mainwindow.h
@@ -71,7 +71,7 @@ public:
void loadFile(const QString &fileName);
protected:
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void newFile();
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
index 226f335c85..c472df966c 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
@@ -111,8 +111,8 @@ class ColorDock : public QFrame
public:
explicit ColorDock(const QString &c, QWidget *parent);
- QSize sizeHint() const Q_DECL_OVERRIDE { return szHint; }
- QSize minimumSizeHint() const Q_DECL_OVERRIDE { return minSzHint; }
+ QSize sizeHint() const override { return szHint; }
+ QSize minimumSizeHint() const override { return minSzHint; }
void setCustomSizeHint(const QSize &size);
@@ -120,7 +120,7 @@ public slots:
void changeSizeHints();
protected:
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *) override;
private:
const QString color;
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.h b/examples/widgets/mainwindows/mainwindow/colorswatch.h
index c2f6ef19b9..ec9d9e7372 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.h
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.h
@@ -69,9 +69,9 @@ public:
protected:
#ifndef QT_NO_CONTEXTMENU
- void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE;
+ void contextMenuEvent(QContextMenuEvent *event) override;
#endif // QT_NO_CONTEXTMENU
- void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *e) override;
private slots:
void changeClosable(bool on);
@@ -130,12 +130,12 @@ class BlueTitleBar : public QWidget
public:
explicit BlueTitleBar(QWidget *parent = Q_NULLPTR);
- QSize sizeHint() const Q_DECL_OVERRIDE { return minimumSizeHint(); }
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override { return minimumSizeHint(); }
+ QSize minimumSizeHint() const override;
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
public slots:
void updateMask();
diff --git a/examples/widgets/mainwindows/mdi/mainwindow.h b/examples/widgets/mainwindows/mdi/mainwindow.h
index 4525b52697..f163145c2c 100644
--- a/examples/widgets/mainwindows/mdi/mainwindow.h
+++ b/examples/widgets/mainwindows/mdi/mainwindow.h
@@ -71,7 +71,7 @@ public:
bool openFile(const QString &fileName);
protected:
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void newFile();
diff --git a/examples/widgets/mainwindows/mdi/mdichild.h b/examples/widgets/mainwindows/mdi/mdichild.h
index 22fbb28212..2ac8194f73 100644
--- a/examples/widgets/mainwindows/mdi/mdichild.h
+++ b/examples/widgets/mainwindows/mdi/mdichild.h
@@ -69,7 +69,7 @@ public:
QString currentFile() { return curFile; }
protected:
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void documentWasModified();
diff --git a/examples/widgets/mainwindows/menus/mainwindow.h b/examples/widgets/mainwindows/menus/mainwindow.h
index 590d7c7550..1f1a065aaf 100644
--- a/examples/widgets/mainwindows/menus/mainwindow.h
+++ b/examples/widgets/mainwindows/menus/mainwindow.h
@@ -70,7 +70,7 @@ public:
protected:
#ifndef QT_NO_CONTEXTMENU
- void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE;
+ void contextMenuEvent(QContextMenuEvent *event) override;
#endif // QT_NO_CONTEXTMENU
//! [0]
diff --git a/examples/widgets/mainwindows/sdi/mainwindow.h b/examples/widgets/mainwindows/sdi/mainwindow.h
index 4b4beaeaae..059710eacb 100644
--- a/examples/widgets/mainwindows/sdi/mainwindow.h
+++ b/examples/widgets/mainwindows/sdi/mainwindow.h
@@ -73,7 +73,7 @@ public:
void tile(const QMainWindow *previous);
protected:
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void newFile();
diff --git a/examples/widgets/painting/affine/xform.h b/examples/widgets/painting/affine/xform.h
index 11c8fbde90..f2eed99b4f 100644
--- a/examples/widgets/painting/affine/xform.h
+++ b/examples/widgets/painting/affine/xform.h
@@ -80,14 +80,14 @@ public:
enum XFormType { VectorType, PixmapType, TextType };
XFormView(QWidget *parent);
- void paint(QPainter *) Q_DECL_OVERRIDE;
+ void paint(QPainter *) override;
void drawVectorType(QPainter *painter);
void drawPixmapType(QPainter *painter);
void drawTextType(QPainter *painter);
- QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(500, 500); }
+ QSize sizeHint() const override { return QSize(500, 500); }
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *e) override;
+ void resizeEvent(QResizeEvent *e) override;
HoverPoints *hoverPoints() { return pts; }
bool animation() const { return timer.isActive(); }
@@ -124,9 +124,9 @@ signals:
void shearChanged(int shear);
protected:
- void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *e) override;
#ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *) override;
#endif
private:
diff --git a/examples/widgets/painting/basicdrawing/renderarea.h b/examples/widgets/painting/basicdrawing/renderarea.h
index db44d8aa14..fb4aab470b 100644
--- a/examples/widgets/painting/basicdrawing/renderarea.h
+++ b/examples/widgets/painting/basicdrawing/renderarea.h
@@ -67,8 +67,8 @@ public:
RenderArea(QWidget *parent = 0);
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize minimumSizeHint() const override;
+ QSize sizeHint() const override;
public slots:
void setShape(Shape shape);
@@ -78,7 +78,7 @@ public slots:
void setTransformed(bool transformed);
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
private:
Shape shape;
diff --git a/examples/widgets/painting/composition/composition.h b/examples/widgets/painting/composition/composition.h
index 015dd13098..49853f503b 100644
--- a/examples/widgets/painting/composition/composition.h
+++ b/examples/widgets/painting/composition/composition.h
@@ -118,21 +118,21 @@ class CompositionRenderer : public ArthurFrame
public:
CompositionRenderer(QWidget *parent);
- void paint(QPainter *) Q_DECL_OVERRIDE;
+ void paint(QPainter *) override;
void setCirclePos(const QPointF &pos);
- QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(500, 400); }
+ QSize sizeHint() const override { return QSize(500, 400); }
bool animationEnabled() const { return m_animation_enabled; }
int circleColor() const { return m_circle_hue; }
int circleAlpha() const { return m_circle_alpha; }
protected:
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *) override;
+ void mouseMoveEvent(QMouseEvent *) override;
+ void mouseReleaseEvent(QMouseEvent *) override;
+ void timerEvent(QTimerEvent *) override;
public slots:
void setClearMode() { m_composition_mode = QPainter::CompositionMode_Clear; update(); }
diff --git a/examples/widgets/painting/concentriccircles/circlewidget.h b/examples/widgets/painting/concentriccircles/circlewidget.h
index 99e39ca2bb..79fd5c71da 100644
--- a/examples/widgets/painting/concentriccircles/circlewidget.h
+++ b/examples/widgets/painting/concentriccircles/circlewidget.h
@@ -64,14 +64,14 @@ public:
void setFloatBased(bool floatBased);
void setAntialiased(bool antialiased);
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize minimumSizeHint() const override;
+ QSize sizeHint() const override;
public slots:
void nextAnimationFrame();
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
private:
bool floatBased;
diff --git a/examples/widgets/painting/deform/pathdeform.h b/examples/widgets/painting/deform/pathdeform.h
index 46c1d2c5ac..68908045b9 100644
--- a/examples/widgets/painting/deform/pathdeform.h
+++ b/examples/widgets/painting/deform/pathdeform.h
@@ -69,14 +69,14 @@ class PathDeformRenderer : public ArthurFrame
public:
explicit PathDeformRenderer(QWidget *widget, bool smallScreen = false);
- void paint(QPainter *painter) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter) override;
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
+ void mouseMoveEvent(QMouseEvent *e) override;
+ void timerEvent(QTimerEvent *e) override;
- QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(600, 500); }
+ QSize sizeHint() const override { return QSize(600, 500); }
bool animated() const { return m_animated; }
int radius() const { return int(m_radius); }
diff --git a/examples/widgets/painting/gradients/gradients.h b/examples/widgets/painting/gradients/gradients.h
index b15a586d72..b4db298bb4 100644
--- a/examples/widgets/painting/gradients/gradients.h
+++ b/examples/widgets/painting/gradients/gradients.h
@@ -76,9 +76,9 @@ public:
void setGradientStops(const QGradientStops &stops);
- void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *e) override;
- QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(150, 40); }
+ QSize sizeHint() const override { return QSize(150, 40); }
QPolygonF points() const;
HoverPoints *hoverPoints() const { return m_hoverPoints; }
@@ -125,12 +125,12 @@ class GradientRenderer : public ArthurFrame
public:
GradientRenderer(QWidget *parent);
- void paint(QPainter *p) Q_DECL_OVERRIDE;
+ void paint(QPainter *p) override;
- QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(400, 400); }
+ QSize sizeHint() const override { return QSize(400, 400); }
HoverPoints *hoverPoints() const { return m_hoverPoints; }
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *e) override;
public slots:
void setGradientStops(const QGradientStops &stops);
diff --git a/examples/widgets/painting/painterpaths/renderarea.h b/examples/widgets/painting/painterpaths/renderarea.h
index 0c07108589..5f0874b772 100644
--- a/examples/widgets/painting/painterpaths/renderarea.h
+++ b/examples/widgets/painting/painterpaths/renderarea.h
@@ -62,8 +62,8 @@ class RenderArea : public QWidget
public:
explicit RenderArea(const QPainterPath &path, QWidget *parent = 0);
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize minimumSizeHint() const override;
+ QSize sizeHint() const override;
public slots:
void setFillRule(Qt::FillRule rule);
@@ -73,7 +73,7 @@ public slots:
void setRotationAngle(int degrees);
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
//! [0]
//! [1]
diff --git a/examples/widgets/painting/pathstroke/pathstroke.h b/examples/widgets/painting/pathstroke/pathstroke.h
index f5f2a9ae00..71352c8cc2 100644
--- a/examples/widgets/painting/pathstroke/pathstroke.h
+++ b/examples/widgets/painting/pathstroke/pathstroke.h
@@ -65,14 +65,14 @@ public:
explicit PathStrokeRenderer(QWidget *parent, bool smallScreen = false);
- void paint(QPainter *) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
- bool event(QEvent *e) Q_DECL_OVERRIDE;
-
- QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(500, 500); }
+ void paint(QPainter *) override;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseMoveEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
+ void timerEvent(QTimerEvent *e) override;
+ bool event(QEvent *e) override;
+
+ QSize sizeHint() const override { return QSize(500, 500); }
bool animation() const { return m_timer.isActive(); }
diff --git a/examples/widgets/painting/shared/arthurstyle.h b/examples/widgets/painting/shared/arthurstyle.h
index ca5993b5a2..8ea8354bab 100644
--- a/examples/widgets/painting/shared/arthurstyle.h
+++ b/examples/widgets/painting/shared/arthurstyle.h
@@ -63,23 +63,23 @@ public:
void drawHoverRect(QPainter *painter, const QRect &rect) const;
void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
- QPainter *painter, const QWidget *widget = 0) const Q_DECL_OVERRIDE;
+ QPainter *painter, const QWidget *widget = 0) const override;
void drawControl(ControlElement element, const QStyleOption *option,
- QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE;
+ QPainter *painter, const QWidget *widget) const override;
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
- QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE;
+ QPainter *painter, const QWidget *widget) const override;
QSize sizeFromContents(ContentsType type, const QStyleOption *option,
- const QSize &size, const QWidget *widget) const Q_DECL_OVERRIDE;
+ const QSize &size, const QWidget *widget) const override;
- QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const Q_DECL_OVERRIDE;
+ QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const override;
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
- SubControl sc, const QWidget *widget) const Q_DECL_OVERRIDE;
+ SubControl sc, const QWidget *widget) const override;
- int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const Q_DECL_OVERRIDE;
+ int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const override;
- void polish(QPalette &palette) Q_DECL_OVERRIDE;
- void polish(QWidget *widget) Q_DECL_OVERRIDE;
- void unpolish(QWidget *widget) Q_DECL_OVERRIDE;
+ void polish(QPalette &palette) override;
+ void polish(QWidget *widget) override;
+ void unpolish(QWidget *widget) override;
};
#endif
diff --git a/examples/widgets/painting/shared/arthurwidgets.h b/examples/widgets/painting/shared/arthurwidgets.h
index 0133073c04..d6e1e44b3a 100644
--- a/examples/widgets/painting/shared/arthurwidgets.h
+++ b/examples/widgets/painting/shared/arthurwidgets.h
@@ -68,9 +68,9 @@ public:
setAttribute(Qt::WA_AcceptTouchEvents);
}
void disableAutoBufferSwap() { setAutoBufferSwap(false); }
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE { parentWidget()->update(); }
+ void paintEvent(QPaintEvent *) override { parentWidget()->update(); }
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE
+ bool event(QEvent *event) override
{
switch (event->type()) {
case QEvent::TouchBegin:
@@ -126,8 +126,8 @@ signals:
void descriptionEnabledChanged(bool);
protected:
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *) override;
+ void resizeEvent(QResizeEvent *) override;
#if defined(QT_OPENGL_SUPPORT)
GLWidget *glw;
diff --git a/examples/widgets/painting/shared/hoverpoints.h b/examples/widgets/painting/shared/hoverpoints.h
index 6f8c122042..6bf1cafe4e 100644
--- a/examples/widgets/painting/shared/hoverpoints.h
+++ b/examples/widgets/painting/shared/hoverpoints.h
@@ -85,7 +85,7 @@ public:
HoverPoints(QWidget *widget, PointShape shape);
- bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *object, QEvent *event) override;
void paintPoints();
diff --git a/examples/widgets/painting/transformations/renderarea.h b/examples/widgets/painting/transformations/renderarea.h
index 2cc9ac274a..140be27b2b 100644
--- a/examples/widgets/painting/transformations/renderarea.h
+++ b/examples/widgets/painting/transformations/renderarea.h
@@ -75,11 +75,11 @@ public:
void setOperations(const QList<Operation> &operations);
void setShape(const QPainterPath &shape);
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize minimumSizeHint() const override;
+ QSize sizeHint() const override;
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
//! [1]
//! [2]
diff --git a/examples/widgets/richtext/syntaxhighlighter/highlighter.h b/examples/widgets/richtext/syntaxhighlighter/highlighter.h
index 56274778ce..39141615fc 100644
--- a/examples/widgets/richtext/syntaxhighlighter/highlighter.h
+++ b/examples/widgets/richtext/syntaxhighlighter/highlighter.h
@@ -67,7 +67,7 @@ public:
Highlighter(QTextDocument *parent = 0);
protected:
- void highlightBlock(const QString &text) Q_DECL_OVERRIDE;
+ void highlightBlock(const QString &text) override;
private:
struct HighlightingRule
diff --git a/examples/widgets/richtext/textedit/textedit.h b/examples/widgets/richtext/textedit/textedit.h
index d130b9cca7..e5f04e706c 100644
--- a/examples/widgets/richtext/textedit/textedit.h
+++ b/examples/widgets/richtext/textedit/textedit.h
@@ -78,7 +78,7 @@ public slots:
void fileNew();
protected:
- virtual void closeEvent(QCloseEvent *e) Q_DECL_OVERRIDE;
+ virtual void closeEvent(QCloseEvent *e) override;
private slots:
void fileOpen();
diff --git a/examples/widgets/scroller/graphicsview/main.cpp b/examples/widgets/scroller/graphicsview/main.cpp
index 4009041cd8..c33a3091ed 100644
--- a/examples/widgets/scroller/graphicsview/main.cpp
+++ b/examples/widgets/scroller/graphicsview/main.cpp
@@ -74,7 +74,7 @@ public:
setFlag(QGraphicsItem::ItemClipsToShape, true);
}
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
// here we only want the size of the children and not the size of the children of the children...
qreal halfpw = m_pen.widthF() / 2;
@@ -85,7 +85,7 @@ public:
return rect;
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
{
Q_UNUSED(option);
Q_UNUSED(widget);
@@ -114,7 +114,7 @@ public:
: QGraphicsObject(parent)
{ }
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
QRectF rect;
foreach (QGraphicsItem *item, childItems())
@@ -122,7 +122,7 @@ public:
return rect;
}
- void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
{ }
};
@@ -150,7 +150,7 @@ public:
return m_viewport;
}
- bool event(QEvent *e) Q_DECL_OVERRIDE
+ bool event(QEvent *e) override
{
switch (e->type()) {
// ![2]
@@ -179,7 +179,7 @@ public:
return QGraphicsObject::event(e);
}
- bool sceneEvent(QEvent *e) Q_DECL_OVERRIDE
+ bool sceneEvent(QEvent *e) override
{
switch (e->type()) {
case QEvent::TouchBegin: {
@@ -204,12 +204,12 @@ public:
return QGraphicsObject::sceneEvent(e);
}
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
return QRectF(0, 0, m_size.width() + 3, m_size.height());
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
{
Q_UNUSED(option);
Q_UNUSED(widget);
@@ -275,7 +275,7 @@ public:
protected:
- void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE
+ void resizeEvent(QResizeEvent *e) override
{
// resize the scene according to our own size to prevent scrolling
m_scene->setSceneRect(0, 0, m_view->viewport()->width(), m_view->viewport()->height());
diff --git a/examples/widgets/statemachine/factorial/main.cpp b/examples/widgets/statemachine/factorial/main.cpp
index 995ae4d246..d0d61cb7df 100644
--- a/examples/widgets/statemachine/factorial/main.cpp
+++ b/examples/widgets/statemachine/factorial/main.cpp
@@ -103,7 +103,7 @@ public:
: QSignalTransition(fact, SIGNAL(xChanged(int))), m_fact(fact)
{}
- virtual bool eventTest(QEvent *e) Q_DECL_OVERRIDE
+ virtual bool eventTest(QEvent *e) override
{
if (!QSignalTransition::eventTest(e))
return false;
@@ -111,7 +111,7 @@ public:
return se->arguments().at(0).toInt() > 1;
}
- virtual void onTransition(QEvent *e) Q_DECL_OVERRIDE
+ virtual void onTransition(QEvent *e) override
{
QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
int x = se->arguments().at(0).toInt();
@@ -133,7 +133,7 @@ public:
: QSignalTransition(fact, SIGNAL(xChanged(int))), m_fact(fact)
{}
- virtual bool eventTest(QEvent *e) Q_DECL_OVERRIDE
+ virtual bool eventTest(QEvent *e) override
{
if (!QSignalTransition::eventTest(e))
return false;
@@ -141,7 +141,7 @@ public:
return se->arguments().at(0).toInt() <= 1;
}
- virtual void onTransition(QEvent *) Q_DECL_OVERRIDE
+ virtual void onTransition(QEvent *) override
{
fprintf(stdout, "%d\n", m_fact->property("fac").toInt());
}
diff --git a/examples/widgets/statemachine/pingpong/main.cpp b/examples/widgets/statemachine/pingpong/main.cpp
index ef799ec998..8c3b9f674b 100644
--- a/examples/widgets/statemachine/pingpong/main.cpp
+++ b/examples/widgets/statemachine/pingpong/main.cpp
@@ -75,7 +75,7 @@ public:
: QState(parent) {}
protected:
- virtual void onEntry(QEvent *) Q_DECL_OVERRIDE
+ virtual void onEntry(QEvent *) override
{
machine()->postEvent(new PingEvent());
fprintf(stdout, "ping?\n");
@@ -90,10 +90,10 @@ public:
PongTransition() {}
protected:
- virtual bool eventTest(QEvent *e) Q_DECL_OVERRIDE {
+ virtual bool eventTest(QEvent *e) override {
return (e->type() == QEvent::User+3);
}
- virtual void onTransition(QEvent *) Q_DECL_OVERRIDE
+ virtual void onTransition(QEvent *) override
{
machine()->postDelayedEvent(new PingEvent(), 500);
fprintf(stdout, "ping?\n");
@@ -108,10 +108,10 @@ public:
PingTransition() {}
protected:
- virtual bool eventTest(QEvent *e) Q_DECL_OVERRIDE {
+ virtual bool eventTest(QEvent *e) override {
return (e->type() == QEvent::User+2);
}
- virtual void onTransition(QEvent *) Q_DECL_OVERRIDE
+ virtual void onTransition(QEvent *) override
{
machine()->postDelayedEvent(new PongEvent(), 500);
fprintf(stdout, "pong!\n");
diff --git a/examples/widgets/statemachine/rogue/movementtransition.h b/examples/widgets/statemachine/rogue/movementtransition.h
index 05fc7edf61..74ffed6608 100644
--- a/examples/widgets/statemachine/rogue/movementtransition.h
+++ b/examples/widgets/statemachine/rogue/movementtransition.h
@@ -69,7 +69,7 @@ public:
//![1]
protected:
- bool eventTest(QEvent *event) Q_DECL_OVERRIDE {
+ bool eventTest(QEvent *event) override {
if (event->type() == QEvent::StateMachineWrapped &&
static_cast<QStateMachine::WrappedEvent *>(event)->event()->type() == QEvent::KeyPress) {
QEvent *wrappedEvent = static_cast<QStateMachine::WrappedEvent *>(event)->event();
@@ -86,7 +86,7 @@ protected:
//![1]
//![2]
- void onTransition(QEvent *event) Q_DECL_OVERRIDE {
+ void onTransition(QEvent *event) override {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(
static_cast<QStateMachine::WrappedEvent *>(event)->event());
diff --git a/examples/widgets/statemachine/rogue/window.h b/examples/widgets/statemachine/rogue/window.h
index 2ac9650201..af34815ffd 100644
--- a/examples/widgets/statemachine/rogue/window.h
+++ b/examples/widgets/statemachine/rogue/window.h
@@ -77,10 +77,10 @@ public:
void setStatus(const QString &status);
QString status() const;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
//![0]
//![1]
diff --git a/examples/widgets/statemachine/trafficlight/main.cpp b/examples/widgets/statemachine/trafficlight/main.cpp
index ebfb3bface..143f2a9324 100644
--- a/examples/widgets/statemachine/trafficlight/main.cpp
+++ b/examples/widgets/statemachine/trafficlight/main.cpp
@@ -74,7 +74,7 @@ public slots:
void turnOn() { setOn(true); }
protected:
- virtual void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE
+ virtual void paintEvent(QPaintEvent *) override
{
if (!m_on)
return;
diff --git a/examples/widgets/tools/completer/fsmodel.h b/examples/widgets/tools/completer/fsmodel.h
index a9b7db3849..a243c48b43 100644
--- a/examples/widgets/tools/completer/fsmodel.h
+++ b/examples/widgets/tools/completer/fsmodel.h
@@ -63,7 +63,7 @@ class FileSystemModel : public QFileSystemModel
{
public:
FileSystemModel(QObject *parent = 0);
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
};
//! [0]
diff --git a/examples/widgets/tools/customcompleter/textedit.h b/examples/widgets/tools/customcompleter/textedit.h
index ce407cbf53..d0636ab670 100644
--- a/examples/widgets/tools/customcompleter/textedit.h
+++ b/examples/widgets/tools/customcompleter/textedit.h
@@ -70,8 +70,8 @@ public:
QCompleter *completer() const;
protected:
- void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
- void focusInEvent(QFocusEvent *e) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *e) override;
+ void focusInEvent(QFocusEvent *e) override;
private slots:
void insertCompletion(const QString &completion);
diff --git a/examples/widgets/tools/echoplugin/plugin/echoplugin.h b/examples/widgets/tools/echoplugin/plugin/echoplugin.h
index 94feb1a2ea..f0f237099c 100644
--- a/examples/widgets/tools/echoplugin/plugin/echoplugin.h
+++ b/examples/widgets/tools/echoplugin/plugin/echoplugin.h
@@ -63,7 +63,7 @@ class EchoPlugin : public QObject, EchoInterface
Q_INTERFACES(EchoInterface)
public:
- QString echo(const QString &message) Q_DECL_OVERRIDE;
+ QString echo(const QString &message) override;
};
//! [0]
diff --git a/examples/widgets/tools/i18n/languagechooser.h b/examples/widgets/tools/i18n/languagechooser.h
index 8af7be6d71..13363c7111 100644
--- a/examples/widgets/tools/i18n/languagechooser.h
+++ b/examples/widgets/tools/i18n/languagechooser.h
@@ -71,8 +71,8 @@ public:
explicit LanguageChooser(const QString& defaultLang = QString(), QWidget *parent = 0);
protected:
- bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *object, QEvent *event) override;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void checkBoxToggled();
diff --git a/examples/widgets/tools/plugandpaint/app/paintarea.h b/examples/widgets/tools/plugandpaint/app/paintarea.h
index 415e4c0be4..1c8ee1ee1b 100644
--- a/examples/widgets/tools/plugandpaint/app/paintarea.h
+++ b/examples/widgets/tools/plugandpaint/app/paintarea.h
@@ -76,13 +76,13 @@ public:
QImage image() const { return theImage; }
QColor brushColor() const { return color; }
int brushWidth() const { return thickness; }
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
private:
void setupPainter(QPainter &painter);
diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/basictoolsplugin.h b/examples/widgets/tools/plugandpaint/plugins/basictools/basictoolsplugin.h
index 6e6d639d12..fd9bb9e5f3 100644
--- a/examples/widgets/tools/plugandpaint/plugins/basictools/basictoolsplugin.h
+++ b/examples/widgets/tools/plugandpaint/plugins/basictools/basictoolsplugin.h
@@ -78,22 +78,22 @@ class BasicToolsPlugin : public QObject,
public:
//! [1]
// BrushInterface
- QStringList brushes() const Q_DECL_OVERRIDE;
+ QStringList brushes() const override;
QRect mousePress(const QString &brush, QPainter &painter,
- const QPoint &pos) Q_DECL_OVERRIDE;
+ const QPoint &pos) override;
QRect mouseMove(const QString &brush, QPainter &painter,
- const QPoint &oldPos, const QPoint &newPos) Q_DECL_OVERRIDE;
+ const QPoint &oldPos, const QPoint &newPos) override;
QRect mouseRelease(const QString &brush, QPainter &painter,
- const QPoint &pos) Q_DECL_OVERRIDE;
+ const QPoint &pos) override;
// ShapeInterface
- QStringList shapes() const Q_DECL_OVERRIDE;
- QPainterPath generateShape(const QString &shape, QWidget *parent) Q_DECL_OVERRIDE;
+ QStringList shapes() const override;
+ QPainterPath generateShape(const QString &shape, QWidget *parent) override;
// FilterInterface
- QStringList filters() const Q_DECL_OVERRIDE;
+ QStringList filters() const override;
QImage filterImage(const QString &filter, const QImage &image,
- QWidget *parent) Q_DECL_OVERRIDE;
+ QWidget *parent) override;
//! [3]
};
//! [2] //! [3]
diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafiltersplugin.h b/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafiltersplugin.h
index 4beac9a7fb..dddde78caa 100644
--- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafiltersplugin.h
+++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafiltersplugin.h
@@ -66,9 +66,9 @@ class ExtraFiltersPlugin : public QObject, public FilterInterface
Q_INTERFACES(FilterInterface)
public:
- QStringList filters() const Q_DECL_OVERRIDE;
+ QStringList filters() const override;
QImage filterImage(const QString &filter, const QImage &image,
- QWidget *parent) Q_DECL_OVERRIDE;
+ QWidget *parent) override;
};
//! [0]
diff --git a/examples/widgets/tools/settingseditor/settingstree.h b/examples/widgets/tools/settingseditor/settingstree.h
index b46a3d38da..15efa0e6aa 100644
--- a/examples/widgets/tools/settingseditor/settingstree.h
+++ b/examples/widgets/tools/settingseditor/settingstree.h
@@ -71,7 +71,7 @@ public:
~SettingsTree();
void setSettingsObject(const SettingsPtr &settings);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
public slots:
void setAutoRefresh(bool autoRefresh);
@@ -80,7 +80,7 @@ public slots:
void refresh();
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
private slots:
void updateSetting(QTreeWidgetItem *item);
diff --git a/examples/widgets/tools/settingseditor/variantdelegate.h b/examples/widgets/tools/settingseditor/variantdelegate.h
index 3860ecb2f4..a15228fdf9 100644
--- a/examples/widgets/tools/settingseditor/variantdelegate.h
+++ b/examples/widgets/tools/settingseditor/variantdelegate.h
@@ -62,12 +62,12 @@ public:
VariantDelegate(QObject *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
- void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
static bool isSupportedType(QVariant::Type type);
static QString displayText(const QVariant &value);
diff --git a/examples/widgets/tools/styleplugin/plugin/simplestyle.h b/examples/widgets/tools/styleplugin/plugin/simplestyle.h
index 05905cd87b..51d6d5b77e 100644
--- a/examples/widgets/tools/styleplugin/plugin/simplestyle.h
+++ b/examples/widgets/tools/styleplugin/plugin/simplestyle.h
@@ -64,7 +64,7 @@ class SimpleStyle : public QProxyStyle
public:
SimpleStyle() {};
- void polish(QPalette &palette) Q_DECL_OVERRIDE;
+ void polish(QPalette &palette) override;
};
#endif
diff --git a/examples/widgets/tools/styleplugin/plugin/simplestyleplugin.h b/examples/widgets/tools/styleplugin/plugin/simplestyleplugin.h
index 980de4c1df..88805d4887 100644
--- a/examples/widgets/tools/styleplugin/plugin/simplestyleplugin.h
+++ b/examples/widgets/tools/styleplugin/plugin/simplestyleplugin.h
@@ -68,7 +68,7 @@ public:
SimpleStylePlugin() {}
QStringList keys() const;
- QStyle *create(const QString &key) Q_DECL_OVERRIDE;
+ QStyle *create(const QString &key) override;
};
//! [0]
diff --git a/examples/widgets/tools/treemodelcompleter/treemodelcompleter.h b/examples/widgets/tools/treemodelcompleter/treemodelcompleter.h
index 7e10f87f5b..1d28fddee0 100644
--- a/examples/widgets/tools/treemodelcompleter/treemodelcompleter.h
+++ b/examples/widgets/tools/treemodelcompleter/treemodelcompleter.h
@@ -68,8 +68,8 @@ public slots:
void setSeparator(const QString &separator);
protected:
- QStringList splitPath(const QString &path) const Q_DECL_OVERRIDE;
- QString pathFromIndex(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ QStringList splitPath(const QString &path) const override;
+ QString pathFromIndex(const QModelIndex &index) const override;
private:
QString sep;
diff --git a/examples/widgets/tools/undo/commands.h b/examples/widgets/tools/undo/commands.h
index 1a14b3fa56..de3bebd740 100644
--- a/examples/widgets/tools/undo/commands.h
+++ b/examples/widgets/tools/undo/commands.h
@@ -58,8 +58,8 @@ class AddShapeCommand : public QUndoCommand
{
public:
AddShapeCommand(Document *doc, const Shape &shape, QUndoCommand *parent = 0);
- void undo() Q_DECL_OVERRIDE;
- void redo() Q_DECL_OVERRIDE;
+ void undo() override;
+ void redo() override;
private:
Document *m_doc;
@@ -71,8 +71,8 @@ class RemoveShapeCommand : public QUndoCommand
{
public:
RemoveShapeCommand(Document *doc, const QString &shapeName, QUndoCommand *parent = 0);
- void undo() Q_DECL_OVERRIDE;
- void redo() Q_DECL_OVERRIDE;
+ void undo() override;
+ void redo() override;
private:
Document *m_doc;
@@ -86,11 +86,11 @@ public:
SetShapeColorCommand(Document *doc, const QString &shapeName, const QColor &color,
QUndoCommand *parent = 0);
- void undo() Q_DECL_OVERRIDE;
- void redo() Q_DECL_OVERRIDE;
+ void undo() override;
+ void redo() override;
- bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE;
- int id() const Q_DECL_OVERRIDE;
+ bool mergeWith(const QUndoCommand *command) override;
+ int id() const override;
private:
Document *m_doc;
@@ -105,11 +105,11 @@ public:
SetShapeRectCommand(Document *doc, const QString &shapeName, const QRect &rect,
QUndoCommand *parent = 0);
- void undo() Q_DECL_OVERRIDE;
- void redo() Q_DECL_OVERRIDE;
+ void undo() override;
+ void redo() override;
- bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE;
- int id() const Q_DECL_OVERRIDE;
+ bool mergeWith(const QUndoCommand *command) override;
+ int id() const override;
private:
Document *m_doc;
diff --git a/examples/widgets/tools/undo/document.h b/examples/widgets/tools/undo/document.h
index 41e53a9a04..8076d7185c 100644
--- a/examples/widgets/tools/undo/document.h
+++ b/examples/widgets/tools/undo/document.h
@@ -110,10 +110,10 @@ signals:
void currentShapeChanged(const QString &shapeName);
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
private:
void setCurrentShape(int index);
diff --git a/examples/widgets/tools/undoframework/commands.h b/examples/widgets/tools/undoframework/commands.h
index 22c62fe9fd..dc53c14557 100644
--- a/examples/widgets/tools/undoframework/commands.h
+++ b/examples/widgets/tools/undoframework/commands.h
@@ -64,10 +64,10 @@ public:
MoveCommand(DiagramItem *diagramItem, const QPointF &oldPos,
QUndoCommand *parent = 0);
- void undo() Q_DECL_OVERRIDE;
- void redo() Q_DECL_OVERRIDE;
- bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE;
- int id() const Q_DECL_OVERRIDE { return Id; }
+ void undo() override;
+ void redo() override;
+ bool mergeWith(const QUndoCommand *command) override;
+ int id() const override { return Id; }
private:
DiagramItem *myDiagramItem;
@@ -82,8 +82,8 @@ class DeleteCommand : public QUndoCommand
public:
explicit DeleteCommand(QGraphicsScene *graphicsScene, QUndoCommand *parent = 0);
- void undo() Q_DECL_OVERRIDE;
- void redo() Q_DECL_OVERRIDE;
+ void undo() override;
+ void redo() override;
private:
DiagramItem *myDiagramItem;
@@ -99,8 +99,8 @@ public:
QUndoCommand *parent = 0);
~AddCommand();
- void undo() Q_DECL_OVERRIDE;
- void redo() Q_DECL_OVERRIDE;
+ void undo() override;
+ void redo() override;
private:
DiagramItem *myDiagramItem;
diff --git a/examples/widgets/tools/undoframework/diagramitem.h b/examples/widgets/tools/undoframework/diagramitem.h
index 246443b64d..1638dcbea8 100644
--- a/examples/widgets/tools/undoframework/diagramitem.h
+++ b/examples/widgets/tools/undoframework/diagramitem.h
@@ -71,7 +71,7 @@ public:
DiagramType diagramType() const {
return polygon() == boxPolygon ? Box : Triangle;
}
- int type() const Q_DECL_OVERRIDE { return Type; }
+ int type() const override { return Type; }
private:
QPolygonF boxPolygon;
diff --git a/examples/widgets/tools/undoframework/diagramscene.h b/examples/widgets/tools/undoframework/diagramscene.h
index 6b275ce5d3..b1e2804ba6 100644
--- a/examples/widgets/tools/undoframework/diagramscene.h
+++ b/examples/widgets/tools/undoframework/diagramscene.h
@@ -72,8 +72,8 @@ signals:
void itemMoved(DiagramItem *movedItem, const QPointF &movedFromPosition);
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
private:
QGraphicsItem *movingItem;
diff --git a/examples/widgets/tutorials/modelview/1_readonly/mymodel.h b/examples/widgets/tutorials/modelview/1_readonly/mymodel.h
index 68480c9f5e..e675cc6bc2 100644
--- a/examples/widgets/tutorials/modelview/1_readonly/mymodel.h
+++ b/examples/widgets/tutorials/modelview/1_readonly/mymodel.h
@@ -60,9 +60,9 @@ class MyModel : public QAbstractTableModel
Q_OBJECT
public:
MyModel(QObject *parent);
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE ;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
};
//! [Quoting ModelView Tutorial]
diff --git a/examples/widgets/tutorials/modelview/2_formatting/mymodel.h b/examples/widgets/tutorials/modelview/2_formatting/mymodel.h
index 1d94c9fbeb..9c12f98ba9 100644
--- a/examples/widgets/tutorials/modelview/2_formatting/mymodel.h
+++ b/examples/widgets/tutorials/modelview/2_formatting/mymodel.h
@@ -58,9 +58,9 @@ class MyModel : public QAbstractTableModel
Q_OBJECT
public:
MyModel(QObject *parent);
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE ;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
};
#endif // MYMODEL_H
diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.h b/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.h
index 5d67d88e45..dfcf0f6239 100644
--- a/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.h
+++ b/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.h
@@ -59,9 +59,9 @@ class MyModel : public QAbstractTableModel
Q_OBJECT
public:
MyModel(QObject *parent);
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE ;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QTimer *timer;
private:
int selectedCell;
diff --git a/examples/widgets/tutorials/modelview/4_headers/mymodel.h b/examples/widgets/tutorials/modelview/4_headers/mymodel.h
index 74e2a93626..fb2d7aa940 100644
--- a/examples/widgets/tutorials/modelview/4_headers/mymodel.h
+++ b/examples/widgets/tutorials/modelview/4_headers/mymodel.h
@@ -58,10 +58,10 @@ class MyModel : public QAbstractTableModel
Q_OBJECT
public:
MyModel(QObject *parent);
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE ;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
- QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
};
#endif // MYMODEL_H
diff --git a/examples/widgets/tutorials/modelview/5_edit/mymodel.h b/examples/widgets/tutorials/modelview/5_edit/mymodel.h
index a95e120de3..dd0d4f5066 100644
--- a/examples/widgets/tutorials/modelview/5_edit/mymodel.h
+++ b/examples/widgets/tutorials/modelview/5_edit/mymodel.h
@@ -65,11 +65,11 @@ class MyModel : public QAbstractTableModel
Q_OBJECT
public:
MyModel(QObject *parent);
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE ;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
- bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
- Qt::ItemFlags flags(const QModelIndex & index) const Q_DECL_OVERRIDE ;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) override;
+ Qt::ItemFlags flags(const QModelIndex & index) const override ;
private:
QString m_gridData[ROWS][COLS]; //holds text entered into QTableView
signals:
diff --git a/examples/widgets/widgets/analogclock/analogclock.h b/examples/widgets/widgets/analogclock/analogclock.h
index 2098b83ec4..19e580d1ac 100644
--- a/examples/widgets/widgets/analogclock/analogclock.h
+++ b/examples/widgets/widgets/analogclock/analogclock.h
@@ -62,7 +62,7 @@ public:
AnalogClock(QWidget *parent = 0);
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
};
//! [0]
diff --git a/examples/widgets/widgets/calculator/button.h b/examples/widgets/widgets/calculator/button.h
index b06edc1405..057640700f 100644
--- a/examples/widgets/widgets/calculator/button.h
+++ b/examples/widgets/widgets/calculator/button.h
@@ -61,7 +61,7 @@ class Button : public QToolButton
public:
explicit Button(const QString &text, QWidget *parent = 0);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
};
//! [0]
diff --git a/examples/widgets/widgets/charactermap/characterwidget.h b/examples/widgets/widgets/charactermap/characterwidget.h
index 9b87cc9e4b..8a33d69628 100644
--- a/examples/widgets/widgets/charactermap/characterwidget.h
+++ b/examples/widgets/widgets/charactermap/characterwidget.h
@@ -69,7 +69,7 @@ class CharacterWidget : public QWidget
public:
CharacterWidget(QWidget *parent = 0);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
public slots:
void updateFont(const QFont &font);
@@ -81,9 +81,9 @@ signals:
void characterSelected(const QString &character);
protected:
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
private:
QFont displayFont;
diff --git a/examples/widgets/widgets/codeeditor/codeeditor.h b/examples/widgets/widgets/codeeditor/codeeditor.h
index ba6a28c27c..65be76d81d 100644
--- a/examples/widgets/widgets/codeeditor/codeeditor.h
+++ b/examples/widgets/widgets/codeeditor/codeeditor.h
@@ -76,7 +76,7 @@ public:
int lineNumberAreaWidth();
protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) override;
private slots:
void updateLineNumberAreaWidth(int newBlockCount);
@@ -97,12 +97,12 @@ public:
codeEditor = editor;
}
- QSize sizeHint() const Q_DECL_OVERRIDE {
+ QSize sizeHint() const override {
return QSize(codeEditor->lineNumberAreaWidth(), 0);
}
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE {
+ void paintEvent(QPaintEvent *event) override {
codeEditor->lineNumberAreaPaintEvent(event);
}
diff --git a/examples/widgets/widgets/elidedlabel/elidedlabel.h b/examples/widgets/widgets/elidedlabel/elidedlabel.h
index 98ce1fed33..8a2a40f49a 100644
--- a/examples/widgets/widgets/elidedlabel/elidedlabel.h
+++ b/examples/widgets/widgets/elidedlabel/elidedlabel.h
@@ -72,7 +72,7 @@ public:
bool isElided() const { return elided; }
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
signals:
void elisionChanged(bool elided);
diff --git a/examples/widgets/widgets/elidedlabel/testwidget.h b/examples/widgets/widgets/elidedlabel/testwidget.h
index 1871a7af6a..840bc98b40 100644
--- a/examples/widgets/widgets/elidedlabel/testwidget.h
+++ b/examples/widgets/widgets/elidedlabel/testwidget.h
@@ -67,7 +67,7 @@ public:
TestWidget(QWidget *parent = 0);
protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) override;
private slots:
void switchText();
diff --git a/examples/widgets/widgets/icons/iconsizespinbox.h b/examples/widgets/widgets/icons/iconsizespinbox.h
index 1bbd2f793f..96a56e75c9 100644
--- a/examples/widgets/widgets/icons/iconsizespinbox.h
+++ b/examples/widgets/widgets/icons/iconsizespinbox.h
@@ -61,8 +61,8 @@ class IconSizeSpinBox : public QSpinBox
public:
explicit IconSizeSpinBox(QWidget *parent = Q_NULLPTR);
- int valueFromText(const QString &text) const Q_DECL_OVERRIDE;
- QString textFromValue(int value) const Q_DECL_OVERRIDE;
+ int valueFromText(const QString &text) const override;
+ QString textFromValue(int value) const override;
};
//! [0]
diff --git a/examples/widgets/widgets/icons/imagedelegate.h b/examples/widgets/widgets/icons/imagedelegate.h
index 28822d01fb..928085d85b 100644
--- a/examples/widgets/widgets/icons/imagedelegate.h
+++ b/examples/widgets/widgets/icons/imagedelegate.h
@@ -64,10 +64,10 @@ public:
//! [1]
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
- void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
//! [1] //! [2]
private slots:
diff --git a/examples/widgets/widgets/mousebuttons/buttontester.h b/examples/widgets/widgets/mousebuttons/buttontester.h
index 24976052d7..cd05171d86 100644
--- a/examples/widgets/widgets/mousebuttons/buttontester.h
+++ b/examples/widgets/widgets/mousebuttons/buttontester.h
@@ -61,11 +61,11 @@ class ButtonTester : public QTextEdit
Q_OBJECT
protected:
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
#ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent * event) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent * event) override;
#endif
int buttonByNumber(const Qt::MouseButton button);
QString enumNameFromValue(const Qt::MouseButton button);
diff --git a/examples/widgets/widgets/scribble/mainwindow.h b/examples/widgets/widgets/scribble/mainwindow.h
index 3cd4b395d9..9e0ddaff71 100644
--- a/examples/widgets/widgets/scribble/mainwindow.h
+++ b/examples/widgets/widgets/scribble/mainwindow.h
@@ -65,7 +65,7 @@ public:
MainWindow();
protected:
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent *event) override;
private slots:
void open();
diff --git a/examples/widgets/widgets/scribble/scribblearea.h b/examples/widgets/widgets/scribble/scribblearea.h
index 4c1df541af..7729fb5b89 100644
--- a/examples/widgets/widgets/scribble/scribblearea.h
+++ b/examples/widgets/widgets/scribble/scribblearea.h
@@ -78,11 +78,11 @@ public slots:
void print();
protected:
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
private:
void drawLineTo(const QPoint &endPoint);
diff --git a/examples/widgets/widgets/shapedclock/shapedclock.h b/examples/widgets/widgets/shapedclock/shapedclock.h
index f2e58951fa..6468d21618 100644
--- a/examples/widgets/widgets/shapedclock/shapedclock.h
+++ b/examples/widgets/widgets/shapedclock/shapedclock.h
@@ -60,13 +60,13 @@ class ShapedClock : public QWidget
public:
ShapedClock(QWidget *parent = 0);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
protected:
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
private:
QPoint dragPosition;
diff --git a/examples/widgets/widgets/styles/norwegianwoodstyle.h b/examples/widgets/widgets/styles/norwegianwoodstyle.h
index 06c433630a..c41d81d23a 100644
--- a/examples/widgets/widgets/styles/norwegianwoodstyle.h
+++ b/examples/widgets/widgets/styles/norwegianwoodstyle.h
@@ -66,17 +66,17 @@ class NorwegianWoodStyle : public QProxyStyle
public:
NorwegianWoodStyle();
- void polish(QPalette &palette) Q_DECL_OVERRIDE;
- void polish(QWidget *widget) Q_DECL_OVERRIDE;
- void unpolish(QWidget *widget) Q_DECL_OVERRIDE;
+ void polish(QPalette &palette) override;
+ void polish(QWidget *widget) override;
+ void unpolish(QWidget *widget) override;
int pixelMetric(PixelMetric metric, const QStyleOption *option,
- const QWidget *widget) const Q_DECL_OVERRIDE;
+ const QWidget *widget) const override;
int styleHint(StyleHint hint, const QStyleOption *option,
- const QWidget *widget, QStyleHintReturn *returnData) const Q_DECL_OVERRIDE;
+ const QWidget *widget, QStyleHintReturn *returnData) const override;
void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
- QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE;
+ QPainter *painter, const QWidget *widget) const override;
void drawControl(ControlElement control, const QStyleOption *option,
- QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE;
+ QPainter *painter, const QWidget *widget) const override;
private:
static void setTexture(QPalette &palette, QPalette::ColorRole role,
diff --git a/examples/widgets/widgets/tablet/tabletapplication.h b/examples/widgets/widgets/tablet/tabletapplication.h
index 6b24992c5a..6b3b2a1730 100644
--- a/examples/widgets/widgets/tablet/tabletapplication.h
+++ b/examples/widgets/widgets/tablet/tabletapplication.h
@@ -64,7 +64,7 @@ public:
TabletApplication(int &argv, char **args)
: QApplication(argv, args) {}
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
void setCanvas(TabletCanvas *canvas)
{ m_canvas = canvas; }
diff --git a/examples/widgets/widgets/tablet/tabletcanvas.h b/examples/widgets/widgets/tablet/tabletcanvas.h
index baf042cb64..1784e05916 100644
--- a/examples/widgets/widgets/tablet/tabletcanvas.h
+++ b/examples/widgets/widgets/tablet/tabletcanvas.h
@@ -95,9 +95,9 @@ public:
{ return a > b ? a : b; }
protected:
- void tabletEvent(QTabletEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void tabletEvent(QTabletEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
private:
void initPixmap();
diff --git a/examples/widgets/widgets/tetrix/tetrixboard.h b/examples/widgets/widgets/tetrix/tetrixboard.h
index d777a76a20..7c6871dfbd 100644
--- a/examples/widgets/widgets/tetrix/tetrixboard.h
+++ b/examples/widgets/widgets/tetrix/tetrixboard.h
@@ -70,8 +70,8 @@ public:
TetrixBoard(QWidget *parent = 0);
void setNextPieceLabel(QLabel *label);
- QSize sizeHint() const Q_DECL_OVERRIDE;
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
+ QSize minimumSizeHint() const override;
public slots:
void start();
@@ -83,9 +83,9 @@ signals:
void linesRemovedChanged(int numLines);
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+ void timerEvent(QTimerEvent *event) override;
//! [0]
//! [1]
diff --git a/examples/widgets/widgets/tooltips/sortingbox.h b/examples/widgets/widgets/tooltips/sortingbox.h
index 326eeee5a7..2ac27614a5 100644
--- a/examples/widgets/widgets/tooltips/sortingbox.h
+++ b/examples/widgets/widgets/tooltips/sortingbox.h
@@ -70,12 +70,12 @@ public:
SortingBox();
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
private slots:
void createNewCircle();
diff --git a/examples/widgets/widgets/wiggly/wigglywidget.h b/examples/widgets/widgets/wiggly/wigglywidget.h
index 1967b809f5..58a7d045e1 100644
--- a/examples/widgets/widgets/wiggly/wigglywidget.h
+++ b/examples/widgets/widgets/wiggly/wigglywidget.h
@@ -66,8 +66,8 @@ public slots:
void setText(const QString &newText) { text = newText; }
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void timerEvent(QTimerEvent *event) override;
private:
QBasicTimer timer;
diff --git a/examples/widgets/windowcontainer/windowcontainer.cpp b/examples/widgets/windowcontainer/windowcontainer.cpp
index 39b45a80ce..9f2124c4e1 100644
--- a/examples/widgets/windowcontainer/windowcontainer.cpp
+++ b/examples/widgets/windowcontainer/windowcontainer.cpp
@@ -73,7 +73,7 @@ public:
{
}
- void render(QPainter *p) Q_DECL_OVERRIDE {
+ void render(QPainter *p) override {
QLinearGradient g(0, 0, 0, height());
g.setColorAt(0, QColor("lightsteelblue"));
g.setColorAt(1, Qt::black);
@@ -101,7 +101,7 @@ public:
p->drawPolyline(m_polygon);
}
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE {
+ void mousePressEvent(QMouseEvent *e) override {
if (!m_mouseDown) {
m_mouseDown = true;
m_polygon.clear();
@@ -110,14 +110,14 @@ public:
}
}
- void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE {
+ void mouseMoveEvent(QMouseEvent *e) override {
if (m_mouseDown) {
m_polygon.append(e->pos());
renderLater();
}
}
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE {
+ void mouseReleaseEvent(QMouseEvent *e) override {
if (m_mouseDown) {
m_mouseDown = false;
m_polygon.append(e->pos());
@@ -125,23 +125,23 @@ public:
}
}
- void focusInEvent(QFocusEvent *) Q_DECL_OVERRIDE {
+ void focusInEvent(QFocusEvent *) override {
m_focus = true;
renderLater();
}
- void focusOutEvent(QFocusEvent *) Q_DECL_OVERRIDE {
+ void focusOutEvent(QFocusEvent *) override {
m_focus = false;
m_polygon.clear();
renderLater();
}
- void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE {
+ void keyPressEvent(QKeyEvent *e) override {
m_key = e->text();
renderLater();
}
- void keyReleaseEvent(QKeyEvent *) Q_DECL_OVERRIDE {
+ void keyReleaseEvent(QKeyEvent *) override {
m_key = QString();
renderLater();
}
diff --git a/examples/xml/saxbookmarks/xbelhandler.h b/examples/xml/saxbookmarks/xbelhandler.h
index e1fd06dd3f..3f4cb109e9 100644
--- a/examples/xml/saxbookmarks/xbelhandler.h
+++ b/examples/xml/saxbookmarks/xbelhandler.h
@@ -65,12 +65,12 @@ public:
XbelHandler(QTreeWidget *treeWidget);
bool startElement(const QString &namespaceURI, const QString &localName,
- const QString &qName, const QXmlAttributes &attributes) Q_DECL_OVERRIDE;
+ const QString &qName, const QXmlAttributes &attributes) override;
bool endElement(const QString &namespaceURI, const QString &localName,
- const QString &qName) Q_DECL_OVERRIDE;
- bool characters(const QString &str) Q_DECL_OVERRIDE;
- bool fatalError(const QXmlParseException &exception) Q_DECL_OVERRIDE;
- QString errorString() const Q_DECL_OVERRIDE;
+ const QString &qName) override;
+ bool characters(const QString &str) override;
+ bool fatalError(const QXmlParseException &exception) override;
+ QString errorString() const override;
private:
QTreeWidgetItem *createChildItem(const QString &tagName);