From e17c89f4ce74e5699ed50dc2187a39d8990316c4 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 26 Feb 2018 17:34:27 +0100 Subject: use the override keyword consistently and correctly (clang-tidy) Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing --- src/imports/localstorage/plugin.cpp | 4 +- src/imports/qtquick2/plugin.cpp | 2 +- src/imports/testlib/main.cpp | 2 +- src/particles/qquickv4particledata.cpp | 2 +- .../qmldbg_local/qlocalclientconnection.cpp | 2 +- .../qmltooling/qmldbg_tcp/qtcpserverconnection.cpp | 2 +- src/qml/animations/qanimationgroupjob_p.h | 2 +- src/qml/animations/qpauseanimationjob_p.h | 2 +- src/qml/compiler/qv4codegen.cpp | 14 +- src/qml/debugger/qqmlabstractprofileradapter_p.h | 2 +- src/qml/debugger/qqmldebugconnector_p.h | 2 +- src/qml/debugger/qqmldebugservice_p.h | 2 +- src/qml/jit/qv4jit_p.h | 232 ++++++++++----------- src/qml/jsapi/qjsengine.h | 2 +- src/qml/jsapi/qjsengine_p.h | 2 +- src/qml/jsruntime/qv4debugging_p.h | 2 +- src/qml/qml/qqmlapplicationengine.h | 2 +- src/qml/qml/qqmlbinding_p.h | 2 +- src/qml/qml/qqmlboundsignal_p.h | 2 +- src/qml/qml/qqmlcomponent.h | 2 +- src/qml/qml/qqmlcontext.h | 2 +- src/qml/qml/qqmldelayedcallqueue_p.h | 2 +- src/qml/qml/qqmlengine.h | 2 +- src/qml/qml/qqmlengine_p.h | 4 +- src/qml/qml/qqmlexpression.h | 2 +- src/qml/qml/qqmlexpression_p.h | 2 +- src/qml/qml/qqmlextensioninterface.h | 2 +- src/qml/qml/qqmlextensionplugin.h | 2 +- src/qml/qml/qqmlfileselector.h | 2 +- src/qml/qml/qqmlopenmetaobject_p.h | 4 +- src/qml/qml/qqmlprivate.h | 2 +- src/qml/qml/qqmlpropertycache_p.h | 2 +- src/qml/qml/qqmltypeloader_p.h | 10 +- src/qml/qml/qqmltypenamecache_p.h | 2 +- src/qml/qml/qqmlvaluetype_p.h | 2 +- src/qml/qml/qqmlvmemetaobject_p.h | 6 +- src/qml/util/qqmlpropertymap.h | 2 +- src/qmltest/quicktestevent_p.h | 2 +- src/qmltest/quicktestresult_p.h | 2 +- src/quick/items/qquickanchors_p.h | 2 +- src/quick/items/qquickevents_p_p.h | 4 +- src/quick/items/qquickitem.h | 4 +- src/quick/items/qquickitem_p.h | 8 +- src/quick/items/qquickopenglshadereffect_p.h | 2 +- src/quick/items/qquickopenglshadereffectnode_p.h | 2 +- src/quick/items/qquickpainteditem.h | 2 +- src/quick/items/qquickrectangle_p.h | 2 +- src/quick/items/qquickrendercontrol.h | 2 +- src/quick/items/qquickshadereffectsource_p.h | 2 +- src/quick/items/qquicksprite_p.h | 2 +- src/quick/items/qquickspriteengine_p.h | 4 +- src/quick/items/qquicktext_p.h | 2 +- src/quick/items/qquickview.h | 2 +- src/quick/items/qquickwindow.h | 2 +- src/quick/items/qquickwindow_p.h | 2 +- src/quick/scenegraph/coreapi/qsgabstractrenderer.h | 2 +- src/quick/scenegraph/coreapi/qsgnode.h | 12 +- src/quick/scenegraph/coreapi/qsgrendernode.h | 2 +- src/quick/scenegraph/qsgcontext_p.h | 4 +- src/quick/scenegraph/util/qsgengine.h | 2 +- src/quick/scenegraph/util/qsgimagenode.h | 2 +- src/quick/scenegraph/util/qsgninepatchnode.h | 2 +- src/quick/scenegraph/util/qsgrectanglenode.h | 2 +- src/quick/scenegraph/util/qsgsimplematerial.h | 2 +- src/quick/scenegraph/util/qsgsimpletexturenode.h | 2 +- src/quick/scenegraph/util/qsgtexture.h | 2 +- src/quick/scenegraph/util/qsgtexture_p.h | 2 +- src/quick/util/qquickanimation_p.h | 24 +-- src/quick/util/qquickanimation_p_p.h | 6 +- src/quick/util/qquickimageprovider.h | 8 +- src/quick/util/qquickpath_p.h | 2 +- src/quick/util/qquickprofiler_p.h | 2 +- src/quick/util/qquickstate_p.h | 2 +- src/quickwidgets/qquickwidget.h | 2 +- 74 files changed, 232 insertions(+), 232 deletions(-) (limited to 'src') 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 &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 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 &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 &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 { 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 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 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 &states, QObject *parent = nullptr); - ~QQuickStochasticEngine(); + ~QQuickStochasticEngine() override; QQmlListProperty states() { @@ -269,7 +269,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickSpriteEngine : public QQuickStochasticEngine public: explicit QQuickSpriteEngine(QObject *parent = nullptr); QQuickSpriteEngine(const QList &sprites, QObject *parent = nullptr); - ~QQuickSpriteEngine(); + ~QQuickSpriteEngine() override; QQmlListProperty sprites() { return QQmlListProperty(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(func) {} - int compare(const QSGMaterial *other) const { + int compare(const QSGMaterial *other) const override { return QSGSimpleMaterialComparableMaterial::state()->compare(static_cast *>(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 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 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 &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; -- cgit v1.2.3 From 4c957192ac7edae80b468765ed68ab8dccd8d3ab Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Mon, 26 Feb 2018 13:13:08 +0100 Subject: Fix memory leak in compressed texture file reading The format handler object would never be deleted. Change-Id: I44e0740f8ab0404ebb2951865bfedc5a4c8227f3 Reviewed-by: Michael Brasser --- src/quick/scenegraph/compressedtexture/qsgtexturefilehandler_p.h | 1 + src/quick/scenegraph/util/qsgtexturereader.cpp | 5 +++++ src/quick/scenegraph/util/qsgtexturereader_p.h | 1 + 3 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/quick/scenegraph/compressedtexture/qsgtexturefilehandler_p.h b/src/quick/scenegraph/compressedtexture/qsgtexturefilehandler_p.h index 43358b2846..8b831aebb9 100644 --- a/src/quick/scenegraph/compressedtexture/qsgtexturefilehandler_p.h +++ b/src/quick/scenegraph/compressedtexture/qsgtexturefilehandler_p.h @@ -67,6 +67,7 @@ public: { m_logName = !logName.isEmpty() ? logName : QByteArrayLiteral("(unknown)"); } + virtual ~QSGTextureFileHandler() {} virtual QQuickTextureFactory *read() = 0; QIODevice *device() const { return m_device; } diff --git a/src/quick/scenegraph/util/qsgtexturereader.cpp b/src/quick/scenegraph/util/qsgtexturereader.cpp index eb0caa59e4..8af2c8e7cd 100644 --- a/src/quick/scenegraph/util/qsgtexturereader.cpp +++ b/src/quick/scenegraph/util/qsgtexturereader.cpp @@ -55,6 +55,11 @@ QSGTextureReader::QSGTextureReader(QIODevice *device, const QString &fileName) { } +QSGTextureReader::~QSGTextureReader() +{ + delete m_handler; +} + QQuickTextureFactory *QSGTextureReader::read() { #if QT_CONFIG(opengl) diff --git a/src/quick/scenegraph/util/qsgtexturereader_p.h b/src/quick/scenegraph/util/qsgtexturereader_p.h index 1d874f840c..19e33bf5c3 100644 --- a/src/quick/scenegraph/util/qsgtexturereader_p.h +++ b/src/quick/scenegraph/util/qsgtexturereader_p.h @@ -64,6 +64,7 @@ class QSGTextureReader { public: QSGTextureReader(QIODevice *device, const QString &fileName = QString()); + ~QSGTextureReader(); QQuickTextureFactory *read(); bool isTexture(); -- cgit v1.2.3 From f010b360c3b9929550ee1768c0eddd2a85345da6 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 23 Feb 2018 12:29:44 +0100 Subject: Do not write JSC files when debugging These will include Debug interpreter instructions, which wreck havoc when no debugger is attached. Task-number: QTBUG-66593 Change-Id: I0692207e51df6d52d0616f37a06ade76b6b2d54a Reviewed-by: Simon Hausmann --- src/qml/qml/qqmltypeloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index ed1526c0a9..a107bb42ce 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -3015,7 +3015,7 @@ void QQmlScriptBlob::dataReceived(const SourceCodeData &data) // The js unit owns the data and will free the qml unit. unit->data = unitData; - if (!disableDiskCache() || forceDiskCache()) { + if ((!disableDiskCache() || forceDiskCache()) && !isDebugging()) { QString errorString; if (!unit->saveToDisk(url(), &errorString)) { qCDebug(DBG_DISK_CACHE()) << "Error saving cached version of" << unit->fileName() << "to disk:" << errorString; -- cgit v1.2.3 From 6fa746fa61e35dc26e5286250ddc9488546f5b66 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 26 Feb 2018 08:02:39 +0100 Subject: rename containsMask to containmentMask It was pointed out that containsMask sounds like it ought to be a boolean property. Change-Id: I2b56823b60d64f9903b0d5108c6428e691c09ed0 Reviewed-by: Simon Hausmann Reviewed-by: Paolo Angelelli --- src/quick/items/qquickitem.cpp | 12 ++++++------ src/quick/items/qquickitem.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 3a88c49e8d..11be8633f0 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -7616,7 +7616,7 @@ bool QQuickItem::contains(const QPointF &point) const } /*! - \qmlproperty QObject * QtQuick::Item::containsMask + \qmlproperty QObject * QtQuick::Item::containmentMask \since 5.11 This property holds an optional mask for the Item to be used in the QtQuick::Item::contains method. @@ -7624,19 +7624,19 @@ bool QQuickItem::contains(const QPointF &point) const an input event has landed into the item or not. By default the \l contains method will return true for any point - within the Item's bounding box. \c containsMask allows for a + within the Item's bounding box. \c containmentMask allows for a more fine-grained control. For example, the developer could - define and use an AnotherItem element as containsMask, + define and use an AnotherItem element as containmentMask, which has a specialized contains method, like: \code - Item { id: item; containsMask: AnotherItem { id: anotherItem } } + Item { id: item; containmentMask: AnotherItem { id: anotherItem } } \endcode \e{item}'s contains method would then return true only if \e{anotherItem}'s contains implementation returns true. */ -QObject *QQuickItem::containsMask() const +QObject *QQuickItem::containmentMask() const { Q_D(const QQuickItem); return d->mask.data(); @@ -7669,7 +7669,7 @@ void QQuickItem::setContainsMask(QObject *mask) QQuickItemPrivate *maskPrivate = QQuickItemPrivate::get(quickMask); maskPrivate->registerAsContainsMask(this, true); // telling maskPrivate that "this" is using it as mask } - emit containsMaskChanged(); + emit containmentMaskChanged(); } /*! diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h index f79965c8d3..85dddd30e3 100644 --- a/src/quick/items/qquickitem.h +++ b/src/quick/items/qquickitem.h @@ -144,7 +144,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus Q_PROPERTY(bool antialiasing READ antialiasing WRITE setAntialiasing NOTIFY antialiasingChanged RESET resetAntialiasing) Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged) Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged) - Q_PROPERTY(QObject *containsMask READ containsMask WRITE setContainsMask NOTIFY containsMaskChanged REVISION 11) + Q_PROPERTY(QObject *containmentMask READ containmentMask WRITE setContainsMask NOTIFY containmentMaskChanged REVISION 11) Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQuickItemLayer *layer READ layer DESIGNABLE false CONSTANT FINAL) @@ -321,7 +321,7 @@ public: QSharedPointer grabToImage(const QSize &targetSize = QSize()); Q_INVOKABLE virtual bool contains(const QPointF &point) const; - QObject *containsMask() const; + QObject *containmentMask() const; void setContainsMask(QObject *mask); QTransform itemTransform(QQuickItem *, bool *) const; @@ -393,7 +393,7 @@ Q_SIGNALS: void zChanged(); void implicitWidthChanged(); void implicitHeightChanged(); - Q_REVISION(11) void containsMaskChanged(); + Q_REVISION(11) void containmentMaskChanged(); protected: bool event(QEvent *) override; -- cgit v1.2.3 From 7257be1c6da4c75bbfb27c42cae6d106db829ef3 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 27 Feb 2018 10:06:24 +0100 Subject: doc: Fix several Can't link to errors This update corrects several "Can't link to..." errors and splits a \qmlpropertygroup into two separate \qmlpropertygroups. Change-Id: Ic9b89a11eef64069154a932dd9dedf18279506a2 Reviewed-by: Shawn Rutledge --- src/quick/handlers/qquickdraghandler.cpp | 50 +++++++++++++++++++------------- src/quick/handlers/qquicktaphandler.cpp | 25 ++++++++++++---- 2 files changed, 49 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp index a4c3d3dfb1..60b57206d3 100644 --- a/src/quick/handlers/qquickdraghandler.cpp +++ b/src/quick/handlers/qquickdraghandler.cpp @@ -53,20 +53,20 @@ QT_BEGIN_NAMESPACE DragHandler is a handler that is used to interactively move an Item. Like other Pointer Handlers, by default it is fully functional, and - manipulates its \l target. + manipulates its \l {PointerHandler::target} {target}. \snippet pointerHandlers/dragHandler.qml 0 It has properties to restrict the range of dragging. If it is declared within one Item but is assigned a different - \l {PointerHandler::target}, then it handles events within the - bounds of the \l {PointerHandler::parent} Item but + \l {PointerHandler::target} {target}, then it handles events within the + bounds of the \l {PointerHandler::parent} {parent} Item but manipulates the \c target Item instead: \snippet pointerHandlers/dragHandlerDifferentTarget.qml 0 - A third way to use it is to set \l {PointerHandler::target} to + A third way to use it is to set \l {PointerHandler::target} {target} to \c null and react to property changes in some other way: \snippet pointerHandlers/dragHandlerNullTarget.qml 0 @@ -214,23 +214,33 @@ void QQuickDragHandler::setTranslation(const QVector2D &trans) /*! \qmlpropertygroup QtQuick::DragHandler::xAxis + \qmlproperty real QtQuick::DragHandler::xAxis.minimum + \qmlproperty real QtQuick::DragHandler::xAxis.maximum + \qmlproperty bool QtQuick::DragHandler::xAxis.enabled + + \c xAxis controls the constraints for horizontal dragging. + + \c minimum is the minimum acceptable value of \l {Item::x}{x} to be + applied to the \l {PointerHandler::target} {target}. + \c maximum is the maximum acceptable value of \l {Item::x}{x} to be + applied to the \l {PointerHandler::target} {target}. + If \c enabled is true, horizontal dragging is allowed. + */ + +/*! \qmlpropertygroup QtQuick::DragHandler::yAxis - \qmlproperty real QtQuick::DragHandler::DragAxis::minimum - \qmlproperty real QtQuick::DragHandler::DragAxis::maximum - \qmlproperty real QtQuick::DragHandler::DragAxis::enabled - - \c xAxis and yAxis control the constraints for horizontal and vertical - dragging, respectively. - - \value minimum - The minimum acceptable value of \l {Item::x}{x} or \l {Item::y}{y} - to be applied to the \l target - \value maximum - The maximum acceptable value of \l {Item::x}{x} or \l {Item::y}{y} - to be applied to the \l target - \value enabled - Whether dragging in this direction is allowed at all -*/ + \qmlproperty real QtQuick::DragHandler::yAxis.minimum + \qmlproperty real QtQuick::DragHandler::yAxis.maximum + \qmlproperty bool QtQuick::DragHandler::yAxis.enabled + + \c yAxis controls the constraints for vertical dragging. + + \c minimum is the minimum acceptable value of \l {Item::y}{y} to be + applied to the \l {PointerHandler::target} {target}. + \c maximum is the maximum acceptable value of \l {Item::y}{y} to be + applied to the \l {PointerHandler::target} {target}. + If \c enabled is true, vertical dragging is allowed. + */ QQuickDragAxis::QQuickDragAxis() : m_minimum(-DBL_MAX) , m_maximum(DBL_MAX) diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index a1b4f961ed..1bfcdc2454 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -171,7 +171,7 @@ void QQuickTapHandler::handleEventPoint(QQuickEventPoint *point) } /*! - \qmlproperty real TapHandler::longPressThreshold + \qmlproperty real QtQuick::TapHandler::longPressThreshold The time in seconds that an event point must be pressed in order to trigger a long press gesture and emit the \l longPressed() signal. @@ -209,13 +209,26 @@ void QQuickTapHandler::timerEvent(QTimerEvent *event) } /*! - \qmlproperty enumeration TapHandler::gesturePolicy + \qmlsignal QtQuick::TapHandler::tapped() + + This signal is emitted when the pointer device taps the item. + */ + +/*! + \qmlsignal QtQuick::TapHandler::longPressed() + + This signal is emitted when a press occurs that is longer than the + \l {TapHandler::longPressThreshold} {long press threshold}. + */ + +/*! + \qmlproperty enumeration QtQuick::TapHandler::gesturePolicy The spatial constraint for a tap or long press gesture to be recognized, in addition to the constraint that the release must occur before \l longPressThreshold has elapsed. If these constraints are not satisfied, the \l tapped signal is not emitted, and \l tapCount is not incremented. - If the spatial constraint is violated, \l isPressed transitions immediately + If the spatial constraint is violated, \l pressed transitions immediately from true to false, regardless of the time held. \value TapHandler.DragThreshold @@ -253,7 +266,7 @@ void QQuickTapHandler::setGesturePolicy(QQuickTapHandler::GesturePolicy gestureP } /*! - \qmlproperty bool TapHandler::pressed + \qmlproperty bool QtQuick::TapHandler::pressed \readonly Holds true whenever the mouse or touch point is pressed, @@ -334,7 +347,7 @@ void QQuickTapHandler::updateTimeHeld() } /*! - \qmlproperty int TapHandler::tapCount + \qmlproperty int QtQuick::TapHandler::tapCount \readonly The number of taps which have occurred within the time and space @@ -354,7 +367,7 @@ void QQuickTapHandler::updateTimeHeld() */ /*! - \qmlproperty real TapHandler::timeHeld + \qmlproperty real QtQuick::TapHandler::timeHeld \readonly The amount of time in seconds that a pressed point has been held, without -- cgit v1.2.3 From b37d2701f93028df6579b2e8ad550818cf7093f6 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 27 Feb 2018 13:05:51 +0100 Subject: doc: Remove duplicate qdoc comment \qmlmodule Qt.labs.handlers 1.0 appeared twice. This one is being removed because it was older and less complete than the other one, which can be seen in qtquickhandlers.qdoc. Change-Id: Id4866eec8c61a2f30920edb661edb1e6bd3fddb5 Reviewed-by: Shawn Rutledge --- src/imports/handlers/plugin.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src') diff --git a/src/imports/handlers/plugin.cpp b/src/imports/handlers/plugin.cpp index 026814541e..d1041d6539 100644 --- a/src/imports/handlers/plugin.cpp +++ b/src/imports/handlers/plugin.cpp @@ -50,23 +50,6 @@ static void initResources() QT_BEGIN_NAMESPACE -/*! - \qmlmodule Qt.labs.handlers 1.0 - \title Qt Quick Pointer Handlers - \ingroup qmlmodules - \brief Provides QML types for handling pointer events. - - This QML module contains types for handling pointer events, which are an abstraction - of mouse, touch and tablet events. - - To use the types in this module, import the module with the following line: - - \code - import Qt.labs.handlers 1.0 - \endcode -*/ - - //![class decl] class QtQuickHandlersPlugin : public QQmlExtensionPlugin { -- cgit v1.2.3 From 56aab7f3c62572dd5341606a79edd605fe92ec39 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 28 Feb 2018 11:21:24 +0100 Subject: doc: Fix some odds and ends in qdoc comments A few incorrent link commands were fixed. A few "No such parameter..." errors were fixed. A \qmlproperty return type qwas adjusted. A comment was removed from between a qdoc coment and its function definition. And a missing \reimp comment was added. Change-Id: Ia1775715b5343d279ca3701e6875abacfadb0cfe Reviewed-by: Martin Smith --- src/quick/items/qquickitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 11be8633f0..9373da33dd 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -7616,7 +7616,7 @@ bool QQuickItem::contains(const QPointF &point) const } /*! - \qmlproperty QObject * QtQuick::Item::containmentMask + \qmlproperty QObject* QtQuick::Item::containmentMask \since 5.11 This property holds an optional mask for the Item to be used in the QtQuick::Item::contains method. -- cgit v1.2.3 From a9b8541c01e1ea9ed6e136108c4195fe2f00c507 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 27 Feb 2018 13:58:37 +0100 Subject: doc: Fix some odds and ends in qdoc comments A few incorrent link commands were fixed. A few "No such parameter..." errors were fixed. A \qmlproperty return type qwas adjusted. A comment was removed from between a qdoc coment and its function definition. And a missing \reimp comment was added. Change-Id: I79c0882d730c77a179a4daf98bc6a46916c585d5 Reviewed-by: Shawn Rutledge Reviewed-by: Martin Smith --- src/quick/handlers/qquicksinglepointhandler.cpp | 2 +- src/quick/items/qquickitem.cpp | 10 +++++----- src/quick/items/qquickpainteditem.cpp | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/quick/handlers/qquicksinglepointhandler.cpp b/src/quick/handlers/qquicksinglepointhandler.cpp index 8b1d8c11b9..1a5537b732 100644 --- a/src/quick/handlers/qquicksinglepointhandler.cpp +++ b/src/quick/handlers/qquicksinglepointhandler.cpp @@ -470,7 +470,7 @@ void QQuickHandlerPoint::reset() If the contact patch is unknown, or the device is not a touchscreen, these values will be zero. - \sa QtQuick::EventPoint::ellipseDiameters, QtQuick::TouchPoint::ellipseDiameters, QTouchEvent::TouchPoint::ellipseDiameters + \sa QtQuick::EventTouchPoint::ellipseDiameters, QtQuick::TouchPoint::ellipseDiameters, QTouchEvent::TouchPoint::ellipseDiameters */ QT_END_NAMESPACE diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 9373da33dd..2576886abf 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -3956,8 +3956,8 @@ void QQuickItem::inputMethodEvent(QInputMethodEvent *event) /*! This event handler can be reimplemented in a subclass to receive focus-in - events for an item. The event information is provided by the - \a event parameter. + events for an item. The event information is provided by the \c event + parameter. */ void QQuickItem::focusInEvent(QFocusEvent * /*event*/) { @@ -3973,8 +3973,8 @@ void QQuickItem::focusInEvent(QFocusEvent * /*event*/) /*! This event handler can be reimplemented in a subclass to receive focus-out - events for an item. The event information is provided by the - \a event parameter. + events for an item. The event information is provided by the \c event + parameter. */ void QQuickItem::focusOutEvent(QFocusEvent * /*event*/) { @@ -5179,8 +5179,8 @@ void QQuickItem::updateInputMethod(Qt::InputMethodQueries queries) } #endif // im -/*! \internal */ // XXX todo - do we want/need this anymore? +/*! \internal */ QRectF QQuickItem::boundingRect() const { Q_D(const QQuickItem); diff --git a/src/quick/items/qquickpainteditem.cpp b/src/quick/items/qquickpainteditem.cpp index 197c4c6348..57848919f3 100644 --- a/src/quick/items/qquickpainteditem.cpp +++ b/src/quick/items/qquickpainteditem.cpp @@ -675,6 +675,10 @@ QSGTextureProvider *QQuickPaintedItem::textureProvider() const return d->textureProvider; } + +/*! + \reimp +*/ void QQuickPaintedItem::itemChange(ItemChange change, const ItemChangeData &value) { if (change == ItemDevicePixelRatioHasChanged) -- cgit v1.2.3 From c8702adf3140db887ea00f1520ae750fc4492b4c Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 27 Feb 2018 16:11:33 +0100 Subject: TapHandler: document that DragThreshold is the default gesturePolicy Followup to 6eaa95662c2d4ba287ac5d1de5ec49bd3a9f59e6 Change-Id: I082d0a52588a90f6c066f31e4595a01302e19241 Reviewed-by: Martin Smith --- src/quick/handlers/qquicktaphandler.cpp | 37 +++++++++++++++++---------------- 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index 1bfcdc2454..f6c19cf314 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -232,29 +232,30 @@ void QQuickTapHandler::timerEvent(QTimerEvent *event) from true to false, regardless of the time held. \value TapHandler.DragThreshold - The event point must not move significantly. If the mouse, finger - or stylus moves past the system-wide drag threshold - (QStyleHints::startDragDistance), the tap gesture is canceled, even - if the button or finger is still pressed. This policy can be useful - whenever TapHandler needs to cooperate with other pointer handlers - (for example \l DragHandler), because in this case TapHandler will - never grab. + (the default value) The event point must not move significantly. + If the mouse, finger or stylus moves past the system-wide drag + threshold (QStyleHints::startDragDistance), the tap gesture is + canceled, even if the button or finger is still pressed. This policy + can be useful whenever TapHandler needs to cooperate with other + pointer handlers (for example \l DragHandler) or event-handling Items + (for example QtQuick Controls), because in this case TapHandler + will not take the exclusive grab, but merely a passive grab. \value TapHandler.WithinBounds If the event point leaves the bounds of the \l target item, the tap - gesture is canceled. The TapHandler will grab on press, but release - the grab as soon as the boundary constraint is no longer satisfied. + gesture is canceled. The TapHandler will take the exclusive grab on + press, but will release the grab as soon as the boundary constraint + is no longer satisfied. \value TapHandler.ReleaseWithinBounds - (the default value) At the time of release (the mouse button is - released or the finger is lifted), if the event point is outside - the bounds of the \l target item, a tap gesture is not recognized. - This is the default value, because it corresponds to typical button - behavior: you can cancel a click by dragging outside the button, - and you can also change your mind by dragging back inside the button - before release. Note that it's necessary for TapHandler to grab on - press and retain it until release (greedy grab) in order to detect - this gesture. + At the time of release (the mouse button is released or the finger + is lifted), if the event point is outside the bounds of the + \l target item, a tap gesture is not recognized. This corresponds to + typical behavior for button widgets: you can cancel a click by + dragging outside the button, and you can also change your mind by + dragging back inside the button before release. Note that it's + necessary for TapHandler take the exclusive grab on press and retain + it until release in order to detect this gesture. */ void QQuickTapHandler::setGesturePolicy(QQuickTapHandler::GesturePolicy gesturePolicy) { -- cgit v1.2.3 From 52d9a725098735e6350fe63cf471a27d4106ad18 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 28 Feb 2018 11:48:08 +0100 Subject: finish renaming of containsMask -> containmentMask Followup to 6fa746fa6 to rename setContainsMask and registerAsContainsMask Change-Id: Ifdfaf58dccb5fd3665615418e7f1ea09cb914c55 Reviewed-by: Paolo Angelelli --- src/quick/items/qquickitem.cpp | 6 +++--- src/quick/items/qquickitem.h | 4 ++-- src/quick/items/qquickitem_p.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 2576886abf..2226adeeff 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -7642,7 +7642,7 @@ QObject *QQuickItem::containmentMask() const return d->mask.data(); } -void QQuickItem::setContainsMask(QObject *mask) +void QQuickItem::setContainmentMask(QObject *mask) { Q_D(QQuickItem); // an Item can't mask itself (to prevent infinite loop in contains()) @@ -7652,7 +7652,7 @@ void QQuickItem::setContainsMask(QObject *mask) QQuickItem *quickMask = qobject_cast(d->mask); if (quickMask) { QQuickItemPrivate *maskPrivate = QQuickItemPrivate::get(quickMask); - maskPrivate->registerAsContainsMask(this, false); // removed from use as my mask + maskPrivate->registerAsContainmentMask(this, false); // removed from use as my mask } if (mask) { @@ -7667,7 +7667,7 @@ void QQuickItem::setContainsMask(QObject *mask) quickMask = qobject_cast(mask); if (quickMask) { QQuickItemPrivate *maskPrivate = QQuickItemPrivate::get(quickMask); - maskPrivate->registerAsContainsMask(this, true); // telling maskPrivate that "this" is using it as mask + maskPrivate->registerAsContainmentMask(this, true); // telling maskPrivate that "this" is using it as mask } emit containmentMaskChanged(); } diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h index 85dddd30e3..cfdb2ad5b7 100644 --- a/src/quick/items/qquickitem.h +++ b/src/quick/items/qquickitem.h @@ -144,7 +144,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus Q_PROPERTY(bool antialiasing READ antialiasing WRITE setAntialiasing NOTIFY antialiasingChanged RESET resetAntialiasing) Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged) Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged) - Q_PROPERTY(QObject *containmentMask READ containmentMask WRITE setContainsMask NOTIFY containmentMaskChanged REVISION 11) + Q_PROPERTY(QObject *containmentMask READ containmentMask WRITE setContainmentMask NOTIFY containmentMaskChanged REVISION 11) Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQuickItemLayer *layer READ layer DESIGNABLE false CONSTANT FINAL) @@ -322,7 +322,7 @@ public: Q_INVOKABLE virtual bool contains(const QPointF &point) const; QObject *containmentMask() const; - void setContainsMask(QObject *mask); + void setContainmentMask(QObject *mask); QTransform itemTransform(QQuickItem *, bool *) const; QPointF mapToItem(const QQuickItem *item, const QPointF &point) const; diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index fd0d08b49c..93287cf0aa 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -390,7 +390,7 @@ public: // Contains mask QPointer mask; // If the mask is an Item, inform it that it's being used as a mask (true) or is no longer being used (false) - virtual void registerAsContainsMask(QQuickItem * /* maskedItem */, bool /* set */) { } + virtual void registerAsContainmentMask(QQuickItem * /* maskedItem */, bool /* set */) { } QQuickAnchors *anchors() const; mutable QQuickAnchors *_anchors; -- cgit v1.2.3 From c8bac27a97c64f09a2c5c59de676804a25fa06aa Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 26 Feb 2018 15:32:53 +0100 Subject: Doc: add code examples and GIFs of AnimatedSprite Change-Id: Ie1c7541e526e2777af83a46d6ff01b3f7a9a0d3e Reviewed-by: Shawn Rutledge --- .../doc/images/animatedsprite-loading-frames.png | Bin 0 -> 147 bytes .../images/animatedsprite-loading-interpolated.gif | Bin 0 -> 22297 bytes src/quick/doc/images/animatedsprite-loading.gif | Bin 0 -> 3364 bytes src/quick/doc/images/animatedsprite-loading.png | Bin 0 -> 118 bytes src/quick/items/qquickanimatedsprite.cpp | 64 ++++++++++++++++++++- 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 src/quick/doc/images/animatedsprite-loading-frames.png create mode 100644 src/quick/doc/images/animatedsprite-loading-interpolated.gif create mode 100644 src/quick/doc/images/animatedsprite-loading.gif create mode 100644 src/quick/doc/images/animatedsprite-loading.png (limited to 'src') diff --git a/src/quick/doc/images/animatedsprite-loading-frames.png b/src/quick/doc/images/animatedsprite-loading-frames.png new file mode 100644 index 0000000000..924e7f0bac Binary files /dev/null and b/src/quick/doc/images/animatedsprite-loading-frames.png differ diff --git a/src/quick/doc/images/animatedsprite-loading-interpolated.gif b/src/quick/doc/images/animatedsprite-loading-interpolated.gif new file mode 100644 index 0000000000..e4512cd3be Binary files /dev/null and b/src/quick/doc/images/animatedsprite-loading-interpolated.gif differ diff --git a/src/quick/doc/images/animatedsprite-loading.gif b/src/quick/doc/images/animatedsprite-loading.gif new file mode 100644 index 0000000000..1eaf7ad892 Binary files /dev/null and b/src/quick/doc/images/animatedsprite-loading.gif differ diff --git a/src/quick/doc/images/animatedsprite-loading.png b/src/quick/doc/images/animatedsprite-loading.png new file mode 100644 index 0000000000..ff2bbbd140 Binary files /dev/null and b/src/quick/doc/images/animatedsprite-loading.png differ diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp index 8e486add44..741e4607e5 100644 --- a/src/quick/items/qquickanimatedsprite.cpp +++ b/src/quick/items/qquickanimatedsprite.cpp @@ -69,9 +69,67 @@ QT_BEGIN_NAMESPACE as multiple frames in the same image file. You can play it at a fixed speed, at the frame rate of your display, or manually advance and control the progress. - For details of how a sprite animation is defined see the \l{Sprite Animations} overview. - Note that the AnimatedSprite type does not use Sprite types to define multiple animations, - but instead encapsulates a single animation itself. + Consider the following sprite sheet: + + \image animatedsprite-loading.png + + It can be divided up into four frames: + + \image animatedsprite-loading-frames.png + + To play each of these frames at a speed of 500 milliseconds per frame, the + following code can be used: + + \table + \header + \li Code + \li Result + \row + \li + \code + AnimatedSprite { + source: "loading.png" + frameWidth: 64 + frameHeight: 64 + frameCount: 4 + frameDuration: 500 + } + \endcode + \li + \image animatedsprite-loading-interpolated.gif + \endtable + + By default, the frames are interpolated (blended together) to make the + animation appear smoother. To disable this, set \l interpolate to \c false: + + \table + \header + \li Code + \li Result + \row + \li + \code + AnimatedSprite { + source: "loading.png" + frameWidth: 64 + frameHeight: 64 + frameCount: 4 + frameDuration: 500 + interpolate: false + } + \endcode + \li + \image animatedsprite-loading.gif + \endtable + + To control how AnimatedSprite responds to being scaled, use the + \l {Item::}{smooth} property. + + Note that unlike \l SpriteSequence, the AnimatedSprite type does not use + \l Sprite to define multiple animations, but instead encapsulates a + single animation itself. + + \sa {Sprite Animations} */ /*! -- cgit v1.2.3 From ba6b7fffbec4f18fffd6a78aa4cb86006e4a3c4b Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Mon, 26 Feb 2018 15:31:58 +0100 Subject: Fix: do data size check of pkm format compressed texture files Reintroduce reading - and sanity checking - the data size from the file header of pkm files. This was commented out during the refactoring, since it lacked the fix for ETC2_EAC format (ref. 16cd1f8 on 5.10 branch). This commit also includes that fix. Change-Id: Id85547fb6bee254d58e49ddff4593704f7ab83ed Reviewed-by: Michael Brasser --- src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp b/src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp index daec23d478..618c0db045 100644 --- a/src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp +++ b/src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp @@ -95,10 +95,9 @@ QQuickTextureFactory *QSGPkmHandler::read() texData->hasAlpha = !QSGCompressedTexture::formatIsOpaque(texData->format); // texture size - /* Actual data length depends on format; for now just use 0, i.e. rest-of-file + const int bpb = (texData->format == QOpenGLTexture::RGBA8_ETC2_EAC) ? 16 : 8; QSize paddedSize(qFromBigEndian(rawData + 8), qFromBigEndian(rawData + 10)); - texData->dataLength = (paddedSize.width() / 4) * (paddedSize.height() / 4) * 8; - */ + texData->dataLength = (paddedSize.width() / 4) * (paddedSize.height() / 4) * bpb; QSize texSize(qFromBigEndian(rawData + 12), qFromBigEndian(rawData + 14)); texData->size = texSize; -- cgit v1.2.3 From 520c26b82182e9dfe29e4993c74c8c7225c66aa0 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 28 Feb 2018 12:14:38 +0100 Subject: Doc: correct references to snippet - replace by \quotefromfile statements from existing code - if no example in existing code: use \badcode - this makes dbransaction.js redundant Change-Id: I748fd1b3ee564556d71e9af5ca2dbc70ec37ecc2 Reviewed-by: Martin Smith --- src/imports/localstorage/plugin.cpp | 34 +++++-- .../doc/snippets/qml/localstorage/dbtransaction.js | 107 --------------------- 2 files changed, 28 insertions(+), 113 deletions(-) delete mode 100644 src/quick/doc/snippets/qml/localstorage/dbtransaction.js (limited to 'src') diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index 1ed4a754d3..88121df66c 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -611,7 +611,15 @@ May throw exception with code property SQLException.DATABASE_ERR or SQLException See example below. -\snippet qml/localstorage/dbtransaction.js 2 +\badcode + var db = LocalStorage.openDatabaseSync("ActivityTrackDB", "", "Database tracking sports activities", 1000000); + if (db.version == "0.1") { + db.changeVersion("0.1", "0.2", function(tx) { + tx.executeSql("INSERT INTO trip_log VALUES(?, ?, ?)", + [ "01/10/2016","Sylling - Vikersund", "53" ]); + } + }); +\endcode \section3 db.transaction(callback(tx)) @@ -621,7 +629,10 @@ you can call \e executeSql on \e tx to read and modify the database. If the callback throws exceptions, the transaction is rolled back. Below you will find an example of a database transaction which catches exceptions. -\snippet qml/localstorage/dbtransaction.js 0 + +\quotefromfile localstorage/localstorage/Database.js +\skipuntil dbInit() +\printto dbGetHandle In the example you can see an \c insert statement where values are assigned to the fields, and the record is written into the table. That is an \c insert statement with a syntax that is usual @@ -631,15 +642,24 @@ store them in a table. Let's suppose a simple example where we store trips in JSON format using \c date as the unique key. An example of a table that could be used for that purpose: -\snippet qml/localstorage/dbtransaction.js 3 +\badcode + create table trip_log(date text, data text) +\endcode The assignment of values to a JSON object: -\snippet qml/localstorage/dbtransaction.js 4 +\badcode + var obj = {description = "Vikersund - Noresund", distance = "60"} +\endcode In that case, the data could be saved in the following way: -\snippet qml/localstorage/dbtransaction.js 5 +\badcode + db.transaction(function(tx) { + result = tx.executeSQL("insert into trip_log values (?,?)", + ["01/11/2016", JSON.stringify(obj)]) + +\endcode \section3 db.readTransaction(callback(tx)) @@ -664,7 +684,9 @@ May throw exception with code property SQLException.DATABASE_ERR, SQLException.S See below for an example: -\snippet qml/localstorage/dbtransaction.js 1 +\quotefromfile localstorage/localstorage/Database.js +\skipto dbReadAll() +\printto dbUpdate(Pdate \section1 Method Documentation diff --git a/src/quick/doc/snippets/qml/localstorage/dbtransaction.js b/src/quick/doc/snippets/qml/localstorage/dbtransaction.js deleted file mode 100644 index aafe10c5f1..0000000000 --- a/src/quick/doc/snippets/qml/localstorage/dbtransaction.js +++ /dev/null @@ -1,107 +0,0 @@ - /**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -//![0] -var db = LocalStorage.openDatabaseSync("ActivityTrackDB", "", "Database tracking sports activities", 1000000); -db.transaction( - try { - function(tx) { - tx.executeSql("INSERT INTO trip_log VALUES(?, ?, ?)", - [ "01/10/2016","Sylling - Vikersund", "53" ]); - } - } catch (err) { - console.log("Error inserting into table trip_log: " + err); - } -) -//![0] - -//![1] -// Retrieve activity date, description and distance based on minimum -// distance parameter Pdistance -function db_distance_select(Pdistance) -{ -var db = LocalStorage.openDatabaseSync("ActivityTrackDB", "", "Database tracking sports activities", 1000000); -db.transaction( - function(tx) { - var results = tx.executeSql("SELECT rowid, - date, - trip_desc, - distance FROM trip_log - where distance >= ?",[Pdistance]); - for (var i = 0; i < results.rows.length; i++) { - listModel.append({"id": results.rows.item(i).rowid, - "date": results.rows.item(i).date, - "trip_desc": results.rows.item(i).trip_desc, - "distance": results.rows.item(i).distance}); - } - } -} -//![1] -//![2] -var db = LocalStorage.openDatabaseSync("ActivityTrackDB", "", "Database tracking sports activities", 1000000); -if (db.version == "0.1") { - db.changeVersion("0.1", "0.2", function(tx) { - tx.executeSql("INSERT INTO trip_log VALUES(?, ?, ?)", - [ "01/10/2016","Sylling - Vikersund", "53" ]); - } -}); -//![2] -//![3] -create table trip_log(date text, data text) -//![3] -//![4] -var obj = {description = "Vikersund - Noresund", distance = "60"} -//![4] -//![5] -db.transaction(function(tx) { - result = tx.executeSQL("insert into trip_log values (?,?)", - ["01/11/2016", JSON.stringify(obj)]) -} -//![5] -- cgit v1.2.3 From 2474eb092aace8f58bd49a61ec712b5ae4dd1245 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 28 Feb 2018 15:50:06 +0200 Subject: Silence a GCC 8 warning in qqmljsparser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtdeclarative/src/qml/parser/qqmljsparser.cpp:82:129: error: ‘void* realloc(void*, size_t)’ moving an object of non-trivially copyable type ‘class QStringRef’; use ‘new’ and ‘delete’ instead [-Werror=class-memaccess] string_stack = reinterpret_cast (realloc(string_stack, stack_size * sizeof(QStringRef))); Change-Id: I670b8a860bf3dc9c20126306f7848f38acd75ca9 Reviewed-by: Simon Hausmann --- src/qml/parser/qqmljsparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/parser/qqmljsparser.cpp b/src/qml/parser/qqmljsparser.cpp index f1beec6387..24b04b02f9 100644 --- a/src/qml/parser/qqmljsparser.cpp +++ b/src/qml/parser/qqmljsparser.cpp @@ -79,7 +79,7 @@ void Parser::reallocateStack() sym_stack = reinterpret_cast (realloc(sym_stack, stack_size * sizeof(Value))); state_stack = reinterpret_cast (realloc(state_stack, stack_size * sizeof(int))); location_stack = reinterpret_cast (realloc(location_stack, stack_size * sizeof(AST::SourceLocation))); - string_stack = reinterpret_cast (realloc(string_stack, stack_size * sizeof(QStringRef))); + string_stack = reinterpret_cast (realloc(static_cast(string_stack), stack_size * sizeof(QStringRef))); } Parser::Parser(Engine *engine): -- cgit v1.2.3 From d0c1b1e8f9dcbde14154029f7df0acc3888f675a Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 28 Feb 2018 15:55:33 +0200 Subject: Silence a GCC 8 warning in qv4engine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtdeclarative/src/qml/jsruntime/qv4engine.cpp:913:78: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct QV4::Property’ with no trivial copy-assignment [-Werror=class-memaccess] memcpy(argumentsAccessors, oldAccessors, oldSize*sizeof(Property)); Change-Id: I6e3d6a1a26fda33aa47c315a183edba9dcd0c0b9 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 168a2ea9d4..5f59e1e809 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -910,7 +910,7 @@ void ExecutionEngine::requireArgumentsAccessors(int n) nArgumentsAccessors = qMax(8, n); argumentsAccessors = new Property[nArgumentsAccessors]; if (oldAccessors) { - memcpy(argumentsAccessors, oldAccessors, oldSize*sizeof(Property)); + memcpy(static_cast(argumentsAccessors), static_cast(oldAccessors), oldSize*sizeof(Property)); delete [] oldAccessors; } ExecutionContext *global = rootContext(); -- cgit v1.2.3 From 27ef77279f0cc563eac58f6ef5ea0f6ac6b570a4 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 28 Feb 2018 15:57:38 +0200 Subject: Silence a GCC 8 warning in qv4string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtdeclarative/src/qml/jsruntime/qv4string.cpp:224:76: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QChar’ from an array of ‘short unsigned int’ [-Werror=class-memaccess] memcpy(ch, item->text->data(), item->text->size * sizeof(QChar)); Change-Id: Ibbb91fb017fe3cc382e4a4641f899c8ea4ef989a Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp index 8f6f50338e..447992ebec 100644 --- a/src/qml/jsruntime/qv4string.cpp +++ b/src/qml/jsruntime/qv4string.cpp @@ -221,7 +221,7 @@ void Heap::String::append(const String *data, QChar *ch) memcpy(ch, cs->left->toQString().constData() + cs->from, cs->len*sizeof(QChar)); ch += cs->len; } else { - memcpy(ch, item->text->data(), item->text->size * sizeof(QChar)); + memcpy(static_cast(ch), static_cast(item->text->data()), item->text->size * sizeof(QChar)); ch += item->text->size; } } -- cgit v1.2.3 From 622decbe3b2478496295e57d59f9cf16a9f70a13 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 28 Feb 2018 16:09:09 +0200 Subject: Silence GCC 8 warnings in qpodvector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qpodvector_p.h:90:34: error: ‘void* realloc(void*, size_t)’ moving an object of non-trivially copyable type ‘class QQuickBasePositioner::PositionedItem’; use ‘new’ and ‘delete’ instead [-Werror=class-memaccess] m_data = (T *)realloc(m_data, m_capacity * sizeof(T)); qpodvector_p.h:94:22: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class QQuickBasePositioner::PositionedItem’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] ::memmove(m_data + idx + 1, m_data + idx, moveCount * sizeof(T)); Change-Id: I37088986a0f8613152a355ed6f3f9572316fa607 Reviewed-by: Simon Hausmann --- src/qml/qml/ftw/qpodvector_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/qml/qml/ftw/qpodvector_p.h b/src/qml/qml/ftw/qpodvector_p.h index d0e4f89741..5255c1f617 100644 --- a/src/qml/qml/ftw/qpodvector_p.h +++ b/src/qml/qml/ftw/qpodvector_p.h @@ -87,11 +87,11 @@ public: void insert(int idx, const T &v) { if (m_count == m_capacity) { m_capacity += Increment; - m_data = (T *)realloc(m_data, m_capacity * sizeof(T)); + m_data = (T *)realloc(static_cast(m_data), m_capacity * sizeof(T)); } int moveCount = m_count - idx; if (moveCount) - ::memmove(m_data + idx + 1, m_data + idx, moveCount * sizeof(T)); + ::memmove(static_cast(m_data + idx + 1), static_cast(m_data + idx), moveCount * sizeof(T)); m_count++; m_data[idx] = v; } @@ -99,7 +99,7 @@ public: void reserve(int count) { if (count >= m_capacity) { m_capacity = (count + (Increment-1)) & (0xFFFFFFFF - Increment + 1); - m_data = (T *)realloc(m_data, m_capacity * sizeof(T)); + m_data = (T *)realloc(static_cast(m_data), m_capacity * sizeof(T)); } } @@ -108,7 +108,7 @@ public: reserve(newSize); int moveCount = m_count - idx; if (moveCount) - ::memmove(m_data + idx + count, m_data + idx, + ::memmove(static_cast(m_data + idx + count), static_cast(m_data + idx), moveCount * sizeof(T)); m_count = newSize; } -- cgit v1.2.3 From 12afec6c2f89264b7344f9221763898c77a396fc Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 28 Feb 2018 16:26:58 +0200 Subject: Silence a GCC 8 warning in qquickanimation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtdeclarative/src/quick/util/qquickanimation.cpp:1669:109: error: cast between incompatible function types from ‘QVariant (*)(qreal&, qreal&, qreal)’ {aka ‘QVariant (*)(double&, double&, double)’} to ‘QVariantAnimation::Interpolator’ {aka ‘QVariant (*)(const void*, const void*, double)’} [-Werror=cast-function-type] d->interpolator = reinterpret_cast(&_q_interpolateClockwiseRotation); Change-Id: I8da70ef666deb3cbdbf05c5bac89f705a2ec5ea8 Reviewed-by: Simon Hausmann --- src/quick/util/qquickanimation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/quick/util/qquickanimation.cpp b/src/quick/util/qquickanimation.cpp index c936ba4e93..a89f237499 100644 --- a/src/quick/util/qquickanimation.cpp +++ b/src/quick/util/qquickanimation.cpp @@ -1666,13 +1666,13 @@ void QQuickRotationAnimation::setDirection(QQuickRotationAnimation::RotationDire d->direction = direction; switch(d->direction) { case Clockwise: - d->interpolator = reinterpret_cast(&_q_interpolateClockwiseRotation); + d->interpolator = reinterpret_cast(reinterpret_cast(&_q_interpolateClockwiseRotation)); break; case Counterclockwise: - d->interpolator = reinterpret_cast(&_q_interpolateCounterclockwiseRotation); + d->interpolator = reinterpret_cast(reinterpret_cast(&_q_interpolateCounterclockwiseRotation)); break; case Shortest: - d->interpolator = reinterpret_cast(&_q_interpolateShortestRotation); + d->interpolator = reinterpret_cast(reinterpret_cast(&_q_interpolateShortestRotation)); break; default: d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType); -- cgit v1.2.3 From 55f71cdfc5746a71bcb89f0fa4ff3447cb8b5514 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 28 Feb 2018 16:50:44 +0200 Subject: Silence another GCC 8 warning in qpodvector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtdeclarative/src/qml/qml/ftw/qpodvector_p.h:119:22: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class QQuickBasePositioner::PositionedItem’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] ::memmove(m_data + idx, m_data + idx + count, Change-Id: I049703a0a6bb4432dfd3d3ce3c8cef13e9c2e31a Reviewed-by: Simon Hausmann --- src/qml/qml/ftw/qpodvector_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/qml/ftw/qpodvector_p.h b/src/qml/qml/ftw/qpodvector_p.h index 5255c1f617..b2fb481793 100644 --- a/src/qml/qml/ftw/qpodvector_p.h +++ b/src/qml/qml/ftw/qpodvector_p.h @@ -116,7 +116,7 @@ public: void remove(int idx, int count = 1) { int moveCount = m_count - (idx + count); if (moveCount) - ::memmove(m_data + idx, m_data + idx + count, + ::memmove(static_cast(m_data + idx), static_cast(m_data + idx + count), moveCount * sizeof(T)); m_count -= count; } -- cgit v1.2.3 From cc71df112772ac5552ca5a698a837f3bbaeddc2a Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 28 Feb 2018 17:04:24 +0200 Subject: Silence a GCC 8 warning in qqmlprofilerevent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtdeclarative/src/qmldebug/qqmlprofilerevent_p.h:100:55: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct QQmlProfilerEvent’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] memcpy(this, &other, sizeof(QQmlProfilerEvent)); Change-Id: I72a03da54784ba3dcd89def5ae44c1ae26a68e53 Reviewed-by: Simon Hausmann --- src/qmldebug/qqmlprofilerevent_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/qmldebug/qqmlprofilerevent_p.h b/src/qmldebug/qqmlprofilerevent_p.h index 93562302e9..49a0c9e347 100644 --- a/src/qmldebug/qqmlprofilerevent_p.h +++ b/src/qmldebug/qqmlprofilerevent_p.h @@ -97,7 +97,7 @@ struct QQmlProfilerEvent : public QQmlProfilerDefinitions { QQmlProfilerEvent(QQmlProfilerEvent &&other) { - memcpy(this, &other, sizeof(QQmlProfilerEvent)); + memcpy(static_cast(this), static_cast(&other), sizeof(QQmlProfilerEvent)); other.m_dataType = Inline8Bit; // prevent dtor from deleting the pointer } @@ -117,7 +117,7 @@ struct QQmlProfilerEvent : public QQmlProfilerDefinitions { QQmlProfilerEvent &operator=(QQmlProfilerEvent &&other) { if (this != &other) { - memcpy(this, &other, sizeof(QQmlProfilerEvent)); + memcpy(static_cast(this), static_cast(&other), sizeof(QQmlProfilerEvent)); other.m_dataType = Inline8Bit; } return *this; -- cgit v1.2.3 From f70392700c63d81ef8bcee7351d903e4823b4571 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Mon, 26 Feb 2018 12:00:04 +0100 Subject: Fix: Do not read texture files when backend is not opengl The software backend would assert for the compressed GL texture files. Autotests updated for this functionality. Moved tests of the optional texture-file support out of qmltest (where it did not belong) and into tst_qquickimage, side by side with the tests of the optional svg format. Change-Id: I98c407093ccebeb70ba5a93ff0882dbd0b8060d5 Reviewed-by: Laszlo Agocs --- src/quick/util/qquickpixmapcache.cpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index e1937aeec2..4237ec3edf 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -423,6 +423,24 @@ static QStringList fromLatin1List(const QList &list) return res; } +class BackendSupport +{ +public: + BackendSupport() + { + delete QSGContext::createTextureFactoryFromImage(QImage()); // Force init of backend data + hasOpenGL = QQuickWindow::sceneGraphBackend().isEmpty(); // i.e. default + QList list; + if (hasOpenGL) + list.append(QSGTextureReader::supportedFileFormats()); + list.append(QImageReader::supportedImageFormats()); + fileSuffixes = fromLatin1List(list); + } + bool hasOpenGL; + QStringList fileSuffixes; +}; +Q_GLOBAL_STATIC(BackendSupport, backendSupport); + static QString existingImageFileForPath(const QString &localFile) { // Do nothing if given filepath exists or already has a suffix @@ -430,11 +448,9 @@ static QString existingImageFileForPath(const QString &localFile) if (!fi.suffix().isEmpty() || fi.exists()) return localFile; - static const QStringList suffixes = fromLatin1List(QSGTextureReader::supportedFileFormats() + - QImageReader::supportedImageFormats()); QString tryFile = localFile + QStringLiteral(".xxxx"); const int suffixIdx = localFile.length() + 1; - for (const QString &suffix : suffixes) { + for (const QString &suffix : backendSupport()->fileSuffixes) { tryFile.replace(suffixIdx, 10, suffix); if (QFileInfo::exists(tryFile)) return tryFile; @@ -801,7 +817,7 @@ void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &u QSize readSize; if (f.open(QIODevice::ReadOnly)) { QSGTextureReader texReader(&f, localFile); - if (texReader.isTexture()) { + if (backendSupport()->hasOpenGL && texReader.isTexture()) { QQuickTextureFactory *factory = texReader.read(); if (factory) { readSize = factory->textureSize(); @@ -1284,7 +1300,7 @@ static QQuickPixmapData* createPixmapDataSync(QQuickPixmap *declarativePixmap, Q if (f.open(QIODevice::ReadOnly)) { QSGTextureReader texReader(&f, localFile); - if (texReader.isTexture()) { + if (backendSupport()->hasOpenGL && texReader.isTexture()) { QQuickTextureFactory *factory = texReader.read(); if (factory) { *ok = true; -- cgit v1.2.3 From a0d615e3b6c36a6918f27c7b53081a2f53043e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Fri, 2 Mar 2018 12:29:55 +0100 Subject: Don't crash if DragHandler have target: null Change-Id: Ie5c5367439f8773eb523ef5d639a018a2fd59c65 Reviewed-by: Shawn Rutledge --- src/quick/handlers/qquickdraghandler.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp index 60b57206d3..041780257a 100644 --- a/src/quick/handlers/qquickdraghandler.cpp +++ b/src/quick/handlers/qquickdraghandler.cpp @@ -108,15 +108,15 @@ QPointF QQuickDragHandler::localTargetPosition(QQuickEventPoint *point) void QQuickDragHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point) { - if (!target() || !target()->parentItem()) - return; if (grabber == this && stateChange == QQuickEventPoint::GrabExclusive) { // In case the grab got handed over from another grabber, we might not get the Press. if (!m_pressedInsideTarget) { - m_pressTargetPos = QPointF(target()->width(), target()->height()) / 2; + if (target()) + m_pressTargetPos = QPointF(target()->width(), target()->height()) / 2; m_pressScenePos = point->scenePosition(); } else if (m_pressTargetPos.isNull()) { - m_pressTargetPos = localTargetPosition(point); + if (target()) + m_pressTargetPos = localTargetPosition(point); m_pressScenePos = point->scenePosition(); } } @@ -137,8 +137,10 @@ void QQuickDragHandler::handleEventPoint(QQuickEventPoint *point) point->setAccepted(); switch (point->state()) { case QQuickEventPoint::Pressed: - m_pressedInsideTarget = targetContains(point); - m_pressTargetPos = localTargetPosition(point); + if (target()) { + m_pressedInsideTarget = targetContains(point); + m_pressTargetPos = localTargetPosition(point); + } m_pressScenePos = point->scenePosition(); setPassiveGrab(point); break; -- cgit v1.2.3 From 73ab709ae2c0ab2bf7468b181a14ce3ec507abf4 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 12 Jan 2018 13:32:10 +0100 Subject: allow DeviceType and PointerType enums 16 bits each; bit packing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now in QQuickPointerDevice, the types, flags and capabilities take up 64 bits together, and we reserve enough bits to add more types later. In C++11 enums can be strongly typed by "inheriting" an integer type, so we do that. They are signed because button count and maximum touch points are signed, and because MS compilers do that by default with enums. Change-Id: I45f27bcceeef275cbee256472b35f78fbdeeaad6 Reviewed-by: Jan Arve Sæther --- src/quick/items/qquickevents_p_p.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index e06455124e..c4f0b60d92 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -566,7 +566,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPointerDevice : public QObject Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId CONSTANT) public: - enum DeviceType { + enum DeviceType : qint16 { UnknownDevice = 0x0000, Mouse = 0x0001, TouchScreen = 0x0002, @@ -574,25 +574,25 @@ public: Puck = 0x0008, Stylus = 0x0010, Airbrush = 0x0020, - AllDevices = 0x003F + AllDevices = 0x7FFF }; Q_DECLARE_FLAGS(DeviceTypes, DeviceType) Q_ENUM(DeviceType) Q_FLAG(DeviceTypes) - enum PointerType { + enum PointerType : qint16 { GenericPointer = 0x0001, Finger = 0x0002, Pen = 0x0004, Eraser = 0x0008, Cursor = 0x0010, - AllPointerTypes = 0x001F + AllPointerTypes = 0x7FFF }; Q_DECLARE_FLAGS(PointerTypes, PointerType) Q_ENUM(PointerType) Q_FLAG(PointerTypes) - enum CapabilityFlag { + enum CapabilityFlag : qint16 { Position = QTouchDevice::Position, Area = QTouchDevice::Area, Pressure = QTouchDevice::Pressure, @@ -610,7 +610,7 @@ public: DeviceType type() const { return m_deviceType; } PointerType pointerType() const { return m_pointerType; } - Capabilities capabilities() const { return m_capabilities; } + Capabilities capabilities() const { return static_cast(m_capabilities); } bool hasCapability(CapabilityFlag cap) { return m_capabilities & cap; } int maximumTouchPoints() const { return m_maximumTouchPoints; } int buttonCount() const { return m_buttonCount; } @@ -626,19 +626,21 @@ public: private: QQuickPointerDevice(DeviceType devType, PointerType pType, Capabilities caps, int maxPoints, int buttonCount, const QString &name, qint64 uniqueId = 0) - : m_deviceType(devType), m_pointerType(pType), m_capabilities(caps) - , m_maximumTouchPoints(maxPoints), m_buttonCount(buttonCount), m_name(name) + : m_deviceType(devType), m_pointerType(pType), m_capabilities(static_cast(caps)) + , m_maximumTouchPoints(static_cast(maxPoints)), m_buttonCount(static_cast(buttonCount)), m_name(name) , m_uniqueId(QPointingDeviceUniqueId::fromNumericId(uniqueId)) { } ~QQuickPointerDevice() override { } private: + // begin 64-bit field DeviceType m_deviceType; PointerType m_pointerType; - Capabilities m_capabilities; - int m_maximumTouchPoints; - int m_buttonCount; + qint16 m_capabilities; + qint8 m_maximumTouchPoints; + qint8 m_buttonCount; + // end 64-bit field QString m_name; QPointingDeviceUniqueId m_uniqueId; QVector m_eventDeliveryTargets; // during delivery, handlers which have already seen the event -- cgit v1.2.3 From 331b76dcf2d7d2b1395f6e4b295887ffc25562d1 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 2 Mar 2018 09:51:45 +0100 Subject: doc: Fix one link command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This update fixes a \l command that used the wrong syntax. Change-Id: Icf5cc82eb4118332b42fe67d9d31bb7de07de3fc Reviewed-by: Topi Reiniö --- src/imports/shapes/qquickshape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/imports/shapes/qquickshape.cpp b/src/imports/shapes/qquickshape.cpp index f0fdebe162..067a54736f 100644 --- a/src/imports/shapes/qquickshape.cpp +++ b/src/imports/shapes/qquickshape.cpp @@ -1404,7 +1404,7 @@ void QQuickShapeRadialGradient::setFocalRadius(qreal v) Conical gradients interpolate colors counter-clockwise around a center point in Shape items. - \note The \l{ShapeGradient.spread}{spread mode} setting has no effect for + \note The \l{ShapeGradient::spread}{spread mode} setting has no effect for conical gradients. \note ConicalGradient is only supported in combination with Shape items. It -- cgit v1.2.3 From 605a233828c05b8667e09ae1a29a352239e60af3 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 2 Mar 2018 10:05:47 +0100 Subject: doc: Add qtquickcontrols2 to the dependency list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtquickcontrols2 was missing from the dependency list in qtquick.qdocconf. Change-Id: I29231c097ca9f748ed8b3ae49100466318da8352 Reviewed-by: Topi Reiniö --- src/quick/doc/qtquick.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf index c03952735a..f51baa8f49 100644 --- a/src/quick/doc/qtquick.qdocconf +++ b/src/quick/doc/qtquick.qdocconf @@ -33,7 +33,7 @@ qhp.QtQuick.subprojects.examples.selectors = fake:example tagfile = ../../../doc/qtquick/qtquick.tags -depends += qtcore qtxmlpatterns qtqml qtgui qtlinguist qtquickcontrols qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql +depends += qtcore qtxmlpatterns qtqml qtgui qtlinguist qtquickcontrols qtquickcontrols2 qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql headerdirs += ..\ ../../quickwidgets -- cgit v1.2.3 From 9cd9ca48bdb321252f9cf9ba26d34b6afc1863d9 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 2 Mar 2018 10:12:43 +0100 Subject: doc: Fix link to page title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed the word Overview, which had been deleted from the title. Change-Id: I1af6cc48b0f3c38e2fabe11346b023de317b1fd7 Reviewed-by: Topi Reiniö --- src/quick/doc/src/concepts/pointerhandlers/qtquickhandlers-index.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quick/doc/src/concepts/pointerhandlers/qtquickhandlers-index.qdoc b/src/quick/doc/src/concepts/pointerhandlers/qtquickhandlers-index.qdoc index b17c5ab728..fc1fd5fbc1 100644 --- a/src/quick/doc/src/concepts/pointerhandlers/qtquickhandlers-index.qdoc +++ b/src/quick/doc/src/concepts/pointerhandlers/qtquickhandlers-index.qdoc @@ -67,7 +67,7 @@ \list \li \l{Qt Quick} - \li \l{Qt Quick Pointer Handlers Overview} + \li \l{Qt Quick Pointer Handlers} \li \l{Qt Quick Pointer Handlers QML Types}{Qt Quick Pointer Handlers QML Types} \endlist */ -- cgit v1.2.3 From 86a279bd30f962639acc93da6abad93369898bc8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 2 Mar 2018 10:21:16 +0100 Subject: doc: Fix another link to page title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the word OpenGL, which was missing. Change-Id: Ie09ba1ec59615d2f139ef72e0743f67b6c8ff33d Reviewed-by: Topi Reiniö --- src/quick/items/qquickitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 2226adeeff..ea24bfcad5 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -2068,7 +2068,7 @@ void QQuickItemPrivate::updateSubFocusItem(QQuickItem *scope, bool focus) In the QPainter / QWidget world, it is some times favorable to cache complex content in a pixmap, image or texture. In Qt Quick, because of the techniques already applied by the \l {Qt Quick - Scene Graph Renderer} {scene graph renderer}, this will in most + Scene Graph OpenGL Renderer} {scene graph renderer}, this will in most cases not be the case. Excessive draw calls are already reduced because of batching and a cache will in most cases end up blending more pixels than the original content. The overhead of rendering -- cgit v1.2.3 From 376c654c0af02c0be0d2b007d69111bd29491a1a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 2 Mar 2018 11:46:49 +0100 Subject: Doc: Change QtQuickTest to QtQmlTest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The creation of module QtQmlTest remains incomplete, but this update improves the situation a bit. In qtqmltest.qdocconf, all instances of QtQuickTest are changed to QtQmlTest. In qtquick.qdocconf, qtqmltest is added as a dependency. This remains incomplete, because the module header is still called QtQuickTest, but the number of qdoc warnings in qtdeclarative is reduced. Change-Id: Id545f9b5ecb2165d3f0972a059a8a4a4cfd52f2f Reviewed-by: Topi Reiniö --- src/qmltest/doc/qtqmltest.qdocconf | 54 +++++++++++++++++++------------------- src/quick/doc/qtquick.qdocconf | 2 +- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/qmltest/doc/qtqmltest.qdocconf b/src/qmltest/doc/qtqmltest.qdocconf index e51007d2b2..77c4ca591b 100644 --- a/src/qmltest/doc/qtqmltest.qdocconf +++ b/src/qmltest/doc/qtqmltest.qdocconf @@ -1,35 +1,35 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) -project = QtQuickTest +project = QtQmlTest description = Qt Quick Test Reference Documentation version = $QT_VERSION -qhp.projects = QtQuickTest - -qhp.QtQuickTest.file = qtqmltest.qhp -qhp.QtQuickTest.namespace = org.qt-project.qtquicktest.$QT_VERSION_TAG -qhp.QtQuickTest.virtualFolder = qtquicktest -qhp.QtQuickTest.indexTitle = Qt Quick Test -qhp.QtQuickTest.indexRoot = - -qhp.QtQuickTest.filterAttributes = qtquicktest $QT_VERSION qtrefdoc -qhp.QtQuickTest.customFilters.Qt.name = QtQuickTest $QT_VERSION -qhp.QtQuickTest.customFilters.Qt.filterAttributes = qtquicktest $QT_VERSION -qhp.QtQuickTest.subprojects = qmltypes classes examples -qhp.QtQuickTest.subprojects.classes.title = C++ Classes -qhp.QtQuickTest.subprojects.classes.indexTitle = Qt Quick Test C++ Classes -qhp.QtQuickTest.subprojects.classes.selectors = class doc:headerfile -qhp.QtQuickTest.subprojects.classes.sortPages = true -qhp.QtQuickTest.subprojects.examples.title = Examples -qhp.QtQuickTest.subprojects.examples.indexTitle = Qt Quick Test Examples -qhp.QtQuickTest.subprojects.examples.selectors = doc:example -qhp.QtQuickTest.subprojects.qmltypes.title = QML Types -qhp.QtQuickTest.subprojects.qmltypes.indexTitle = Qt Quick Test QML Types -qhp.QtQuickTest.subprojects.qmltypes.selectors = qmlclass -qhp.QtQuickTest.subprojects.qmltypes.sortPages = true - - -tagfile = ../../../doc/qtquicktest/qtquicktest.tags +qhp.projects = QtQmlTest + +qhp.QtQmlTest.file = qtqmltest.qhp +qhp.QtQmlTest.namespace = org.qt-project.qtqmltest.$QT_VERSION_TAG +qhp.QtQmlTest.virtualFolder = qtqmltest +qhp.QtQmlTest.indexTitle = Qt Quick Test +qhp.QtQmlTest.indexRoot = + +qhp.QtQmlTest.filterAttributes = qtqmltest $QT_VERSION qtrefdoc +qhp.QtQmlTest.customFilters.Qt.name = QtQmlTest $QT_VERSION +qhp.QtQmlTest.customFilters.Qt.filterAttributes = qtqmltest $QT_VERSION +qhp.QtQmlTest.subprojects = qmltypes classes examples +qhp.QtQmlTest.subprojects.classes.title = C++ Classes +qhp.QtQmlTest.subprojects.classes.indexTitle = Qt Quick Test C++ Classes +qhp.QtQmlTest.subprojects.classes.selectors = class doc:headerfile +qhp.QtQmlTest.subprojects.classes.sortPages = true +qhp.QtQmlTest.subprojects.examples.title = Examples +qhp.QtQmlTest.subprojects.examples.indexTitle = Qt Quick Test Examples +qhp.QtQmlTest.subprojects.examples.selectors = doc:example +qhp.QtQmlTest.subprojects.qmltypes.title = QML Types +qhp.QtQmlTest.subprojects.qmltypes.indexTitle = Qt Quick Test QML Types +qhp.QtQmlTest.subprojects.qmltypes.selectors = qmlclass +qhp.QtQmlTest.subprojects.qmltypes.sortPages = true + + +tagfile = ../../../doc/qtqmltest/qtqmltest.tags depends += qtcore qtxmlpatterns qtgui qttestlib qtqml qtquick qtdoc diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf index f51baa8f49..7ce0dfcf09 100644 --- a/src/quick/doc/qtquick.qdocconf +++ b/src/quick/doc/qtquick.qdocconf @@ -33,7 +33,7 @@ qhp.QtQuick.subprojects.examples.selectors = fake:example tagfile = ../../../doc/qtquick/qtquick.tags -depends += qtcore qtxmlpatterns qtqml qtgui qtlinguist qtquickcontrols qtquickcontrols2 qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql +depends += qtcore qtxmlpatterns qtqml qtqmltest qtgui qtlinguist qtquickcontrols qtquickcontrols2 qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql headerdirs += ..\ ../../quickwidgets -- cgit v1.2.3 From 849324dbdb64edcc7e3c8e83f0a1c6c1afbebe9c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 2 Mar 2018 13:34:27 +0100 Subject: doc: Add special module header to qtqmltest.qdocconf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added this variable to qtqmltest.qdocconf because the module and the module header have different names: moduleheader = QtQuickTest Change-Id: Ie9bd61598c063b3f16ef889e5e7bd2f1b33d1fc5 Reviewed-by: Mitch Curtis Reviewed-by: Topi Reiniö --- src/qmltest/doc/qtqmltest.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qmltest/doc/qtqmltest.qdocconf b/src/qmltest/doc/qtqmltest.qdocconf index 77c4ca591b..33e8ae334c 100644 --- a/src/qmltest/doc/qtqmltest.qdocconf +++ b/src/qmltest/doc/qtqmltest.qdocconf @@ -3,7 +3,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtQmlTest description = Qt Quick Test Reference Documentation version = $QT_VERSION - +moduleheader = QtQuickTest qhp.projects = QtQmlTest qhp.QtQmlTest.file = qtqmltest.qhp -- cgit v1.2.3 From 6b310e5f9a53c366fbb8fb78bd7c343aad4e0cdd Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 8 Feb 2018 15:58:24 +0100 Subject: TapHandler: add singleTapped and doubleTapped signals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is for convenience. It's nicer not to need to test tapCount in JavaScript if you know you want to react on double-click: onTapped: if (tapCount === 2) doSomething() becomes onDoubleTapped: doSomething() Neither of these are guaranteed to be exclusive though: singleTapped occurs first, then doubleTapped if you tap again quickly, then tapCount keeps increasing as long as you keep tapping. Change-Id: I6fff10880831d5be0848b9957141311db8c2c0f0 Reviewed-by: Jan Arve Sæther --- src/quick/handlers/qquicktaphandler.cpp | 30 +++++++++++++++++++++++++++--- src/quick/handlers/qquicktaphandler_p.h | 2 ++ 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index f6c19cf314..902ff0df10 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -310,6 +310,10 @@ void QQuickTapHandler::setPressed(bool press, bool cancel, QQuickEventPoint *poi qCDebug(lcTapHandler) << objectName() << "tapped" << m_tapCount << "times"; emit tapped(); emit tapCountChanged(); + if (m_tapCount == 1) + emit singleTapped(); + else if (m_tapCount == 2) + emit doubleTapped(); m_lastTapTimestamp = ts; m_lastTapPos = point->scenePosition(); } else { @@ -353,15 +357,15 @@ void QQuickTapHandler::updateTimeHeld() The number of taps which have occurred within the time and space constraints to be considered a single gesture. For example, to detect - a double-tap, you can write: + a triple-tap, you can write: \qml Rectangle { width: 100; height: 30 - signal doubleTap + signal tripleTap TapHandler { acceptedButtons: Qt.AllButtons - onTapped: if (tapCount == 2) doubleTap() + onTapped: if (tapCount == 3) tripleTap() } } \endqml @@ -382,4 +386,24 @@ void QQuickTapHandler::updateTimeHeld() handler's \l [QML] Item. */ +/*! + \qmlsignal TapHandler::singleTapped + \since 5.11 + + This signal is emitted when the \l target is tapped once. After an amount + of time greater than QStyleHints::mouseDoubleClickInterval, it can be + tapped again; but if the time until the next tap is less, \l tapCount + will increase. +*/ + +/*! + \qmlsignal TapHandler::doubleTapped + \since 5.11 + + This signal is emitted when the \l target is tapped twice within a short + span of time (QStyleHints::mouseDoubleClickInterval) and distance + (QPlatformTheme::MouseDoubleClickDistance or + QPlatformTheme::TouchDoubleTapDistance). This signal always occurs + after singleTapped, tapped and tapCountChanged. +*/ QT_END_NAMESPACE diff --git a/src/quick/handlers/qquicktaphandler_p.h b/src/quick/handlers/qquicktaphandler_p.h index e92d2029ba..b7c1895926 100644 --- a/src/quick/handlers/qquicktaphandler_p.h +++ b/src/quick/handlers/qquicktaphandler_p.h @@ -96,6 +96,8 @@ Q_SIGNALS: void longPressThresholdChanged(); void gesturePolicyChanged(); void tapped(); + void singleTapped(); + void doubleTapped(); void longPressed(); protected: -- cgit v1.2.3