diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-26 17:34:27 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-27 08:27:38 +0000 |
commit | e17c89f4ce74e5699ed50dc2187a39d8990316c4 (patch) | |
tree | b1f9b85d5bd1233d8931813dc4e06f7342be2249 | |
parent | e41d067227eb6225b05df88ab724708588fa5304 (diff) | |
download | qtdeclarative-e17c89f4ce74e5699ed50dc2187a39d8990316c4.tar.gz |
use the override keyword consistently and correctly (clang-tidy)
Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
87 files changed, 272 insertions, 272 deletions
diff --git a/examples/qml/networkaccessmanagerfactory/main.cpp b/examples/qml/networkaccessmanagerfactory/main.cpp index 76d487e029..95dfb5990d 100644 --- a/examples/qml/networkaccessmanagerfactory/main.cpp +++ b/examples/qml/networkaccessmanagerfactory/main.cpp @@ -74,7 +74,7 @@ static int proxyPort = 0; class MyNetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory { public: - virtual QNetworkAccessManager *create(QObject *parent); + QNetworkAccessManager *create(QObject *parent) override; }; QNetworkAccessManager *MyNetworkAccessManagerFactory::create(QObject *parent) diff --git a/examples/qml/qmlextensionplugins/plugin.cpp b/examples/qml/qmlextensionplugins/plugin.cpp index 3ef7f04f95..4866106e4a 100644 --- a/examples/qml/qmlextensionplugins/plugin.cpp +++ b/examples/qml/qmlextensionplugins/plugin.cpp @@ -87,7 +87,7 @@ signals: void timeChanged(); protected: - void timerEvent(QTimerEvent *) + void timerEvent(QTimerEvent *) override { QTime now = QTime::currentTime(); if (now.second() == 59 && now.minute() == time.minute() && now.hour() == time.hour()) { @@ -125,7 +125,7 @@ public: } } - ~TimeModel() + ~TimeModel() override { if (--instances == 0) { timer->stop(); @@ -154,7 +154,7 @@ class QExampleQmlPlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - void registerTypes(const char *uri) + void registerTypes(const char *uri) override { Q_ASSERT(uri == QLatin1String("TimeExample")); qmlRegisterType<TimeModel>(uri, 1, 0, "Time"); diff --git a/examples/quick/imageprovider/imageprovider.cpp b/examples/quick/imageprovider/imageprovider.cpp index 2a2355031a..662bd8bb70 100644 --- a/examples/quick/imageprovider/imageprovider.cpp +++ b/examples/quick/imageprovider/imageprovider.cpp @@ -65,7 +65,7 @@ public: { } - QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) + QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override { int width = 100; int height = 50; @@ -99,12 +99,12 @@ class ImageProviderExtensionPlugin : public QQmlExtensionPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - void registerTypes(const char *uri) + void registerTypes(const char *uri) override { Q_UNUSED(uri); } - void initializeEngine(QQmlEngine *engine, const char *uri) + void initializeEngine(QQmlEngine *engine, const char *uri) override { Q_UNUSED(uri); engine->addImageProvider("colors", new ColorImageProvider); diff --git a/examples/quick/imageresponseprovider/imageresponseprovider.cpp b/examples/quick/imageresponseprovider/imageresponseprovider.cpp index 909a043ca5..4f7c12b1d8 100644 --- a/examples/quick/imageresponseprovider/imageresponseprovider.cpp +++ b/examples/quick/imageresponseprovider/imageresponseprovider.cpp @@ -66,12 +66,12 @@ class AsyncImageResponse : public QQuickImageResponse, public QRunnable setAutoDelete(false); } - QQuickTextureFactory *textureFactory() const + QQuickTextureFactory *textureFactory() const override { return QQuickTextureFactory::textureFactoryForImage(m_image); } - void run() + void run() override { m_image = QImage(50, 50, QImage::Format_RGB32); if (m_id == "slow") { @@ -97,7 +97,7 @@ class AsyncImageResponse : public QQuickImageResponse, public QRunnable class AsyncImageProvider : public QQuickAsyncImageProvider { public: - QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) + QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override { AsyncImageResponse *response = new AsyncImageResponse(id, requestedSize); pool.start(response); @@ -114,12 +114,12 @@ class ImageProviderExtensionPlugin : public QQmlExtensionPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - void registerTypes(const char *uri) + void registerTypes(const char *uri) override { Q_UNUSED(uri); } - void initializeEngine(QQmlEngine *engine, const char *uri) + void initializeEngine(QQmlEngine *engine, const char *uri) override { Q_UNUSED(uri); engine->addImageProvider("async", new AsyncImageProvider); diff --git a/examples/quick/quickwidgets/quickwidget/fbitem.cpp b/examples/quick/quickwidgets/quickwidget/fbitem.cpp index 6c71b6184e..95ff2da2e0 100644 --- a/examples/quick/quickwidgets/quickwidget/fbitem.cpp +++ b/examples/quick/quickwidgets/quickwidget/fbitem.cpp @@ -63,11 +63,11 @@ public: // The lifetime of the FBO and this class depends on how QQuickWidget // manages the scenegraph and context when it comes to showing and hiding // the widget. The actual behavior is proven by the debug prints. - ~FbRenderer() { + ~FbRenderer() override { qDebug("FbRenderer destroyed"); } - void render() { + void render() override { QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); f->glClearColor(c, 0, 0, 1); f->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); @@ -77,7 +77,7 @@ public: update(); } - QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) { + QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override { qDebug() << "Creating FBO" << size; QOpenGLFramebufferObjectFormat format; format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); diff --git a/examples/quick/scenegraph/graph/linenode.cpp b/examples/quick/scenegraph/graph/linenode.cpp index b9ce1afc38..cb7f1c8e7f 100644 --- a/examples/quick/scenegraph/graph/linenode.cpp +++ b/examples/quick/scenegraph/graph/linenode.cpp @@ -71,15 +71,15 @@ public: setShaderSourceFile(QOpenGLShader::Fragment, ":/scenegraph/graph/shaders/line.fsh"); } - QList<QByteArray> attributes() const { return QList<QByteArray>() << "pos" << "t"; } + QList<QByteArray> attributes() const override { return QList<QByteArray>() << "pos" << "t"; } - void updateState(const LineMaterial *m, const LineMaterial *) { + void updateState(const LineMaterial *m, const LineMaterial *) override { program()->setUniformValue(id_color, m->color); program()->setUniformValue(id_spread, m->spread); program()->setUniformValue(id_size, m->size); } - void resolveUniforms() { + void resolveUniforms() override { id_spread = program()->uniformLocation("spread"); id_size = program()->uniformLocation("size"); id_color = program()->uniformLocation("color"); diff --git a/examples/quick/scenegraph/graph/noisynode.cpp b/examples/quick/scenegraph/graph/noisynode.cpp index d1eaa1ec26..de5a616da2 100644 --- a/examples/quick/scenegraph/graph/noisynode.cpp +++ b/examples/quick/scenegraph/graph/noisynode.cpp @@ -77,9 +77,9 @@ public: setShaderSourceFile(QOpenGLShader::Fragment, ":/scenegraph/graph/shaders/noisy.fsh"); } - QList<QByteArray> attributes() const { return QList<QByteArray>() << "aVertex" << "aTexCoord"; } + QList<QByteArray> attributes() const override { return QList<QByteArray>() << "aVertex" << "aTexCoord"; } - void updateState(const NoisyMaterial *m, const NoisyMaterial *) { + void updateState(const NoisyMaterial *m, const NoisyMaterial *) override { // Set the color program()->setUniformValue(id_color, m->color); @@ -93,7 +93,7 @@ public: program()->setUniformValue(id_textureSize, QSizeF(1.0 / s.width(), 1.0 / s.height())); } - void resolveUniforms() { + void resolveUniforms() override { id_texture = program()->uniformLocation("texture"); id_textureSize = program()->uniformLocation("textureSize"); id_color = program()->uniformLocation("color"); diff --git a/examples/quick/scenegraph/simplematerial/simplematerial.cpp b/examples/quick/scenegraph/simplematerial/simplematerial.cpp index 96c08aff04..6773b6fb5a 100644 --- a/examples/quick/scenegraph/simplematerial/simplematerial.cpp +++ b/examples/quick/scenegraph/simplematerial/simplematerial.cpp @@ -87,7 +87,7 @@ class Shader : public QSGSimpleMaterialShader<State> //! [2] //! [3] public: - const char *vertexShader() const { + const char *vertexShader() const override { return "attribute highp vec4 aVertex; \n" "attribute highp vec2 aTexCoord; \n" @@ -99,7 +99,7 @@ public: "}"; } - const char *fragmentShader() const { + const char *fragmentShader() const override { return "uniform lowp float qt_Opacity; \n" "uniform lowp vec4 color; \n" @@ -110,17 +110,17 @@ public: "}"; } //! [3] //! [4] - QList<QByteArray> attributes() const + QList<QByteArray> attributes() const override { return QList<QByteArray>() << "aVertex" << "aTexCoord"; } //! [4] //! [5] - void updateState(const State *state, const State *) + void updateState(const State *state, const State *) override { program()->setUniformValue(id_color, state->color); } //! [5] //! [6] - void resolveUniforms() + void resolveUniforms() override { id_color = program()->uniformLocation("color"); } @@ -184,7 +184,7 @@ private: //! [8] //! [9] public: - QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *) + QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *) override { ColorNode *n = static_cast<ColorNode *>(node); if (!node) diff --git a/examples/quick/scenegraph/textureinsgnode/fboinsgrenderer.cpp b/examples/quick/scenegraph/textureinsgnode/fboinsgrenderer.cpp index 0b9617b55f..8ba5bddb2a 100644 --- a/examples/quick/scenegraph/textureinsgnode/fboinsgrenderer.cpp +++ b/examples/quick/scenegraph/textureinsgnode/fboinsgrenderer.cpp @@ -64,12 +64,12 @@ public: logo.initialize(); } - void render() { + void render() override { logo.render(); update(); } - QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) { + QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override { QOpenGLFramebufferObjectFormat format; format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); format.setSamples(4); diff --git a/examples/quick/scenegraph/textureinthread/threadrenderer.cpp b/examples/quick/scenegraph/textureinthread/threadrenderer.cpp index 27cb0eb5ea..c364d0b7dd 100644 --- a/examples/quick/scenegraph/textureinthread/threadrenderer.cpp +++ b/examples/quick/scenegraph/textureinthread/threadrenderer.cpp @@ -165,7 +165,7 @@ public: setFiltering(QSGTexture::Linear); } - ~TextureNode() + ~TextureNode() override { delete m_texture; } diff --git a/examples/quick/scenegraph/threadedanimation/spinner.cpp b/examples/quick/scenegraph/threadedanimation/spinner.cpp index 83c4494720..c19354b3f5 100644 --- a/examples/quick/scenegraph/threadedanimation/spinner.cpp +++ b/examples/quick/scenegraph/threadedanimation/spinner.cpp @@ -78,7 +78,7 @@ public: appendChildNode(textureNode); } - ~SpinnerNode() { + ~SpinnerNode() override { delete m_texture; } diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp index 3c02c4695e..8d7597addf 100644 --- a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp +++ b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp @@ -77,7 +77,7 @@ class XorBlendShader : public QSGSimpleMaterialShader<XorBlendState> QSG_DECLARE_SIMPLE_SHADER(XorBlendShader, XorBlendState) public: - const char *vertexShader() const { + const char *vertexShader() const override { return "attribute highp vec4 aVertex; \n" "attribute highp vec2 aTexCoord; \n" @@ -89,7 +89,7 @@ public: "}"; } - const char *fragmentShader() const { + const char *fragmentShader() const override { return "uniform lowp float qt_Opacity; \n" "uniform lowp sampler2D uSource1; \n" @@ -102,11 +102,11 @@ public: "}"; } - QList<QByteArray> attributes() const { + QList<QByteArray> attributes() const override { return QList<QByteArray>() << "aVertex" << "aTexCoord"; } - void updateState(const XorBlendState *state, const XorBlendState *) { + void updateState(const XorBlendState *state, const XorBlendState *) override { QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); // We bind the textures in inverse order so that we leave the updateState // function with GL_TEXTURE0 as the active texture unit. This is maintain @@ -118,7 +118,7 @@ public: state->texture1->bind(); } - void resolveUniforms() { + void resolveUniforms() override { // The texture units never change, only the texturess we bind to them so // we set these once and for all here. program()->setUniformValue("uSource1", 0); // GL_TEXTURE0 @@ -165,7 +165,7 @@ public: connect(m_provider2.data(), &QSGTextureProvider::textureChanged, this, &XorNode::textureChange, Qt::DirectConnection); } - void preprocess() { + void preprocess() override { XorBlendState *state = m_material->state(); // Update the textures from the providers, calling into QSGDynamicTexture if required if (m_provider1) { diff --git a/examples/quick/textureprovider/etcprovider.cpp b/examples/quick/textureprovider/etcprovider.cpp index 01a3f69be3..65960169e2 100644 --- a/examples/quick/textureprovider/etcprovider.cpp +++ b/examples/quick/textureprovider/etcprovider.cpp @@ -166,10 +166,10 @@ public: QSize m_size; QSize m_paddedSize; - QSize textureSize() const { return m_size; } - int textureByteCount() const { return m_data.size(); } + QSize textureSize() const override { return m_size; } + int textureByteCount() const override { return m_data.size(); } - QSGTexture *createTexture(QQuickWindow *) const { + QSGTexture *createTexture(QQuickWindow *) const override { EtcTexture *texture = new EtcTexture; texture->m_data = m_data; texture->m_size = m_size; diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index 5148b2f18f..1ed4a754d3 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -97,7 +97,7 @@ class QQmlSqlDatabaseData : public QV8Engine::Deletable { public: QQmlSqlDatabaseData(QV4::ExecutionEngine *engine); - ~QQmlSqlDatabaseData(); + ~QQmlSqlDatabaseData() override; QV4::PersistentValue databaseProto; QV4::PersistentValue queryProto; @@ -693,7 +693,7 @@ public: QQuickLocalStorage(QObject *parent=nullptr) : QObject(parent) { } - ~QQuickLocalStorage() { + ~QQuickLocalStorage() override { } Q_INVOKABLE void openDatabaseSync(QQmlV4Function* args); diff --git a/src/imports/qtquick2/plugin.cpp b/src/imports/qtquick2/plugin.cpp index 516b823856..147f01e81b 100644 --- a/src/imports/qtquick2/plugin.cpp +++ b/src/imports/qtquick2/plugin.cpp @@ -65,7 +65,7 @@ public: QQmlQtQuick2Module::defineModule(); } - ~QtQuick2Plugin() + ~QtQuick2Plugin() override { if (moduleDefined) QQmlQtQuick2Module::undefineModule(); diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp index 41b5d1715c..45e9bd2cf6 100644 --- a/src/imports/testlib/main.cpp +++ b/src/imports/testlib/main.cpp @@ -73,7 +73,7 @@ public: :QObject(parent) {} - ~QuickTestUtil() + ~QuickTestUtil() override {} bool printAvailableFunctions() const { diff --git a/src/particles/qquickv4particledata.cpp b/src/particles/qquickv4particledata.cpp index fb674e1b64..c3d1978a2c 100644 --- a/src/particles/qquickv4particledata.cpp +++ b/src/particles/qquickv4particledata.cpp @@ -294,7 +294,7 @@ class QV4ParticleDataDeletable : public QV8Engine::Deletable { public: QV4ParticleDataDeletable(QV4::ExecutionEngine *engine); - ~QV4ParticleDataDeletable(); + ~QV4ParticleDataDeletable() override; QV4::PersistentValue proto; }; diff --git a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp index dd0e4c6a04..1708166a8a 100644 --- a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp @@ -55,7 +55,7 @@ class QLocalClientConnection : public QQmlDebugServerConnection public: QLocalClientConnection(); - ~QLocalClientConnection(); + ~QLocalClientConnection() override; void setServer(QQmlDebugServer *server) override; bool setPortRange(int portFrom, int portTo, bool block, const QString &hostaddress) override; diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp index 32ce820ea8..42442b07e7 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp @@ -54,7 +54,7 @@ class QTcpServerConnection : public QQmlDebugServerConnection public: QTcpServerConnection(); - ~QTcpServerConnection(); + ~QTcpServerConnection() override; void setServer(QQmlDebugServer *server) override; bool setPortRange(int portFrom, int portTo, bool block, const QString &hostaddress) override; diff --git a/src/qml/animations/qanimationgroupjob_p.h b/src/qml/animations/qanimationgroupjob_p.h index 42a73aa77b..fb567dc019 100644 --- a/src/qml/animations/qanimationgroupjob_p.h +++ b/src/qml/animations/qanimationgroupjob_p.h @@ -61,7 +61,7 @@ class Q_QML_PRIVATE_EXPORT QAnimationGroupJob : public QAbstractAnimationJob Q_DISABLE_COPY(QAnimationGroupJob) public: QAnimationGroupJob(); - ~QAnimationGroupJob(); + ~QAnimationGroupJob() override; void appendAnimation(QAbstractAnimationJob *animation); void prependAnimation(QAbstractAnimationJob *animation); diff --git a/src/qml/animations/qpauseanimationjob_p.h b/src/qml/animations/qpauseanimationjob_p.h index e228f46daa..d0e8d57fc7 100644 --- a/src/qml/animations/qpauseanimationjob_p.h +++ b/src/qml/animations/qpauseanimationjob_p.h @@ -60,7 +60,7 @@ class Q_QML_PRIVATE_EXPORT QPauseAnimationJob : public QAbstractAnimationJob Q_DISABLE_COPY(QPauseAnimationJob) public: explicit QPauseAnimationJob(int duration = 250); - ~QPauseAnimationJob(); + ~QPauseAnimationJob() override; int duration() const override; void setDuration(int msecs); diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index eb5772e1bc..bc4ca5d6f4 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2928,43 +2928,43 @@ public: return locs; } - bool visit(ArrayMemberExpression *) Q_DECL_OVERRIDE + bool visit(ArrayMemberExpression *) override { locs.setAllVolatile(); return false; } - bool visit(FieldMemberExpression *) Q_DECL_OVERRIDE + bool visit(FieldMemberExpression *) override { locs.setAllVolatile(); return false; } - bool visit(PostIncrementExpression *e) Q_DECL_OVERRIDE + bool visit(PostIncrementExpression *e) override { collectIdentifiers(locs.specificLocations, e->base); return false; } - bool visit(PostDecrementExpression *e) Q_DECL_OVERRIDE + bool visit(PostDecrementExpression *e) override { collectIdentifiers(locs.specificLocations, e->base); return false; } - bool visit(PreIncrementExpression *e) Q_DECL_OVERRIDE + bool visit(PreIncrementExpression *e) override { collectIdentifiers(locs.specificLocations, e->expression); return false; } - bool visit(PreDecrementExpression *e) Q_DECL_OVERRIDE + bool visit(PreDecrementExpression *e) override { collectIdentifiers(locs.specificLocations, e->expression); return false; } - bool visit(BinaryExpression *e) Q_DECL_OVERRIDE + bool visit(BinaryExpression *e) override { switch (e->op) { case QSOperator::InplaceAnd: diff --git a/src/qml/debugger/qqmlabstractprofileradapter_p.h b/src/qml/debugger/qqmlabstractprofileradapter_p.h index f86855e964..c63e694c7e 100644 --- a/src/qml/debugger/qqmlabstractprofileradapter_p.h +++ b/src/qml/debugger/qqmlabstractprofileradapter_p.h @@ -70,7 +70,7 @@ public: QQmlAbstractProfilerAdapter(QObject *parent = nullptr) : QObject(parent), service(nullptr), waiting(true), featuresEnabled(0) {} - virtual ~QQmlAbstractProfilerAdapter() {} + ~QQmlAbstractProfilerAdapter() override {} void setService(QQmlProfilerService *new_service) { service = new_service; } virtual qint64 sendMessages(qint64 until, QList<QByteArray> &messages, bool trackLocations) = 0; diff --git a/src/qml/debugger/qqmldebugconnector_p.h b/src/qml/debugger/qqmldebugconnector_p.h index cead6af338..d1ad90adfd 100644 --- a/src/qml/debugger/qqmldebugconnector_p.h +++ b/src/qml/debugger/qqmldebugconnector_p.h @@ -126,7 +126,7 @@ class Q_QML_PRIVATE_EXPORT QQmlDebugConnectorFactory : public QObject { Q_OBJECT public: virtual QQmlDebugConnector *create(const QString &key) = 0; - ~QQmlDebugConnectorFactory(); + ~QQmlDebugConnectorFactory() override; }; #define QQmlDebugConnectorFactory_iid "org.qt-project.Qt.QQmlDebugConnectorFactory" diff --git a/src/qml/debugger/qqmldebugservice_p.h b/src/qml/debugger/qqmldebugservice_p.h index e9f7d2d396..c52ba90a79 100644 --- a/src/qml/debugger/qqmldebugservice_p.h +++ b/src/qml/debugger/qqmldebugservice_p.h @@ -69,7 +69,7 @@ class Q_QML_PRIVATE_EXPORT QQmlDebugService : public QObject Q_DECLARE_PRIVATE(QQmlDebugService) public: - ~QQmlDebugService(); + ~QQmlDebugService() override; const QString &name() const; float version() const; diff --git a/src/qml/jit/qv4jit_p.h b/src/qml/jit/qv4jit_p.h index 077c2e2177..c17ab4ff6e 100644 --- a/src/qml/jit/qv4jit_p.h +++ b/src/qml/jit/qv4jit_p.h @@ -119,131 +119,131 @@ public: void generate(); - void generate_Ret() Q_DECL_OVERRIDE; - void generate_Debug() Q_DECL_OVERRIDE; - void generate_LoadConst(int index) Q_DECL_OVERRIDE; - void generate_LoadZero() Q_DECL_OVERRIDE; - void generate_LoadTrue() Q_DECL_OVERRIDE; - void generate_LoadFalse() Q_DECL_OVERRIDE; - void generate_LoadNull() Q_DECL_OVERRIDE; - void generate_LoadUndefined() Q_DECL_OVERRIDE; - void generate_LoadInt(int value) Q_DECL_OVERRIDE; - void generate_MoveConst(int constIndex, int destTemp) Q_DECL_OVERRIDE; - void generate_LoadReg(int reg) Q_DECL_OVERRIDE; - void generate_StoreReg(int reg) Q_DECL_OVERRIDE; - void generate_MoveReg(int srcReg, int destReg) Q_DECL_OVERRIDE; - void generate_LoadLocal(int index) Q_DECL_OVERRIDE; - void generate_StoreLocal(int index) Q_DECL_OVERRIDE; - void generate_LoadScopedLocal(int scope, int index) Q_DECL_OVERRIDE; - void generate_StoreScopedLocal(int scope, int index) Q_DECL_OVERRIDE; - void generate_LoadRuntimeString(int stringId) Q_DECL_OVERRIDE; - void generate_MoveRegExp(int regExpId, int destReg) Q_DECL_OVERRIDE; - void generate_LoadClosure(int value) Q_DECL_OVERRIDE; - void generate_LoadName(int name) Q_DECL_OVERRIDE; - void generate_LoadGlobalLookup(int index) Q_DECL_OVERRIDE; - void generate_StoreNameSloppy(int name) Q_DECL_OVERRIDE; - void generate_StoreNameStrict(int name) Q_DECL_OVERRIDE; - void generate_LoadElement(int base, int index) Q_DECL_OVERRIDE; - void generate_LoadElementA(int base) Q_DECL_OVERRIDE; - void generate_StoreElement(int base, int index) Q_DECL_OVERRIDE; - void generate_LoadProperty(int name, int base) Q_DECL_OVERRIDE; - void generate_LoadPropertyA(int name) Q_DECL_OVERRIDE; - void generate_GetLookup(int index, int base) Q_DECL_OVERRIDE; - void generate_GetLookupA(int index) Q_DECL_OVERRIDE; - void generate_StoreProperty(int name, int base) Q_DECL_OVERRIDE; - void generate_SetLookup(int index, int base) Q_DECL_OVERRIDE; + void generate_Ret() override; + void generate_Debug() override; + void generate_LoadConst(int index) override; + void generate_LoadZero() override; + void generate_LoadTrue() override; + void generate_LoadFalse() override; + void generate_LoadNull() override; + void generate_LoadUndefined() override; + void generate_LoadInt(int value) override; + void generate_MoveConst(int constIndex, int destTemp) override; + void generate_LoadReg(int reg) override; + void generate_StoreReg(int reg) override; + void generate_MoveReg(int srcReg, int destReg) override; + void generate_LoadLocal(int index) override; + void generate_StoreLocal(int index) override; + void generate_LoadScopedLocal(int scope, int index) override; + void generate_StoreScopedLocal(int scope, int index) override; + void generate_LoadRuntimeString(int stringId) override; + void generate_MoveRegExp(int regExpId, int destReg) override; + void generate_LoadClosure(int value) override; + void generate_LoadName(int name) override; + void generate_LoadGlobalLookup(int index) override; + void generate_StoreNameSloppy(int name) override; + void generate_StoreNameStrict(int name) override; + void generate_LoadElement(int base, int index) override; + void generate_LoadElementA(int base) override; + void generate_StoreElement(int base, int index) override; + void generate_LoadProperty(int name, int base) override; + void generate_LoadPropertyA(int name) override; + void generate_GetLookup(int index, int base) override; + void generate_GetLookupA(int index) override; + void generate_StoreProperty(int name, int base) override; + void generate_SetLookup(int index, int base) override; void generate_StoreScopeObjectProperty(int base, - int propertyIndex) Q_DECL_OVERRIDE; + int propertyIndex) override; void generate_StoreContextObjectProperty(int base, - int propertyIndex) Q_DECL_OVERRIDE; + int propertyIndex) override; void generate_LoadScopeObjectProperty(int propertyIndex, int base, - int captureRequired) Q_DECL_OVERRIDE; + int captureRequired) override; void generate_LoadContextObjectProperty(int propertyIndex, int base, - int captureRequired) Q_DECL_OVERRIDE; - void generate_LoadIdObject(int index, int base) Q_DECL_OVERRIDE; - void generate_CallValue(int name, int argc, int argv) Q_DECL_OVERRIDE; - void generate_CallProperty(int name, int base, int argc, int argv) Q_DECL_OVERRIDE; - void generate_CallPropertyLookup(int lookupIndex, int base, int argc, int argv) Q_DECL_OVERRIDE; - void generate_CallElement(int base, int index, int argc, int argv) Q_DECL_OVERRIDE; - void generate_CallName(int name, int argc, int argv) Q_DECL_OVERRIDE; - void generate_CallPossiblyDirectEval(int argc, int argv) Q_DECL_OVERRIDE; - void generate_CallGlobalLookup(int index, int argc, int argv) Q_DECL_OVERRIDE; - void generate_CallScopeObjectProperty(int propIdx, int base, int argc, int argv) Q_DECL_OVERRIDE; - void generate_CallContextObjectProperty(int propIdx, int base, int argc, int argv) Q_DECL_OVERRIDE; - void generate_SetExceptionHandler(int offset) Q_DECL_OVERRIDE; - void generate_ThrowException() Q_DECL_OVERRIDE; - void generate_GetException() Q_DECL_OVERRIDE; - void generate_SetException() Q_DECL_OVERRIDE; - void generate_CreateCallContext() Q_DECL_OVERRIDE; - void generate_PushCatchContext(int name, int reg) Q_DECL_OVERRIDE; - void generate_PushWithContext(int reg) Q_DECL_OVERRIDE; - void generate_PopContext(int reg) Q_DECL_OVERRIDE; - void generate_ForeachIteratorObject() Q_DECL_OVERRIDE; - void generate_ForeachNextPropertyName() Q_DECL_OVERRIDE; - void generate_DeleteMember(int member, int base) Q_DECL_OVERRIDE; - void generate_DeleteSubscript(int base, int index) Q_DECL_OVERRIDE; - void generate_DeleteName(int name) Q_DECL_OVERRIDE; - void generate_TypeofName(int name) Q_DECL_OVERRIDE; - void generate_TypeofValue() Q_DECL_OVERRIDE; - void generate_DeclareVar(int varName, int isDeletable) Q_DECL_OVERRIDE; - void generate_DefineArray(int argc, int args) Q_DECL_OVERRIDE; + int captureRequired) override; + void generate_LoadIdObject(int index, int base) override; + void generate_CallValue(int name, int argc, int argv) override; + void generate_CallProperty(int name, int base, int argc, int argv) override; + void generate_CallPropertyLookup(int lookupIndex, int base, int argc, int argv) override; + void generate_CallElement(int base, int index, int argc, int argv) override; + void generate_CallName(int name, int argc, int argv) override; + void generate_CallPossiblyDirectEval(int argc, int argv) override; + void generate_CallGlobalLookup(int index, int argc, int argv) override; + void generate_CallScopeObjectProperty(int propIdx, int base, int argc, int argv) override; + void generate_CallContextObjectProperty(int propIdx, int base, int argc, int argv) override; + void generate_SetExceptionHandler(int offset) override; + void generate_ThrowException() override; + void generate_GetException() override; + void generate_SetException() override; + void generate_CreateCallContext() override; + void generate_PushCatchContext(int name, int reg) override; + void generate_PushWithContext(int reg) override; + void generate_PopContext(int reg) override; + void generate_ForeachIteratorObject() override; + void generate_ForeachNextPropertyName() override; + void generate_DeleteMember(int member, int base) override; + void generate_DeleteSubscript(int base, int index) override; + void generate_DeleteName(int name) override; + void generate_TypeofName(int name) override; + void generate_TypeofValue() override; + void generate_DeclareVar(int varName, int isDeletable) override; + void generate_DefineArray(int argc, int args) override; void generate_DefineObjectLiteral(int internalClassId, int arrayValueCount, int arrayGetterSetterCountAndFlags, - int args) Q_DECL_OVERRIDE; - void generate_CreateMappedArgumentsObject() Q_DECL_OVERRIDE; - void generate_CreateUnmappedArgumentsObject() Q_DECL_OVERRIDE; - void generate_ConvertThisToObject() Q_DECL_OVERRIDE; - void generate_Construct(int func, int argc, int argv) Q_DECL_OVERRIDE; - void generate_Jump(int offset) Q_DECL_OVERRIDE; - void generate_JumpTrue(int offset) Q_DECL_OVERRIDE; - void generate_JumpFalse(int offset) Q_DECL_OVERRIDE; - void generate_CmpEqNull() Q_DECL_OVERRIDE; - void generate_CmpNeNull() Q_DECL_OVERRIDE; - void generate_CmpEqInt(int lhs) Q_DECL_OVERRIDE; - void generate_CmpNeInt(int lhs) Q_DECL_OVERRIDE; - void generate_CmpEq(int lhs) Q_DECL_OVERRIDE; - void generate_CmpNe(int lhs) Q_DECL_OVERRIDE; - void generate_CmpGt(int lhs) Q_DECL_OVERRIDE; - void generate_CmpGe(int lhs) Q_DECL_OVERRIDE; - void generate_CmpLt(int lhs) Q_DECL_OVERRIDE; - void generate_CmpLe(int lhs) Q_DECL_OVERRIDE; - void generate_CmpStrictEqual(int lhs) Q_DECL_OVERRIDE; - void generate_CmpStrictNotEqual(int lhs) Q_DECL_OVERRIDE; - void generate_CmpIn(int lhs) Q_DECL_OVERRIDE; - void generate_CmpInstanceOf(int lhs) Q_DECL_OVERRIDE; + int args) override; + void generate_CreateMappedArgumentsObject() override; + void generate_CreateUnmappedArgumentsObject() override; + void generate_ConvertThisToObject() override; + void generate_Construct(int func, int argc, int argv) override; + void generate_Jump(int offset) override; + void generate_JumpTrue(int offset) override; + void generate_JumpFalse(int offset) override; + void generate_CmpEqNull() override; + void generate_CmpNeNull() override; + void generate_CmpEqInt(int lhs) override; + void generate_CmpNeInt(int lhs) override; + void generate_CmpEq(int lhs) override; + void generate_CmpNe(int lhs) override; + void generate_CmpGt(int lhs) override; + void generate_CmpGe(int lhs) override; + void generate_CmpLt(int lhs) override; + void generate_CmpLe(int lhs) override; + void generate_CmpStrictEqual(int lhs) override; + void generate_CmpStrictNotEqual(int lhs) override; + void generate_CmpIn(int lhs) override; + void generate_CmpInstanceOf(int lhs) override; void generate_JumpStrictEqualStackSlotInt(int lhs, int rhs, - int offset) Q_DECL_OVERRIDE; + int offset) override; void generate_JumpStrictNotEqualStackSlotInt(int lhs, int rhs, - int offset) Q_DECL_OVERRIDE; - void generate_UNot() Q_DECL_OVERRIDE; - void generate_UPlus() Q_DECL_OVERRIDE; - void generate_UMinus() Q_DECL_OVERRIDE; - void generate_UCompl() Q_DECL_OVERRIDE; - void generate_Increment() Q_DECL_OVERRIDE; - void generate_Decrement() Q_DECL_OVERRIDE; - void generate_Add(int lhs) Q_DECL_OVERRIDE; - void generate_BitAnd(int lhs) Q_DECL_OVERRIDE; - void generate_BitOr(int lhs) Q_DECL_OVERRIDE; - void generate_BitXor(int lhs) Q_DECL_OVERRIDE; - void generate_UShr(int lhs) Q_DECL_OVERRIDE; - void generate_Shr(int lhs) Q_DECL_OVERRIDE; - void generate_Shl(int lhs) Q_DECL_OVERRIDE; - void generate_BitAndConst(int rhs) Q_DECL_OVERRIDE; - void generate_BitOrConst(int rhs) Q_DECL_OVERRIDE; - void generate_BitXorConst(int rhs) Q_DECL_OVERRIDE; - void generate_UShrConst(int rhs) Q_DECL_OVERRIDE; - void generate_ShrConst(int rhs) Q_DECL_OVERRIDE; - void generate_ShlConst(int rhs) Q_DECL_OVERRIDE; - void generate_Mul(int lhs) Q_DECL_OVERRIDE; - void generate_Div(int lhs) Q_DECL_OVERRIDE; - void generate_Mod(int lhs) Q_DECL_OVERRIDE; - void generate_Sub(int lhs) Q_DECL_OVERRIDE; - void generate_LoadQmlContext(int result) Q_DECL_OVERRIDE; - void generate_LoadQmlImportedScripts(int result) Q_DECL_OVERRIDE; - void generate_LoadQmlSingleton(int name) Q_DECL_OVERRIDE; + int offset) override; + void generate_UNot() override; + void generate_UPlus() override; + void generate_UMinus() override; + void generate_UCompl() override; + void generate_Increment() override; + void generate_Decrement() override; + void generate_Add(int lhs) override; + void generate_BitAnd(int lhs) override; + void generate_BitOr(int lhs) override; + void generate_BitXor(int lhs) override; + void generate_UShr(int lhs) override; + void generate_Shr(int lhs) override; + void generate_Shl(int lhs) override; + void generate_BitAndConst(int rhs) override; + void generate_BitOrConst(int rhs) override; + void generate_BitXorConst(int rhs) override; + void generate_UShrConst(int rhs) override; + void generate_ShrConst(int rhs) override; + void generate_ShlConst(int rhs) override; + void generate_Mul(int lhs) override; + void generate_Div(int lhs) override; + void generate_Mod(int lhs) override; + void generate_Sub(int lhs) override; + void generate_LoadQmlContext(int result) override; + void generate_LoadQmlImportedScripts(int result) override; + void generate_LoadQmlSingleton(int name) override; - void startInstruction(Moth::Instr::Type instr) Q_DECL_OVERRIDE; - void endInstruction(Moth::Instr::Type instr) Q_DECL_OVERRIDE; + void startInstruction(Moth::Instr::Type instr) override; + void endInstruction(Moth::Instr::Type instr) override; protected: bool hasLabel() const diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h index 89642b6f20..3ba2b52e89 100644 --- a/src/qml/jsapi/qjsengine.h +++ b/src/qml/jsapi/qjsengine.h @@ -63,7 +63,7 @@ class Q_QML_EXPORT QJSEngine public: QJSEngine(); explicit QJSEngine(QObject *parent); - virtual ~QJSEngine(); + ~QJSEngine() override; QJSValue globalObject() const; diff --git a/src/qml/jsapi/qjsengine_p.h b/src/qml/jsapi/qjsengine_p.h index 1ea1d77851..360c9df075 100644 --- a/src/qml/jsapi/qjsengine_p.h +++ b/src/qml/jsapi/qjsengine_p.h @@ -75,7 +75,7 @@ public: static QJSEnginePrivate* get(QV4::ExecutionEngine *e); QJSEnginePrivate() : mutex(QMutex::Recursive) {} - ~QJSEnginePrivate(); + ~QJSEnginePrivate() override; static void addToDebugServer(QJSEngine *q); static void removeFromDebugServer(QJSEngine *q); diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h index 61a55964ab..9b41bb6e7a 100644 --- a/src/qml/jsruntime/qv4debugging_p.h +++ b/src/qml/jsruntime/qv4debugging_p.h @@ -78,7 +78,7 @@ class Q_QML_EXPORT Debugger : public QObject Q_OBJECT public: - virtual ~Debugger() {} + ~Debugger() override {} virtual bool pauseAtNextOpportunity() const = 0; virtual void maybeBreakAtInstruction() = 0; virtual void enteringFunction() = 0; diff --git a/src/qml/qml/qqmlapplicationengine.h b/src/qml/qml/qqmlapplicationengine.h index d0f9e6d319..bb5d6b5d68 100644 --- a/src/qml/qml/qqmlapplicationengine.h +++ b/src/qml/qml/qqmlapplicationengine.h @@ -56,7 +56,7 @@ public: QQmlApplicationEngine(QObject *parent = nullptr); QQmlApplicationEngine(const QUrl &url, QObject *parent = nullptr); QQmlApplicationEngine(const QString &filePath, QObject *parent = nullptr); - ~QQmlApplicationEngine(); + ~QQmlApplicationEngine() override; #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QList<QObject*> rootObjects(); // ### Qt 6: remove diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h index 8bc9554a42..19ec3f5d4f 100644 --- a/src/qml/qml/qqmlbinding_p.h +++ b/src/qml/qml/qqmlbinding_p.h @@ -79,7 +79,7 @@ public: QObject *obj, QQmlContextData *ctxt, QV4::ExecutionContext *scope); static QQmlBinding *createTranslationBinding(QV4::CompiledData::CompilationUnit *unit, const QV4::CompiledData::Binding *binding, QObject *obj, QQmlContextData *ctxt); - ~QQmlBinding(); + ~QQmlBinding() override; void setTarget(const QQmlProperty &); void setTarget(QObject *, const QQmlPropertyData &, const QQmlPropertyData *valueType); diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h index d3e584fd13..01094a11f7 100644 --- a/src/qml/qml/qqmlboundsignal_p.h +++ b/src/qml/qml/qqmlboundsignal_p.h @@ -92,7 +92,7 @@ public: QQmlEngine *engine() const { return context() ? context()->engine : nullptr; } private: - ~QQmlBoundSignalExpression(); + ~QQmlBoundSignalExpression() override; void init(QQmlContextData *ctxt, QObject *scope); diff --git a/src/qml/qml/qqmlcomponent.h b/src/qml/qml/qqmlcomponent.h index b8cc556e4a..444b3ec46c 100644 --- a/src/qml/qml/qqmlcomponent.h +++ b/src/qml/qml/qqmlcomponent.h @@ -83,7 +83,7 @@ public: QQmlComponent(QQmlEngine *, const QString &fileName, CompilationMode mode, QObject *parent = nullptr); QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent = nullptr); QQmlComponent(QQmlEngine *, const QUrl &url, CompilationMode mode, QObject *parent = nullptr); - virtual ~QQmlComponent(); + ~QQmlComponent() override; enum Status { Null, Ready, Loading, Error }; Q_ENUM(Status) diff --git a/src/qml/qml/qqmlcontext.h b/src/qml/qml/qqmlcontext.h index 506ae216b2..7ed70c7619 100644 --- a/src/qml/qml/qqmlcontext.h +++ b/src/qml/qml/qqmlcontext.h @@ -68,7 +68,7 @@ public: QQmlContext(QQmlEngine *parent, QObject *objParent = nullptr); QQmlContext(QQmlContext *parent, QObject *objParent = nullptr); - virtual ~QQmlContext(); + ~QQmlContext() override; bool isValid() const; diff --git a/src/qml/qml/qqmldelayedcallqueue_p.h b/src/qml/qml/qqmldelayedcallqueue_p.h index 47e211829c..7962318561 100644 --- a/src/qml/qml/qqmldelayedcallqueue_p.h +++ b/src/qml/qml/qqmldelayedcallqueue_p.h @@ -65,7 +65,7 @@ class QQmlDelayedCallQueue : public QObject Q_OBJECT public: QQmlDelayedCallQueue(); - ~QQmlDelayedCallQueue(); + ~QQmlDelayedCallQueue() override; void init(QV4::ExecutionEngine *); diff --git a/src/qml/qml/qqmlengine.h b/src/qml/qml/qqmlengine.h index 937920e191..73ad2754c8 100644 --- a/src/qml/qml/qqmlengine.h +++ b/src/qml/qml/qqmlengine.h @@ -97,7 +97,7 @@ class Q_QML_EXPORT QQmlEngine : public QJSEngine Q_OBJECT public: explicit QQmlEngine(QObject *p = nullptr); - virtual ~QQmlEngine(); + ~QQmlEngine() override; QQmlContext *rootContext() const; diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 2dfbd42e57..d6110c6699 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -122,7 +122,7 @@ class Q_QML_PRIVATE_EXPORT QQmlEnginePrivate : public QJSEnginePrivate Q_DECLARE_PUBLIC(QQmlEngine) public: QQmlEnginePrivate(QQmlEngine *); - ~QQmlEnginePrivate(); + ~QQmlEnginePrivate() override; void init(); // No mutex protecting baseModulesUninitialized, because use outside QQmlEngine @@ -341,7 +341,7 @@ void QQmlEnginePrivate::deleteInEngineThread(T *value) } else { struct I : public Deletable { I(T *value) : value(value) {} - ~I() { delete value; } + ~I() override { delete value; } T *value; }; I *i = new I(value); diff --git a/src/qml/qml/qqmlexpression.h b/src/qml/qml/qqmlexpression.h index e9c8770e92..0eceeb12e1 100644 --- a/src/qml/qml/qqmlexpression.h +++ b/src/qml/qml/qqmlexpression.h @@ -62,7 +62,7 @@ public: QQmlExpression(); QQmlExpression(QQmlContext *, QObject *, const QString &, QObject * = nullptr); explicit QQmlExpression(const QQmlScriptString &, QQmlContext * = nullptr, QObject * = nullptr, QObject * = nullptr); - virtual ~QQmlExpression(); + ~QQmlExpression() override; QQmlEngine *engine() const; QQmlContext *context() const; diff --git a/src/qml/qml/qqmlexpression_p.h b/src/qml/qml/qqmlexpression_p.h index 55059575e1..da10b31b2c 100644 --- a/src/qml/qml/qqmlexpression_p.h +++ b/src/qml/qml/qqmlexpression_p.h @@ -68,7 +68,7 @@ class QQmlExpressionPrivate : public QObjectPrivate, Q_DECLARE_PUBLIC(QQmlExpression) public: QQmlExpressionPrivate(); - ~QQmlExpressionPrivate(); + ~QQmlExpressionPrivate() override; void init(QQmlContextData *, const QString &, QObject *); void init(QQmlContextData *, QV4::Function *runtimeFunction, QObject *); diff --git a/src/qml/qml/qqmlextensioninterface.h b/src/qml/qml/qqmlextensioninterface.h index 62b9b26569..c2d20ef0a3 100644 --- a/src/qml/qml/qqmlextensioninterface.h +++ b/src/qml/qml/qqmlextensioninterface.h @@ -58,7 +58,7 @@ public: class Q_QML_EXPORT QQmlExtensionInterface : public QQmlTypesExtensionInterface { public: - virtual ~QQmlExtensionInterface() {} + ~QQmlExtensionInterface() override {} virtual void initializeEngine(QQmlEngine *engine, const char *uri) = 0; }; diff --git a/src/qml/qml/qqmlextensionplugin.h b/src/qml/qml/qqmlextensionplugin.h index 84a46fb93e..55e9b89dae 100644 --- a/src/qml/qml/qqmlextensionplugin.h +++ b/src/qml/qml/qqmlextensionplugin.h @@ -59,7 +59,7 @@ class Q_QML_EXPORT QQmlExtensionPlugin Q_INTERFACES(QQmlTypesExtensionInterface) public: explicit QQmlExtensionPlugin(QObject *parent = nullptr); - ~QQmlExtensionPlugin(); + ~QQmlExtensionPlugin() override; QUrl baseUrl() const; diff --git a/src/qml/qml/qqmlfileselector.h b/src/qml/qml/qqmlfileselector.h index 4eaf92c918..9b70e3936d 100644 --- a/src/qml/qml/qqmlfileselector.h +++ b/src/qml/qml/qqmlfileselector.h @@ -55,7 +55,7 @@ class Q_QML_EXPORT QQmlFileSelector : public QObject Q_DECLARE_PRIVATE(QQmlFileSelector) public: explicit QQmlFileSelector(QQmlEngine *engine, QObject *parent = nullptr); - ~QQmlFileSelector(); + ~QQmlFileSelector() override; QFileSelector *selector() const Q_DECL_NOTHROW; void setSelector(QFileSelector *selector); void setExtraSelectors(QStringList &strings); // TODO Qt6: remove diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h index bb5477dfbf..4905190b75 100644 --- a/src/qml/qml/qqmlopenmetaobject_p.h +++ b/src/qml/qml/qqmlopenmetaobject_p.h @@ -69,7 +69,7 @@ class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObjectType : public QQmlRefCount, public { public: QQmlOpenMetaObjectType(const QMetaObject *base, QQmlEngine *engine); - ~QQmlOpenMetaObjectType(); + ~QQmlOpenMetaObjectType() override; void createProperties(const QVector<QByteArray> &names); int createProperty(const QByteArray &name); @@ -97,7 +97,7 @@ class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObject : public QAbstractDynamicMetaObjec public: QQmlOpenMetaObject(QObject *, const QMetaObject * = nullptr, bool = true); QQmlOpenMetaObject(QObject *, QQmlOpenMetaObjectType *, bool = true); - ~QQmlOpenMetaObject(); + ~QQmlOpenMetaObject() override; QVariant value(const QByteArray &) const; bool setValue(const QByteArray &, const QVariant &); diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h index 11adea6fc9..fabdcacc36 100644 --- a/src/qml/qml/qqmlprivate.h +++ b/src/qml/qml/qqmlprivate.h @@ -98,7 +98,7 @@ namespace QQmlPrivate class QQmlElement : public T { public: - virtual ~QQmlElement() { + ~QQmlElement() override { QQmlPrivate::qdeclarativeelement_destructor(this); } }; diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index 7b04ba11b8..51a191a41f 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -394,7 +394,7 @@ class Q_QML_PRIVATE_EXPORT QQmlPropertyCache : public QQmlRefCount public: QQmlPropertyCache(); QQmlPropertyCache(const QMetaObject *); - virtual ~QQmlPropertyCache(); + ~QQmlPropertyCache() override; void update(const QMetaObject *); void invalidate(const QMetaObject *); diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h index f2327e9a5f..713f707387 100644 --- a/src/qml/qml/qqmltypeloader_p.h +++ b/src/qml/qml/qqmltypeloader_p.h @@ -110,7 +110,7 @@ public: }; QQmlDataBlob(const QUrl &, Type, QQmlTypeLoader* manager); - virtual ~QQmlDataBlob(); + ~QQmlDataBlob() override; void startLoading(); @@ -262,7 +262,7 @@ public: { public: Blob(const QUrl &url, QQmlDataBlob::Type type, QQmlTypeLoader *loader); - ~Blob(); + ~Blob() override; const QQmlImports &imports() const { return m_importCache; } @@ -438,7 +438,7 @@ private: QQmlTypeData(const QUrl &, QQmlTypeLoader *); public: - ~QQmlTypeData(); + ~QQmlTypeData() override; const QList<ScriptReference> &resolvedScripts() const; @@ -523,7 +523,7 @@ private: QQmlScriptData(); public: - ~QQmlScriptData(); + ~QQmlScriptData() override; QUrl url; QString urlString; @@ -554,7 +554,7 @@ private: QQmlScriptBlob(const QUrl &, QQmlTypeLoader *); public: - ~QQmlScriptBlob(); + ~QQmlScriptBlob() override; struct ScriptReference { diff --git a/src/qml/qml/qqmltypenamecache_p.h b/src/qml/qml/qqmltypenamecache_p.h index c2f7a70d03..28b5e7f0ad 100644 --- a/src/qml/qml/qqmltypenamecache_p.h +++ b/src/qml/qml/qqmltypenamecache_p.h @@ -85,7 +85,7 @@ class Q_QML_PRIVATE_EXPORT QQmlTypeNameCache : public QQmlRefCount { public: QQmlTypeNameCache(const QQmlImports &imports); - virtual ~QQmlTypeNameCache(); + ~QQmlTypeNameCache() override; inline bool isEmpty() const; diff --git a/src/qml/qml/qqmlvaluetype_p.h b/src/qml/qml/qqmlvaluetype_p.h index 7d8473db0e..4ea71e8955 100644 --- a/src/qml/qml/qqmlvaluetype_p.h +++ b/src/qml/qml/qqmlvaluetype_p.h @@ -67,7 +67,7 @@ class Q_QML_PRIVATE_EXPORT QQmlValueType : public QObject, public QAbstractDynam { public: QQmlValueType(int userType, const QMetaObject *metaObject); - ~QQmlValueType(); + ~QQmlValueType() override; void read(QObject *, int); void write(QObject *, int, QQmlPropertyData::WriteFlags flags); QVariant value(); diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index 1da79b8a81..0c82686d47 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -81,7 +81,7 @@ class QQmlVMEVariantQObjectPtr : public QQmlGuard<QObject> { public: inline QQmlVMEVariantQObjectPtr(); - inline ~QQmlVMEVariantQObjectPtr(); + inline ~QQmlVMEVariantQObjectPtr() override; inline void objectDestroyed(QObject *) override; inline void setGuardedValue(QObject *obj, QQmlVMEMetaObject *target, int index); @@ -95,7 +95,7 @@ class Q_QML_PRIVATE_EXPORT QQmlInterceptorMetaObject : public QAbstractDynamicMe { public: QQmlInterceptorMetaObject(QObject *obj, QQmlPropertyCache *cache); - ~QQmlInterceptorMetaObject(); + ~QQmlInterceptorMetaObject() override; void registerInterceptor(QQmlPropertyIndex index, QQmlPropertyValueInterceptor *interceptor); @@ -147,7 +147,7 @@ class Q_QML_PRIVATE_EXPORT QQmlVMEMetaObject : public QQmlInterceptorMetaObject { public: QQmlVMEMetaObject(QV4::ExecutionEngine *engine, QObject *obj, QQmlPropertyCache *cache, QV4::CompiledData::CompilationUnit *qmlCompilationUnit, int qmlObjectId); - ~QQmlVMEMetaObject(); + ~QQmlVMEMetaObject() override; bool aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const; QV4::ReturnedValue vmeMethod(int index) const; diff --git a/src/qml/util/qqmlpropertymap.h b/src/qml/util/qqmlpropertymap.h index 3930ac00a8..cb7ada3d79 100644 --- a/src/qml/util/qqmlpropertymap.h +++ b/src/qml/util/qqmlpropertymap.h @@ -56,7 +56,7 @@ class Q_QML_EXPORT QQmlPropertyMap : public QObject Q_OBJECT public: explicit QQmlPropertyMap(QObject *parent = nullptr); - virtual ~QQmlPropertyMap(); + ~QQmlPropertyMap() override; QVariant value(const QString &key) const; void insert(const QString &key, const QVariant &value); diff --git a/src/qmltest/quicktestevent_p.h b/src/qmltest/quicktestevent_p.h index d586ff638d..f33f339cdd 100644 --- a/src/qmltest/quicktestevent_p.h +++ b/src/qmltest/quicktestevent_p.h @@ -82,7 +82,7 @@ class Q_QUICK_TEST_EXPORT QuickTestEvent : public QObject Q_PROPERTY(int defaultMouseDelay READ defaultMouseDelay FINAL) public: QuickTestEvent(QObject *parent = nullptr); - ~QuickTestEvent(); + ~QuickTestEvent() override; int defaultMouseDelay() const; public Q_SLOTS: diff --git a/src/qmltest/quicktestresult_p.h b/src/qmltest/quicktestresult_p.h index 3973cf4072..6e7b72830e 100644 --- a/src/qmltest/quicktestresult_p.h +++ b/src/qmltest/quicktestresult_p.h @@ -78,7 +78,7 @@ class Q_QUICK_TEST_EXPORT QuickTestResult : public QObject Q_PROPERTY(QStringList functionsToRun READ functionsToRun) public: QuickTestResult(QObject *parent = nullptr); - ~QuickTestResult(); + ~QuickTestResult() override; // Values must match QBenchmarkIterationController::RunMode. enum RunMode diff --git a/src/quick/items/qquickanchors_p.h b/src/quick/items/qquickanchors_p.h index bf83867abb..931b963534 100644 --- a/src/quick/items/qquickanchors_p.h +++ b/src/quick/items/qquickanchors_p.h @@ -87,7 +87,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickAnchors : public QObject public: QQuickAnchors(QQuickItem *item, QObject *parent=nullptr); - virtual ~QQuickAnchors(); + ~QQuickAnchors() override; enum Anchor #if defined(Q_CC_CLANG) || !defined(Q_CC_GNU) // meaning: clang and msvc, but NOT gcc proper (because, you know, Q_CC_CLANG implies Q_CC_GNU) diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index e430832fe7..e06455124e 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -395,7 +395,7 @@ public: , m_pressedButtons(Qt::NoButton) {} - virtual ~QQuickPointerEvent(); + ~QQuickPointerEvent() override; public: // property accessors QQuickPointerDevice *device() const { return m_device; } @@ -631,7 +631,7 @@ private: , m_uniqueId(QPointingDeviceUniqueId::fromNumericId(uniqueId)) { } - ~QQuickPointerDevice() { } + ~QQuickPointerDevice() override { } private: DeviceType m_deviceType; diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h index e38c276b9f..f79965c8d3 100644 --- a/src/quick/items/qquickitem.h +++ b/src/quick/items/qquickitem.h @@ -60,7 +60,7 @@ class Q_QUICK_EXPORT QQuickTransform : public QObject Q_OBJECT public: explicit QQuickTransform(QObject *parent = nullptr); - ~QQuickTransform(); + ~QQuickTransform() override; void appendToItem(QQuickItem *); void prependToItem(QQuickItem *); @@ -198,7 +198,7 @@ public: Q_ENUM(TransformOrigin) explicit QQuickItem(QQuickItem *parent = nullptr); - virtual ~QQuickItem(); + ~QQuickItem() override; QQuickWindow *window() const; QQuickItem *parentItem() const; diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 1a3be437af..fd0d08b49c 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -93,7 +93,7 @@ class QQuickContents : public QQuickItemChangeListener { public: QQuickContents(QQuickItem *item); - ~QQuickContents(); + ~QQuickContents() override; QRectF rectF() const { return m_contents; } @@ -154,7 +154,7 @@ class QQuickItemLayer : public QObject, public QQuickItemChangeListener public: QQuickItemLayer(QQuickItem *item); - ~QQuickItemLayer(); + ~QQuickItemLayer() override; void classBegin(); void componentComplete(); @@ -255,7 +255,7 @@ public: static const QQuickItemPrivate* get(const QQuickItem *item) { return item->d_func(); } QQuickItemPrivate(); - ~QQuickItemPrivate(); + ~QQuickItemPrivate() override; void init(QQuickItem *parent); QQmlListProperty<QObject> data(); @@ -807,7 +807,7 @@ class QQuickKeysAttached : public QObject, public QQuickItemKeyFilter public: QQuickKeysAttached(QObject *parent=nullptr); - ~QQuickKeysAttached(); + ~QQuickKeysAttached() override; bool enabled() const { Q_D(const QQuickKeysAttached); return d->enabled; } void setEnabled(bool enabled) { diff --git a/src/quick/items/qquickopenglshadereffect_p.h b/src/quick/items/qquickopenglshadereffect_p.h index 3d1d8c426c..0c2adadc62 100644 --- a/src/quick/items/qquickopenglshadereffect_p.h +++ b/src/quick/items/qquickopenglshadereffect_p.h @@ -121,7 +121,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickOpenGLShaderEffect : public QObject public: QQuickOpenGLShaderEffect(QQuickShaderEffect *item, QObject *parent = nullptr); - ~QQuickOpenGLShaderEffect(); + ~QQuickOpenGLShaderEffect() override; QByteArray fragmentShader() const { return m_common.source.sourceCode[Key::FragmentShader]; } void setFragmentShader(const QByteArray &code); diff --git a/src/quick/items/qquickopenglshadereffectnode_p.h b/src/quick/items/qquickopenglshadereffectnode_p.h index 029533ac9d..7c75bb3126 100644 --- a/src/quick/items/qquickopenglshadereffectnode_p.h +++ b/src/quick/items/qquickopenglshadereffectnode_p.h @@ -149,7 +149,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickOpenGLShaderEffectNode : public QObject, publ Q_OBJECT public: QQuickOpenGLShaderEffectNode(); - virtual ~QQuickOpenGLShaderEffectNode(); + ~QQuickOpenGLShaderEffectNode() override; void preprocess() override; diff --git a/src/quick/items/qquickpainteditem.h b/src/quick/items/qquickpainteditem.h index 66a0ea83c9..b057f4295d 100644 --- a/src/quick/items/qquickpainteditem.h +++ b/src/quick/items/qquickpainteditem.h @@ -58,7 +58,7 @@ class Q_QUICK_EXPORT QQuickPaintedItem : public QQuickItem public: explicit QQuickPaintedItem(QQuickItem *parent = nullptr); - virtual ~QQuickPaintedItem(); + ~QQuickPaintedItem() override; enum RenderTarget { Image, diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h index 636f8c5db6..c07ad835fb 100644 --- a/src/quick/items/qquickrectangle_p.h +++ b/src/quick/items/qquickrectangle_p.h @@ -123,7 +123,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickGradient : public QObject public: QQuickGradient(QObject *parent=nullptr); - ~QQuickGradient(); + ~QQuickGradient() override; QQmlListProperty<QQuickGradientStop> stops(); diff --git a/src/quick/items/qquickrendercontrol.h b/src/quick/items/qquickrendercontrol.h index a626216f84..8ec9b8aafc 100644 --- a/src/quick/items/qquickrendercontrol.h +++ b/src/quick/items/qquickrendercontrol.h @@ -56,7 +56,7 @@ class Q_QUICK_EXPORT QQuickRenderControl : public QObject public: explicit QQuickRenderControl(QObject *parent = nullptr); - ~QQuickRenderControl(); + ~QQuickRenderControl() override; void prepareThread(QThread *targetThread); void initialize(QOpenGLContext *gl); diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h index f70550f284..d5bb33902a 100644 --- a/src/quick/items/qquickshadereffectsource_p.h +++ b/src/quick/items/qquickshadereffectsource_p.h @@ -114,7 +114,7 @@ public: Q_ENUM(TextureMirroring) QQuickShaderEffectSource(QQuickItem *parent = nullptr); - ~QQuickShaderEffectSource(); + ~QQuickShaderEffectSource() override; WrapMode wrapMode() const; void setWrapMode(WrapMode mode); diff --git a/src/quick/items/qquicksprite_p.h b/src/quick/items/qquicksprite_p.h index 19cbc416ca..8e119a80a9 100644 --- a/src/quick/items/qquicksprite_p.h +++ b/src/quick/items/qquicksprite_p.h @@ -89,7 +89,7 @@ class Q_QUICK_EXPORT QQuickSprite : public QQuickStochasticState public: explicit QQuickSprite(QObject *parent = nullptr); - ~QQuickSprite(); + ~QQuickSprite() override; QUrl source() const { diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h index d6d22b05d8..da917683b6 100644 --- a/src/quick/items/qquickspriteengine_p.h +++ b/src/quick/items/qquickspriteengine_p.h @@ -192,7 +192,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickStochasticEngine : public QObject public: explicit QQuickStochasticEngine(QObject *parent = nullptr); QQuickStochasticEngine(const QList<QQuickStochasticState*> &states, QObject *parent = nullptr); - ~QQuickStochasticEngine(); + ~QQuickStochasticEngine() override; QQmlListProperty<QQuickStochasticState> states() { @@ -269,7 +269,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickSpriteEngine : public QQuickStochasticEngine public: explicit QQuickSpriteEngine(QObject *parent = nullptr); QQuickSpriteEngine(const QList<QQuickSprite*> &sprites, QObject *parent = nullptr); - ~QQuickSpriteEngine(); + ~QQuickSpriteEngine() override; QQmlListProperty<QQuickSprite> sprites() { return QQmlListProperty<QQuickSprite>(this, m_sprites); diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h index 039ede2bad..15e989c13d 100644 --- a/src/quick/items/qquicktext_p.h +++ b/src/quick/items/qquicktext_p.h @@ -103,7 +103,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickText : public QQuickImplicitSizeItem public: QQuickText(QQuickItem *parent=nullptr); - ~QQuickText(); + ~QQuickText() override; enum HAlignment { AlignLeft = Qt::AlignLeft, AlignRight = Qt::AlignRight, diff --git a/src/quick/items/qquickview.h b/src/quick/items/qquickview.h index 006a691387..ecae25e90b 100644 --- a/src/quick/items/qquickview.h +++ b/src/quick/items/qquickview.h @@ -63,7 +63,7 @@ public: QQuickView(QQmlEngine* engine, QWindow *parent); explicit QQuickView(const QUrl &source, QWindow *parent = nullptr); QQuickView(const QUrl &source, QQuickRenderControl *renderControl); - virtual ~QQuickView(); + ~QQuickView() override; QUrl source() const; diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h index 53e0581fbb..817178fdac 100644 --- a/src/quick/items/qquickwindow.h +++ b/src/quick/items/qquickwindow.h @@ -110,7 +110,7 @@ public: explicit QQuickWindow(QWindow *parent = nullptr); explicit QQuickWindow(QQuickRenderControl *renderControl); - virtual ~QQuickWindow(); + ~QQuickWindow() override; QQuickItem *contentItem() const; diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index cd5ff31994..b5e3a2c1eb 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -114,7 +114,7 @@ public: static inline QQuickWindowPrivate *get(QQuickWindow *c) { return c->d_func(); } QQuickWindowPrivate(); - virtual ~QQuickWindowPrivate(); + ~QQuickWindowPrivate() override; void init(QQuickWindow *, QQuickRenderControl *control = nullptr); diff --git a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h index 304dc008d5..ab6fb4f317 100644 --- a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h +++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h @@ -62,7 +62,7 @@ public: }; Q_DECLARE_FLAGS(ClearMode, ClearModeBit) - virtual ~QSGAbstractRenderer(); + ~QSGAbstractRenderer() override; void setRootNode(QSGRootNode *node); QSGRootNode *rootNode() const; diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h index 528f100f8e..854e284c9e 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.h +++ b/src/quick/scenegraph/coreapi/qsgnode.h @@ -190,7 +190,7 @@ void Q_QUICK_EXPORT qsgnode_set_description(QSGNode *node, const QString &descri class Q_QUICK_EXPORT QSGBasicGeometryNode : public QSGNode { public: - ~QSGBasicGeometryNode(); + ~QSGBasicGeometryNode() override; void setGeometry(QSGGeometry *geometry); const QSGGeometry *geometry() const { return m_geometry; } @@ -224,7 +224,7 @@ class Q_QUICK_EXPORT QSGGeometryNode : public QSGBasicGeometryNode { public: QSGGeometryNode(); - ~QSGGeometryNode(); + ~QSGGeometryNode() override; void setMaterial(QSGMaterial *material); QSGMaterial *material() const { return m_material; } @@ -257,7 +257,7 @@ class Q_QUICK_EXPORT QSGClipNode : public QSGBasicGeometryNode { public: QSGClipNode(); - ~QSGClipNode(); + ~QSGClipNode() override; void setIsRectangular(bool rectHint); bool isRectangular() const { return m_is_rectangular; } @@ -277,7 +277,7 @@ class Q_QUICK_EXPORT QSGTransformNode : public QSGNode { public: QSGTransformNode(); - ~QSGTransformNode(); + ~QSGTransformNode() override; void setMatrix(const QMatrix4x4 &matrix); const QMatrix4x4 &matrix() const { return m_matrix; } @@ -295,7 +295,7 @@ class Q_QUICK_EXPORT QSGRootNode : public QSGNode { public: QSGRootNode(); - ~QSGRootNode(); + ~QSGRootNode() override; private: void notifyNodeChange(QSGNode *node, DirtyState state); @@ -312,7 +312,7 @@ class Q_QUICK_EXPORT QSGOpacityNode : public QSGNode { public: QSGOpacityNode(); - ~QSGOpacityNode(); + ~QSGOpacityNode() override; void setOpacity(qreal opacity); qreal opacity() const { return m_opacity; } diff --git a/src/quick/scenegraph/coreapi/qsgrendernode.h b/src/quick/scenegraph/coreapi/qsgrendernode.h index f6bc40d3ee..0fb83b080c 100644 --- a/src/quick/scenegraph/coreapi/qsgrendernode.h +++ b/src/quick/scenegraph/coreapi/qsgrendernode.h @@ -80,7 +80,7 @@ public: }; QSGRenderNode(); - ~QSGRenderNode(); + ~QSGRenderNode() override; virtual StateFlags changedStates() const; virtual void render(const RenderState *state) = 0; diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h index 00c23be60c..6d70d7ef6b 100644 --- a/src/quick/scenegraph/qsgcontext_p.h +++ b/src/quick/scenegraph/qsgcontext_p.h @@ -111,7 +111,7 @@ public: }; explicit QSGContext(QObject *parent = nullptr); - virtual ~QSGContext(); + ~QSGContext() override; virtual void renderContextInitialized(QSGRenderContext *renderContext); virtual void renderContextInvalidated(QSGRenderContext *renderContext); @@ -159,7 +159,7 @@ public: }; QSGRenderContext(QSGContext *context); - virtual ~QSGRenderContext(); + ~QSGRenderContext() override; QSGContext *sceneGraphContext() const { return m_sg; } virtual bool isValid() const { return true; } diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h index 514e6e8c2b..e9e01dc710 100644 --- a/src/quick/scenegraph/util/qsgengine.h +++ b/src/quick/scenegraph/util/qsgengine.h @@ -68,7 +68,7 @@ public: Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption) explicit QSGEngine(QObject *parent = nullptr); - ~QSGEngine(); + ~QSGEngine() override; void initialize(QOpenGLContext *context); void invalidate(); diff --git a/src/quick/scenegraph/util/qsgimagenode.h b/src/quick/scenegraph/util/qsgimagenode.h index 0e053c307f..526f52b7e5 100644 --- a/src/quick/scenegraph/util/qsgimagenode.h +++ b/src/quick/scenegraph/util/qsgimagenode.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE class Q_QUICK_EXPORT QSGImageNode : public QSGGeometryNode { public: - virtual ~QSGImageNode() { } + ~QSGImageNode() override { } virtual void setRect(const QRectF &rect) = 0; inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); } diff --git a/src/quick/scenegraph/util/qsgninepatchnode.h b/src/quick/scenegraph/util/qsgninepatchnode.h index 8509cbd326..e76afd3c4a 100644 --- a/src/quick/scenegraph/util/qsgninepatchnode.h +++ b/src/quick/scenegraph/util/qsgninepatchnode.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE class Q_QUICK_EXPORT QSGNinePatchNode : public QSGGeometryNode { public: - virtual ~QSGNinePatchNode() { } + ~QSGNinePatchNode() override { } virtual void setTexture(QSGTexture *texture) = 0; virtual void setBounds(const QRectF &bounds) = 0; diff --git a/src/quick/scenegraph/util/qsgrectanglenode.h b/src/quick/scenegraph/util/qsgrectanglenode.h index 8e0da1d9c7..ba52b65b07 100644 --- a/src/quick/scenegraph/util/qsgrectanglenode.h +++ b/src/quick/scenegraph/util/qsgrectanglenode.h @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE class Q_QUICK_EXPORT QSGRectangleNode : public QSGGeometryNode { public: - virtual ~QSGRectangleNode() { } + ~QSGRectangleNode() override { } virtual void setRect(const QRectF &rect) = 0; inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); } diff --git a/src/quick/scenegraph/util/qsgsimplematerial.h b/src/quick/scenegraph/util/qsgsimplematerial.h index dcf9b89b21..79180ca8e2 100644 --- a/src/quick/scenegraph/util/qsgsimplematerial.h +++ b/src/quick/scenegraph/util/qsgsimplematerial.h @@ -185,7 +185,7 @@ public: QSGSimpleMaterialComparableMaterial(PtrShaderCreateFunc func) : QSGSimpleMaterial<State>(func) {} - int compare(const QSGMaterial *other) const { + int compare(const QSGMaterial *other) const override { return QSGSimpleMaterialComparableMaterial<State>::state()->compare(static_cast<const QSGSimpleMaterialComparableMaterial<State> *>(other)->state()); } }; diff --git a/src/quick/scenegraph/util/qsgsimpletexturenode.h b/src/quick/scenegraph/util/qsgsimpletexturenode.h index 09e4277c66..010463d3c6 100644 --- a/src/quick/scenegraph/util/qsgsimpletexturenode.h +++ b/src/quick/scenegraph/util/qsgsimpletexturenode.h @@ -52,7 +52,7 @@ class Q_QUICK_EXPORT QSGSimpleTextureNode : public QSGGeometryNode { public: QSGSimpleTextureNode(); - ~QSGSimpleTextureNode(); + ~QSGSimpleTextureNode() override; void setRect(const QRectF &rect); inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); } diff --git a/src/quick/scenegraph/util/qsgtexture.h b/src/quick/scenegraph/util/qsgtexture.h index 032129434e..7bd57a16e3 100644 --- a/src/quick/scenegraph/util/qsgtexture.h +++ b/src/quick/scenegraph/util/qsgtexture.h @@ -54,7 +54,7 @@ class Q_QUICK_EXPORT QSGTexture : public QObject public: QSGTexture(); - ~QSGTexture(); + ~QSGTexture() override; enum WrapMode { Repeat, diff --git a/src/quick/scenegraph/util/qsgtexture_p.h b/src/quick/scenegraph/util/qsgtexture_p.h index 52dc6db2d0..18dd5eff68 100644 --- a/src/quick/scenegraph/util/qsgtexture_p.h +++ b/src/quick/scenegraph/util/qsgtexture_p.h @@ -83,7 +83,7 @@ class Q_QUICK_PRIVATE_EXPORT QSGPlainTexture : public QSGTexture Q_OBJECT public: QSGPlainTexture(); - virtual ~QSGPlainTexture(); + ~QSGPlainTexture() override; void setOwnsTexture(bool owns) { m_owns_texture = owns; } bool ownsTexture() const { return m_owns_texture; } diff --git a/src/quick/util/qquickanimation_p.h b/src/quick/util/qquickanimation_p.h index d1f460fef7..2293f2597f 100644 --- a/src/quick/util/qquickanimation_p.h +++ b/src/quick/util/qquickanimation_p.h @@ -88,7 +88,7 @@ public: }; QQuickAbstractAnimation(QObject *parent=nullptr); - virtual ~QQuickAbstractAnimation(); + ~QQuickAbstractAnimation() override; enum Loops { Infinite = -2 }; Q_ENUM(Loops) @@ -167,7 +167,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPauseAnimation : public QQuickAbstractAnimati public: QQuickPauseAnimation(QObject *parent=nullptr); - virtual ~QQuickPauseAnimation(); + ~QQuickPauseAnimation() override; int duration() const; void setDuration(int); @@ -193,7 +193,7 @@ class QQuickScriptAction : public QQuickAbstractAnimation public: QQuickScriptAction(QObject *parent=nullptr); - virtual ~QQuickScriptAction(); + ~QQuickScriptAction() override; QQmlScriptString script() const; void setScript(const QQmlScriptString &); @@ -223,7 +223,7 @@ class QQuickPropertyAction : public QQuickAbstractAnimation public: QQuickPropertyAction(QObject *parent=nullptr); - virtual ~QQuickPropertyAction(); + ~QQuickPropertyAction() override; QObject *target() const; void setTargetObject(QObject *); @@ -271,7 +271,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPropertyAnimation : public QQuickAbstractAnim public: QQuickPropertyAnimation(QObject *parent=nullptr); - virtual ~QQuickPropertyAnimation(); + ~QQuickPropertyAnimation() override; virtual int duration() const; virtual void setDuration(int); @@ -326,7 +326,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickColorAnimation : public QQuickPropertyAnimati public: QQuickColorAnimation(QObject *parent=nullptr); - virtual ~QQuickColorAnimation(); + ~QQuickColorAnimation() override; QColor from() const; void setFrom(const QColor &); @@ -345,7 +345,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickNumberAnimation : public QQuickPropertyAnimat public: QQuickNumberAnimation(QObject *parent=nullptr); - virtual ~QQuickNumberAnimation(); + ~QQuickNumberAnimation() override; qreal from() const; void setFrom(qreal); @@ -370,7 +370,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickVector3dAnimation : public QQuickPropertyAnim public: QQuickVector3dAnimation(QObject *parent=nullptr); - virtual ~QQuickVector3dAnimation(); + ~QQuickVector3dAnimation() override; QVector3D from() const; void setFrom(QVector3D); @@ -391,7 +391,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickRotationAnimation : public QQuickPropertyAnim public: QQuickRotationAnimation(QObject *parent=nullptr); - virtual ~QQuickRotationAnimation(); + ~QQuickRotationAnimation() override; qreal from() const; void setFrom(qreal); @@ -419,7 +419,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickAnimationGroup : public QQuickAbstractAnimati public: QQuickAnimationGroup(QObject *parent); - virtual ~QQuickAnimationGroup(); + ~QQuickAnimationGroup() override; QQmlListProperty<QQuickAbstractAnimation> animations(); friend class QQuickAbstractAnimation; @@ -435,7 +435,7 @@ class QQuickSequentialAnimation : public QQuickAnimationGroup public: QQuickSequentialAnimation(QObject *parent=nullptr); - virtual ~QQuickSequentialAnimation(); + ~QQuickSequentialAnimation() override; protected: ThreadingModel threadingModel() const override; @@ -452,7 +452,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickParallelAnimation : public QQuickAnimationGro public: QQuickParallelAnimation(QObject *parent=nullptr); - virtual ~QQuickParallelAnimation(); + ~QQuickParallelAnimation() override; protected: ThreadingModel threadingModel() const override; diff --git a/src/quick/util/qquickanimation_p_p.h b/src/quick/util/qquickanimation_p_p.h index 304258cde1..c20ec65c24 100644 --- a/src/quick/util/qquickanimation_p_p.h +++ b/src/quick/util/qquickanimation_p_p.h @@ -102,7 +102,7 @@ public: QActionAnimation(); QActionAnimation(QAbstractAnimationAction *action); - ~QActionAnimation(); + ~QActionAnimation() override; int duration() const override; void setAnimAction(QAbstractAnimationAction *action); @@ -130,7 +130,7 @@ class Q_AUTOTEST_EXPORT QQuickBulkValueAnimator : public QAbstractAnimationJob Q_DISABLE_COPY(QQuickBulkValueAnimator) public: QQuickBulkValueAnimator(); - ~QQuickBulkValueAnimator(); + ~QQuickBulkValueAnimator() override; void setAnimValue(QQuickBulkValueUpdater *value); QQuickBulkValueUpdater *getAnimValue() const { return animValue; } @@ -307,7 +307,7 @@ class Q_AUTOTEST_EXPORT QQuickAnimationPropertyUpdater : public QQuickBulkValueU { public: QQuickAnimationPropertyUpdater() : interpolatorType(0), interpolator(nullptr), prevInterpolatorType(0), reverse(false), fromSourced(false), fromDefined(false), wasDeleted(nullptr) {} - ~QQuickAnimationPropertyUpdater(); + ~QQuickAnimationPropertyUpdater() override; void setValue(qreal v) override; diff --git a/src/quick/util/qquickimageprovider.h b/src/quick/util/qquickimageprovider.h index 4451105782..4f8193789a 100644 --- a/src/quick/util/qquickimageprovider.h +++ b/src/quick/util/qquickimageprovider.h @@ -59,7 +59,7 @@ class Q_QUICK_EXPORT QQuickTextureFactory : public QObject Q_OBJECT public: QQuickTextureFactory(); - virtual ~QQuickTextureFactory(); + ~QQuickTextureFactory() override; virtual QSGTexture *createTexture(QQuickWindow *window) const = 0; virtual QSize textureSize() const = 0; @@ -74,7 +74,7 @@ class Q_QUICK_EXPORT QQuickImageResponse : public QObject Q_OBJECT public: QQuickImageResponse(); - virtual ~QQuickImageResponse(); + ~QQuickImageResponse() override; virtual QQuickTextureFactory *textureFactory() const = 0; virtual QString errorString() const; @@ -91,7 +91,7 @@ class Q_QUICK_EXPORT QQuickImageProvider : public QQmlImageProviderBase friend class QQuickImageProviderWithOptions; // ### Qt 6 Remove public: QQuickImageProvider(ImageType type, Flags flags = Flags()); - virtual ~QQuickImageProvider(); + ~QQuickImageProvider() override; ImageType imageType() const override; Flags flags() const override; @@ -114,7 +114,7 @@ class Q_QUICK_EXPORT QQuickAsyncImageProvider : public QQuickImageProvider { public: QQuickAsyncImageProvider(); - virtual ~QQuickAsyncImageProvider(); + ~QQuickAsyncImageProvider() override; #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options) = 0; diff --git a/src/quick/util/qquickpath_p.h b/src/quick/util/qquickpath_p.h index f8b67ef945..6b9a40fe6d 100644 --- a/src/quick/util/qquickpath_p.h +++ b/src/quick/util/qquickpath_p.h @@ -449,7 +449,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPath : public QObject, public QQmlParserStatu Q_INTERFACES(QQmlParserStatus) public: QQuickPath(QObject *parent=nullptr); - ~QQuickPath(); + ~QQuickPath() override; QQmlListProperty<QQuickPathElement> pathElements(); diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h index 38027a6abf..d699ddf371 100644 --- a/src/quick/util/qquickprofiler_p.h +++ b/src/quick/util/qquickprofiler_p.h @@ -333,7 +333,7 @@ public: static void initialize(QObject *parent); - virtual ~QQuickProfiler(); + ~QQuickProfiler() override; signals: void dataReady(const QVector<QQuickProfilerData> &data); diff --git a/src/quick/util/qquickstate_p.h b/src/quick/util/qquickstate_p.h index 89af5882df..79874ee78e 100644 --- a/src/quick/util/qquickstate_p.h +++ b/src/quick/util/qquickstate_p.h @@ -160,7 +160,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickState : public QObject public: QQuickState(QObject *parent=nullptr); - virtual ~QQuickState(); + ~QQuickState() override; QString name() const; void setName(const QString &); diff --git a/src/quickwidgets/qquickwidget.h b/src/quickwidgets/qquickwidget.h index 8c9382e84b..3ddb0613ad 100644 --- a/src/quickwidgets/qquickwidget.h +++ b/src/quickwidgets/qquickwidget.h @@ -66,7 +66,7 @@ public: explicit QQuickWidget(QWidget *parent = nullptr); QQuickWidget(QQmlEngine* engine, QWidget *parent); explicit QQuickWidget(const QUrl &source, QWidget *parent = nullptr); - virtual ~QQuickWidget(); + ~QQuickWidget() override; QUrl source() const; |