aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-03-03 01:00:13 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-03-03 01:00:13 +0100
commitbf0603fd03ade413036c7dba1ffe0e7ac9364fc9 (patch)
treeb6329f629c5c0a19ca419671ee328725daec699f /src
parentbb7a5d0cb6e62fa411e8b66759bf6b798c3f68d9 (diff)
parent6b310e5f9a53c366fbb8fb78bd7c343aad4e0cdd (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src')
-rw-r--r--src/imports/handlers/plugin.cpp17
-rw-r--r--src/imports/localstorage/plugin.cpp38
-rw-r--r--src/imports/qtquick2/plugin.cpp2
-rw-r--r--src/imports/shapes/qquickshape.cpp2
-rw-r--r--src/imports/testlib/main.cpp2
-rw-r--r--src/particles/qquickv4particledata.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp2
-rw-r--r--src/qml/animations/qanimationgroupjob_p.h2
-rw-r--r--src/qml/animations/qpauseanimationjob_p.h2
-rw-r--r--src/qml/compiler/qv4codegen.cpp14
-rw-r--r--src/qml/debugger/qqmlabstractprofileradapter_p.h2
-rw-r--r--src/qml/debugger/qqmldebugconnector_p.h2
-rw-r--r--src/qml/debugger/qqmldebugservice_p.h2
-rw-r--r--src/qml/jit/qv4jit_p.h232
-rw-r--r--src/qml/jsapi/qjsengine.h2
-rw-r--r--src/qml/jsapi/qjsengine_p.h2
-rw-r--r--src/qml/jsruntime/qv4debugging_p.h2
-rw-r--r--src/qml/jsruntime/qv4engine.cpp2
-rw-r--r--src/qml/jsruntime/qv4string.cpp2
-rw-r--r--src/qml/parser/qqmljsparser.cpp2
-rw-r--r--src/qml/qml/ftw/qpodvector_p.h10
-rw-r--r--src/qml/qml/qqmlapplicationengine.h2
-rw-r--r--src/qml/qml/qqmlbinding_p.h2
-rw-r--r--src/qml/qml/qqmlboundsignal_p.h2
-rw-r--r--src/qml/qml/qqmlcomponent.h2
-rw-r--r--src/qml/qml/qqmlcontext.h2
-rw-r--r--src/qml/qml/qqmldelayedcallqueue_p.h2
-rw-r--r--src/qml/qml/qqmlengine.h2
-rw-r--r--src/qml/qml/qqmlengine_p.h4
-rw-r--r--src/qml/qml/qqmlexpression.h2
-rw-r--r--src/qml/qml/qqmlexpression_p.h2
-rw-r--r--src/qml/qml/qqmlextensioninterface.h2
-rw-r--r--src/qml/qml/qqmlextensionplugin.h2
-rw-r--r--src/qml/qml/qqmlfileselector.h2
-rw-r--r--src/qml/qml/qqmlopenmetaobject_p.h4
-rw-r--r--src/qml/qml/qqmlprivate.h2
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h2
-rw-r--r--src/qml/qml/qqmltypeloader.cpp2
-rw-r--r--src/qml/qml/qqmltypeloader_p.h10
-rw-r--r--src/qml/qml/qqmltypenamecache_p.h2
-rw-r--r--src/qml/qml/qqmlvaluetype_p.h2
-rw-r--r--src/qml/qml/qqmlvmemetaobject_p.h6
-rw-r--r--src/qml/util/qqmlpropertymap.h2
-rw-r--r--src/qmldebug/qqmlprofilerevent_p.h4
-rw-r--r--src/qmltest/doc/qtqmltest.qdocconf56
-rw-r--r--src/qmltest/quicktestevent_p.h2
-rw-r--r--src/qmltest/quicktestresult_p.h2
-rw-r--r--src/quick/doc/images/animatedsprite-loading-frames.pngbin0 -> 147 bytes
-rw-r--r--src/quick/doc/images/animatedsprite-loading-interpolated.gifbin0 -> 22297 bytes
-rw-r--r--src/quick/doc/images/animatedsprite-loading.gifbin0 -> 3364 bytes
-rw-r--r--src/quick/doc/images/animatedsprite-loading.pngbin0 -> 118 bytes
-rw-r--r--src/quick/doc/qtquick.qdocconf2
-rw-r--r--src/quick/doc/snippets/qml/localstorage/dbtransaction.js107
-rw-r--r--src/quick/doc/src/concepts/pointerhandlers/qtquickhandlers-index.qdoc2
-rw-r--r--src/quick/handlers/qquickdraghandler.cpp64
-rw-r--r--src/quick/handlers/qquicksinglepointhandler.cpp2
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp92
-rw-r--r--src/quick/handlers/qquicktaphandler_p.h2
-rw-r--r--src/quick/items/qquickanchors_p.h2
-rw-r--r--src/quick/items/qquickanimatedsprite.cpp64
-rw-r--r--src/quick/items/qquickevents_p_p.h28
-rw-r--r--src/quick/items/qquickitem.cpp30
-rw-r--r--src/quick/items/qquickitem.h12
-rw-r--r--src/quick/items/qquickitem_p.h10
-rw-r--r--src/quick/items/qquickopenglshadereffect_p.h2
-rw-r--r--src/quick/items/qquickopenglshadereffectnode_p.h2
-rw-r--r--src/quick/items/qquickpainteditem.cpp4
-rw-r--r--src/quick/items/qquickpainteditem.h2
-rw-r--r--src/quick/items/qquickrectangle_p.h2
-rw-r--r--src/quick/items/qquickrendercontrol.h2
-rw-r--r--src/quick/items/qquickshadereffectsource_p.h2
-rw-r--r--src/quick/items/qquicksprite_p.h2
-rw-r--r--src/quick/items/qquickspriteengine_p.h4
-rw-r--r--src/quick/items/qquicktext_p.h2
-rw-r--r--src/quick/items/qquickview.h2
-rw-r--r--src/quick/items/qquickwindow.h2
-rw-r--r--src/quick/items/qquickwindow_p.h2
-rw-r--r--src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp5
-rw-r--r--src/quick/scenegraph/compressedtexture/qsgtexturefilehandler_p.h1
-rw-r--r--src/quick/scenegraph/coreapi/qsgabstractrenderer.h2
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h12
-rw-r--r--src/quick/scenegraph/coreapi/qsgrendernode.h2
-rw-r--r--src/quick/scenegraph/qsgcontext_p.h4
-rw-r--r--src/quick/scenegraph/util/qsgengine.h2
-rw-r--r--src/quick/scenegraph/util/qsgimagenode.h2
-rw-r--r--src/quick/scenegraph/util/qsgninepatchnode.h2
-rw-r--r--src/quick/scenegraph/util/qsgrectanglenode.h2
-rw-r--r--src/quick/scenegraph/util/qsgsimplematerial.h2
-rw-r--r--src/quick/scenegraph/util/qsgsimpletexturenode.h2
-rw-r--r--src/quick/scenegraph/util/qsgtexture.h2
-rw-r--r--src/quick/scenegraph/util/qsgtexture_p.h2
-rw-r--r--src/quick/scenegraph/util/qsgtexturereader.cpp5
-rw-r--r--src/quick/scenegraph/util/qsgtexturereader_p.h1
-rw-r--r--src/quick/util/qquickanimation.cpp6
-rw-r--r--src/quick/util/qquickanimation_p.h24
-rw-r--r--src/quick/util/qquickanimation_p_p.h6
-rw-r--r--src/quick/util/qquickimageprovider.h8
-rw-r--r--src/quick/util/qquickpath_p.h2
-rw-r--r--src/quick/util/qquickpixmapcache.cpp26
-rw-r--r--src/quick/util/qquickprofiler_p.h2
-rw-r--r--src/quick/util/qquickstate_p.h2
-rw-r--r--src/quickwidgets/qquickwidget.h2
103 files changed, 539 insertions, 503 deletions
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
{
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index 5148b2f18f..88121df66c 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;
@@ -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
@@ -693,7 +715,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/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
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 44250079c7..b01b2f3b36 100644
--- a/src/qml/animations/qanimationgroupjob_p.h
+++ b/src/qml/animations/qanimationgroupjob_p.h
@@ -63,7 +63,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 53bf8a88b5..6c9bbf0dab 100644
--- a/src/qml/animations/qpauseanimationjob_p.h
+++ b/src/qml/animations/qpauseanimationjob_p.h
@@ -62,7 +62,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 4a01c271ca..f39f8fccd2 100644
--- a/src/qml/debugger/qqmlabstractprofileradapter_p.h
+++ b/src/qml/debugger/qqmlabstractprofileradapter_p.h
@@ -70,7 +70,7 @@ public:
QQmlAbstractProfilerAdapter(QObject *parent = nullptr) :
QObject(parent), service(nullptr), waiting(true), featuresEnabled(0) {}
- virtual ~QQmlAbstractProfilerAdapter() {}
+ ~QQmlAbstractProfilerAdapter() override {}
void setService(QQmlProfilerService *new_service) { service = new_service; }
virtual qint64 sendMessages(qint64 until, QList<QByteArray> &messages) = 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/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 9aac5c4f70..b697a2081b 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -920,7 +920,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<void *>(argumentsAccessors), static_cast<const void *>(oldAccessors), oldSize*sizeof(Property));
delete [] oldAccessors;
}
ExecutionContext *global = rootContext();
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<void *>(ch), static_cast<const void *>(item->text->data()), item->text->size * sizeof(QChar));
ch += item->text->size;
}
}
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<Value*> (realloc(sym_stack, stack_size * sizeof(Value)));
state_stack = reinterpret_cast<int*> (realloc(state_stack, stack_size * sizeof(int)));
location_stack = reinterpret_cast<AST::SourceLocation*> (realloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
- string_stack = reinterpret_cast<QStringRef*> (realloc(string_stack, stack_size * sizeof(QStringRef)));
+ string_stack = reinterpret_cast<QStringRef*> (realloc(static_cast<void *>(string_stack), stack_size * sizeof(QStringRef)));
}
Parser::Parser(Engine *engine):
diff --git a/src/qml/qml/ftw/qpodvector_p.h b/src/qml/qml/ftw/qpodvector_p.h
index d0e4f89741..b2fb481793 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<void *>(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<void *>(m_data + idx + 1), static_cast<const void *>(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<void *>(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<void *>(m_data + idx + count), static_cast<const void *>(m_data + idx),
moveCount * sizeof(T));
m_count = newSize;
}
@@ -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<void *>(m_data + idx), static_cast<const void *>(m_data + idx + count),
moveCount * sizeof(T));
m_count -= count;
}
diff --git a/src/qml/qml/qqmlapplicationengine.h b/src/qml/qml/qqmlapplicationengine.h
index d0f9e6d319..bb5d6b5d68 100644
--- a/src/qml/qml/qqmlapplicationengine.h
+++ b/src/qml/qml/qqmlapplicationengine.h
@@ -56,7 +56,7 @@ public:
QQmlApplicationEngine(QObject *parent = nullptr);
QQmlApplicationEngine(const QUrl &url, QObject *parent = nullptr);
QQmlApplicationEngine(const QString &filePath, QObject *parent = nullptr);
- ~QQmlApplicationEngine();
+ ~QQmlApplicationEngine() override;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QList<QObject*> rootObjects(); // ### Qt 6: remove
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h
index 8bc9554a42..19ec3f5d4f 100644
--- a/src/qml/qml/qqmlbinding_p.h
+++ b/src/qml/qml/qqmlbinding_p.h
@@ -79,7 +79,7 @@ public:
QObject *obj, QQmlContextData *ctxt, QV4::ExecutionContext *scope);
static QQmlBinding *createTranslationBinding(QV4::CompiledData::CompilationUnit *unit, const QV4::CompiledData::Binding *binding,
QObject *obj, QQmlContextData *ctxt);
- ~QQmlBinding();
+ ~QQmlBinding() override;
void setTarget(const QQmlProperty &);
void setTarget(QObject *, const QQmlPropertyData &, const QQmlPropertyData *valueType);
diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h
index d3e584fd13..01094a11f7 100644
--- a/src/qml/qml/qqmlboundsignal_p.h
+++ b/src/qml/qml/qqmlboundsignal_p.h
@@ -92,7 +92,7 @@ public:
QQmlEngine *engine() const { return context() ? context()->engine : nullptr; }
private:
- ~QQmlBoundSignalExpression();
+ ~QQmlBoundSignalExpression() override;
void init(QQmlContextData *ctxt, QObject *scope);
diff --git a/src/qml/qml/qqmlcomponent.h b/src/qml/qml/qqmlcomponent.h
index b8cc556e4a..444b3ec46c 100644
--- a/src/qml/qml/qqmlcomponent.h
+++ b/src/qml/qml/qqmlcomponent.h
@@ -83,7 +83,7 @@ public:
QQmlComponent(QQmlEngine *, const QString &fileName, CompilationMode mode, QObject *parent = nullptr);
QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent = nullptr);
QQmlComponent(QQmlEngine *, const QUrl &url, CompilationMode mode, QObject *parent = nullptr);
- virtual ~QQmlComponent();
+ ~QQmlComponent() override;
enum Status { Null, Ready, Loading, Error };
Q_ENUM(Status)
diff --git a/src/qml/qml/qqmlcontext.h b/src/qml/qml/qqmlcontext.h
index 506ae216b2..7ed70c7619 100644
--- a/src/qml/qml/qqmlcontext.h
+++ b/src/qml/qml/qqmlcontext.h
@@ -68,7 +68,7 @@ public:
QQmlContext(QQmlEngine *parent, QObject *objParent = nullptr);
QQmlContext(QQmlContext *parent, QObject *objParent = nullptr);
- virtual ~QQmlContext();
+ ~QQmlContext() override;
bool isValid() const;
diff --git a/src/qml/qml/qqmldelayedcallqueue_p.h b/src/qml/qml/qqmldelayedcallqueue_p.h
index 47e211829c..7962318561 100644
--- a/src/qml/qml/qqmldelayedcallqueue_p.h
+++ b/src/qml/qml/qqmldelayedcallqueue_p.h
@@ -65,7 +65,7 @@ class QQmlDelayedCallQueue : public QObject
Q_OBJECT
public:
QQmlDelayedCallQueue();
- ~QQmlDelayedCallQueue();
+ ~QQmlDelayedCallQueue() override;
void init(QV4::ExecutionEngine *);
diff --git a/src/qml/qml/qqmlengine.h b/src/qml/qml/qqmlengine.h
index 937920e191..73ad2754c8 100644
--- a/src/qml/qml/qqmlengine.h
+++ b/src/qml/qml/qqmlengine.h
@@ -97,7 +97,7 @@ class Q_QML_EXPORT QQmlEngine : public QJSEngine
Q_OBJECT
public:
explicit QQmlEngine(QObject *p = nullptr);
- virtual ~QQmlEngine();
+ ~QQmlEngine() override;
QQmlContext *rootContext() const;
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h
index 2dfbd42e57..d6110c6699 100644
--- a/src/qml/qml/qqmlengine_p.h
+++ b/src/qml/qml/qqmlengine_p.h
@@ -122,7 +122,7 @@ class Q_QML_PRIVATE_EXPORT QQmlEnginePrivate : public QJSEnginePrivate
Q_DECLARE_PUBLIC(QQmlEngine)
public:
QQmlEnginePrivate(QQmlEngine *);
- ~QQmlEnginePrivate();
+ ~QQmlEnginePrivate() override;
void init();
// No mutex protecting baseModulesUninitialized, because use outside QQmlEngine
@@ -341,7 +341,7 @@ void QQmlEnginePrivate::deleteInEngineThread(T *value)
} else {
struct I : public Deletable {
I(T *value) : value(value) {}
- ~I() { delete value; }
+ ~I() override { delete value; }
T *value;
};
I *i = new I(value);
diff --git a/src/qml/qml/qqmlexpression.h b/src/qml/qml/qqmlexpression.h
index e9c8770e92..0eceeb12e1 100644
--- a/src/qml/qml/qqmlexpression.h
+++ b/src/qml/qml/qqmlexpression.h
@@ -62,7 +62,7 @@ public:
QQmlExpression();
QQmlExpression(QQmlContext *, QObject *, const QString &, QObject * = nullptr);
explicit QQmlExpression(const QQmlScriptString &, QQmlContext * = nullptr, QObject * = nullptr, QObject * = nullptr);
- virtual ~QQmlExpression();
+ ~QQmlExpression() override;
QQmlEngine *engine() const;
QQmlContext *context() const;
diff --git a/src/qml/qml/qqmlexpression_p.h b/src/qml/qml/qqmlexpression_p.h
index 55059575e1..da10b31b2c 100644
--- a/src/qml/qml/qqmlexpression_p.h
+++ b/src/qml/qml/qqmlexpression_p.h
@@ -68,7 +68,7 @@ class QQmlExpressionPrivate : public QObjectPrivate,
Q_DECLARE_PUBLIC(QQmlExpression)
public:
QQmlExpressionPrivate();
- ~QQmlExpressionPrivate();
+ ~QQmlExpressionPrivate() override;
void init(QQmlContextData *, const QString &, QObject *);
void init(QQmlContextData *, QV4::Function *runtimeFunction, QObject *);
diff --git a/src/qml/qml/qqmlextensioninterface.h b/src/qml/qml/qqmlextensioninterface.h
index 62b9b26569..c2d20ef0a3 100644
--- a/src/qml/qml/qqmlextensioninterface.h
+++ b/src/qml/qml/qqmlextensioninterface.h
@@ -58,7 +58,7 @@ public:
class Q_QML_EXPORT QQmlExtensionInterface : public QQmlTypesExtensionInterface
{
public:
- virtual ~QQmlExtensionInterface() {}
+ ~QQmlExtensionInterface() override {}
virtual void initializeEngine(QQmlEngine *engine, const char *uri) = 0;
};
diff --git a/src/qml/qml/qqmlextensionplugin.h b/src/qml/qml/qqmlextensionplugin.h
index 84a46fb93e..55e9b89dae 100644
--- a/src/qml/qml/qqmlextensionplugin.h
+++ b/src/qml/qml/qqmlextensionplugin.h
@@ -59,7 +59,7 @@ class Q_QML_EXPORT QQmlExtensionPlugin
Q_INTERFACES(QQmlTypesExtensionInterface)
public:
explicit QQmlExtensionPlugin(QObject *parent = nullptr);
- ~QQmlExtensionPlugin();
+ ~QQmlExtensionPlugin() override;
QUrl baseUrl() const;
diff --git a/src/qml/qml/qqmlfileselector.h b/src/qml/qml/qqmlfileselector.h
index 4eaf92c918..9b70e3936d 100644
--- a/src/qml/qml/qqmlfileselector.h
+++ b/src/qml/qml/qqmlfileselector.h
@@ -55,7 +55,7 @@ class Q_QML_EXPORT QQmlFileSelector : public QObject
Q_DECLARE_PRIVATE(QQmlFileSelector)
public:
explicit QQmlFileSelector(QQmlEngine *engine, QObject *parent = nullptr);
- ~QQmlFileSelector();
+ ~QQmlFileSelector() override;
QFileSelector *selector() const Q_DECL_NOTHROW;
void setSelector(QFileSelector *selector);
void setExtraSelectors(QStringList &strings); // TODO Qt6: remove
diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h
index bb5477dfbf..4905190b75 100644
--- a/src/qml/qml/qqmlopenmetaobject_p.h
+++ b/src/qml/qml/qqmlopenmetaobject_p.h
@@ -69,7 +69,7 @@ class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObjectType : public QQmlRefCount, public
{
public:
QQmlOpenMetaObjectType(const QMetaObject *base, QQmlEngine *engine);
- ~QQmlOpenMetaObjectType();
+ ~QQmlOpenMetaObjectType() override;
void createProperties(const QVector<QByteArray> &names);
int createProperty(const QByteArray &name);
@@ -97,7 +97,7 @@ class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObject : public QAbstractDynamicMetaObjec
public:
QQmlOpenMetaObject(QObject *, const QMetaObject * = nullptr, bool = true);
QQmlOpenMetaObject(QObject *, QQmlOpenMetaObjectType *, bool = true);
- ~QQmlOpenMetaObject();
+ ~QQmlOpenMetaObject() override;
QVariant value(const QByteArray &) const;
bool setValue(const QByteArray &, const QVariant &);
diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h
index 11adea6fc9..fabdcacc36 100644
--- a/src/qml/qml/qqmlprivate.h
+++ b/src/qml/qml/qqmlprivate.h
@@ -98,7 +98,7 @@ namespace QQmlPrivate
class QQmlElement : public T
{
public:
- virtual ~QQmlElement() {
+ ~QQmlElement() override {
QQmlPrivate::qdeclarativeelement_destructor(this);
}
};
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 7b04ba11b8..51a191a41f 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -394,7 +394,7 @@ class Q_QML_PRIVATE_EXPORT QQmlPropertyCache : public QQmlRefCount
public:
QQmlPropertyCache();
QQmlPropertyCache(const QMetaObject *);
- virtual ~QQmlPropertyCache();
+ ~QQmlPropertyCache() override;
void update(const QMetaObject *);
void invalidate(const QMetaObject *);
diff --git a/src/qml/qml/qqmltypeloader.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;
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h
index f2327e9a5f..713f707387 100644
--- a/src/qml/qml/qqmltypeloader_p.h
+++ b/src/qml/qml/qqmltypeloader_p.h
@@ -110,7 +110,7 @@ public:
};
QQmlDataBlob(const QUrl &, Type, QQmlTypeLoader* manager);
- virtual ~QQmlDataBlob();
+ ~QQmlDataBlob() override;
void startLoading();
@@ -262,7 +262,7 @@ public:
{
public:
Blob(const QUrl &url, QQmlDataBlob::Type type, QQmlTypeLoader *loader);
- ~Blob();
+ ~Blob() override;
const QQmlImports &imports() const { return m_importCache; }
@@ -438,7 +438,7 @@ private:
QQmlTypeData(const QUrl &, QQmlTypeLoader *);
public:
- ~QQmlTypeData();
+ ~QQmlTypeData() override;
const QList<ScriptReference> &resolvedScripts() const;
@@ -523,7 +523,7 @@ private:
QQmlScriptData();
public:
- ~QQmlScriptData();
+ ~QQmlScriptData() override;
QUrl url;
QString urlString;
@@ -554,7 +554,7 @@ private:
QQmlScriptBlob(const QUrl &, QQmlTypeLoader *);
public:
- ~QQmlScriptBlob();
+ ~QQmlScriptBlob() override;
struct ScriptReference
{
diff --git a/src/qml/qml/qqmltypenamecache_p.h b/src/qml/qml/qqmltypenamecache_p.h
index c2f7a70d03..28b5e7f0ad 100644
--- a/src/qml/qml/qqmltypenamecache_p.h
+++ b/src/qml/qml/qqmltypenamecache_p.h
@@ -85,7 +85,7 @@ class Q_QML_PRIVATE_EXPORT QQmlTypeNameCache : public QQmlRefCount
{
public:
QQmlTypeNameCache(const QQmlImports &imports);
- virtual ~QQmlTypeNameCache();
+ ~QQmlTypeNameCache() override;
inline bool isEmpty() const;
diff --git a/src/qml/qml/qqmlvaluetype_p.h b/src/qml/qml/qqmlvaluetype_p.h
index 7d8473db0e..4ea71e8955 100644
--- a/src/qml/qml/qqmlvaluetype_p.h
+++ b/src/qml/qml/qqmlvaluetype_p.h
@@ -67,7 +67,7 @@ class Q_QML_PRIVATE_EXPORT QQmlValueType : public QObject, public QAbstractDynam
{
public:
QQmlValueType(int userType, const QMetaObject *metaObject);
- ~QQmlValueType();
+ ~QQmlValueType() override;
void read(QObject *, int);
void write(QObject *, int, QQmlPropertyData::WriteFlags flags);
QVariant value();
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h
index 1da79b8a81..0c82686d47 100644
--- a/src/qml/qml/qqmlvmemetaobject_p.h
+++ b/src/qml/qml/qqmlvmemetaobject_p.h
@@ -81,7 +81,7 @@ class QQmlVMEVariantQObjectPtr : public QQmlGuard<QObject>
{
public:
inline QQmlVMEVariantQObjectPtr();
- inline ~QQmlVMEVariantQObjectPtr();
+ inline ~QQmlVMEVariantQObjectPtr() override;
inline void objectDestroyed(QObject *) override;
inline void setGuardedValue(QObject *obj, QQmlVMEMetaObject *target, int index);
@@ -95,7 +95,7 @@ class Q_QML_PRIVATE_EXPORT QQmlInterceptorMetaObject : public QAbstractDynamicMe
{
public:
QQmlInterceptorMetaObject(QObject *obj, QQmlPropertyCache *cache);
- ~QQmlInterceptorMetaObject();
+ ~QQmlInterceptorMetaObject() override;
void registerInterceptor(QQmlPropertyIndex index, QQmlPropertyValueInterceptor *interceptor);
@@ -147,7 +147,7 @@ class Q_QML_PRIVATE_EXPORT QQmlVMEMetaObject : public QQmlInterceptorMetaObject
{
public:
QQmlVMEMetaObject(QV4::ExecutionEngine *engine, QObject *obj, QQmlPropertyCache *cache, QV4::CompiledData::CompilationUnit *qmlCompilationUnit, int qmlObjectId);
- ~QQmlVMEMetaObject();
+ ~QQmlVMEMetaObject() override;
bool aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const;
QV4::ReturnedValue vmeMethod(int index) const;
diff --git a/src/qml/util/qqmlpropertymap.h b/src/qml/util/qqmlpropertymap.h
index 3930ac00a8..cb7ada3d79 100644
--- a/src/qml/util/qqmlpropertymap.h
+++ b/src/qml/util/qqmlpropertymap.h
@@ -56,7 +56,7 @@ class Q_QML_EXPORT QQmlPropertyMap : public QObject
Q_OBJECT
public:
explicit QQmlPropertyMap(QObject *parent = nullptr);
- virtual ~QQmlPropertyMap();
+ ~QQmlPropertyMap() override;
QVariant value(const QString &key) const;
void insert(const QString &key, const QVariant &value);
diff --git a/src/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<void *>(this), static_cast<const void *>(&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<void *>(this), static_cast<const void *>(&other), sizeof(QQmlProfilerEvent));
other.m_dataType = Inline8Bit;
}
return *this;
diff --git a/src/qmltest/doc/qtqmltest.qdocconf b/src/qmltest/doc/qtqmltest.qdocconf
index e51007d2b2..33e8ae334c 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
+moduleheader = QtQuickTest
+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/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/doc/images/animatedsprite-loading-frames.png b/src/quick/doc/images/animatedsprite-loading-frames.png
new file mode 100644
index 0000000000..924e7f0bac
--- /dev/null
+++ b/src/quick/doc/images/animatedsprite-loading-frames.png
Binary files 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
--- /dev/null
+++ b/src/quick/doc/images/animatedsprite-loading-interpolated.gif
Binary files 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
--- /dev/null
+++ b/src/quick/doc/images/animatedsprite-loading.gif
Binary files 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
--- /dev/null
+++ b/src/quick/doc/images/animatedsprite-loading.png
Binary files differ
diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf
index c03952735a..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 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
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]
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
*/
diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp
index a4c3d3dfb1..041780257a 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
@@ -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;
@@ -214,23 +216,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/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/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index a1b4f961ed..902ff0df10 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,39 +209,53 @@ 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
- 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)
{
@@ -253,7 +267,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,
@@ -296,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 {
@@ -334,27 +352,27 @@ 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
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
*/
/*!
- \qmlproperty real TapHandler::timeHeld
+ \qmlproperty real QtQuick::TapHandler::timeHeld
\readonly
The amount of time in seconds that a pressed point has been held, without
@@ -368,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:
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/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp
index 5234ee65cb..c5d36297a4 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}
*/
/*!
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index e430832fe7..c4f0b60d92 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; }
@@ -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<Capabilities>(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<qint16>(caps))
+ , m_maximumTouchPoints(static_cast<qint8>(maxPoints)), m_buttonCount(static_cast<qint8>(buttonCount)), m_name(name)
, m_uniqueId(QPointingDeviceUniqueId::fromNumericId(uniqueId))
{
}
- ~QQuickPointerDevice() { }
+ ~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<QQuickPointerHandler *> m_eventDeliveryTargets; // during delivery, handlers which have already seen the event
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 3a88c49e8d..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
@@ -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);
@@ -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,25 +7624,25 @@ 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();
}
-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<QQuickItem *>(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,9 +7667,9 @@ void QQuickItem::setContainsMask(QObject *mask)
quickMask = qobject_cast<QQuickItem *>(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 containsMaskChanged();
+ emit containmentMaskChanged();
}
/*!
diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h
index e38c276b9f..cfdb2ad5b7 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 *);
@@ -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 setContainmentMask NOTIFY containmentMaskChanged REVISION 11)
Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQuickItemLayer *layer READ layer DESIGNABLE false CONSTANT FINAL)
@@ -198,7 +198,7 @@ public:
Q_ENUM(TransformOrigin)
explicit QQuickItem(QQuickItem *parent = nullptr);
- virtual ~QQuickItem();
+ ~QQuickItem() override;
QQuickWindow *window() const;
QQuickItem *parentItem() const;
@@ -321,8 +321,8 @@ public:
QSharedPointer<QQuickItemGrabResult> grabToImage(const QSize &targetSize = QSize());
Q_INVOKABLE virtual bool contains(const QPointF &point) const;
- QObject *containsMask() const;
- void setContainsMask(QObject *mask);
+ QObject *containmentMask() const;
+ void setContainmentMask(QObject *mask);
QTransform itemTransform(QQuickItem *, bool *) const;
QPointF mapToItem(const QQuickItem *item, const QPointF &point) 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;
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h
index 1a3be437af..93287cf0aa 100644
--- a/src/quick/items/qquickitem_p.h
+++ b/src/quick/items/qquickitem_p.h
@@ -93,7 +93,7 @@ class QQuickContents : public QQuickItemChangeListener
{
public:
QQuickContents(QQuickItem *item);
- ~QQuickContents();
+ ~QQuickContents() override;
QRectF rectF() const { return m_contents; }
@@ -154,7 +154,7 @@ class QQuickItemLayer : public QObject, public QQuickItemChangeListener
public:
QQuickItemLayer(QQuickItem *item);
- ~QQuickItemLayer();
+ ~QQuickItemLayer() override;
void classBegin();
void componentComplete();
@@ -255,7 +255,7 @@ public:
static const QQuickItemPrivate* get(const QQuickItem *item) { return item->d_func(); }
QQuickItemPrivate();
- ~QQuickItemPrivate();
+ ~QQuickItemPrivate() override;
void init(QQuickItem *parent);
QQmlListProperty<QObject> data();
@@ -390,7 +390,7 @@ public:
// Contains mask
QPointer<QObject> 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;
@@ -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.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)
diff --git a/src/quick/items/qquickpainteditem.h b/src/quick/items/qquickpainteditem.h
index 66a0ea83c9..b057f4295d 100644
--- a/src/quick/items/qquickpainteditem.h
+++ b/src/quick/items/qquickpainteditem.h
@@ -58,7 +58,7 @@ class Q_QUICK_EXPORT QQuickPaintedItem : public QQuickItem
public:
explicit QQuickPaintedItem(QQuickItem *parent = nullptr);
- virtual ~QQuickPaintedItem();
+ ~QQuickPaintedItem() override;
enum RenderTarget {
Image,
diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h
index 636f8c5db6..c07ad835fb 100644
--- a/src/quick/items/qquickrectangle_p.h
+++ b/src/quick/items/qquickrectangle_p.h
@@ -123,7 +123,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickGradient : public QObject
public:
QQuickGradient(QObject *parent=nullptr);
- ~QQuickGradient();
+ ~QQuickGradient() override;
QQmlListProperty<QQuickGradientStop> stops();
diff --git a/src/quick/items/qquickrendercontrol.h b/src/quick/items/qquickrendercontrol.h
index a626216f84..8ec9b8aafc 100644
--- a/src/quick/items/qquickrendercontrol.h
+++ b/src/quick/items/qquickrendercontrol.h
@@ -56,7 +56,7 @@ class Q_QUICK_EXPORT QQuickRenderControl : public QObject
public:
explicit QQuickRenderControl(QObject *parent = nullptr);
- ~QQuickRenderControl();
+ ~QQuickRenderControl() override;
void prepareThread(QThread *targetThread);
void initialize(QOpenGLContext *gl);
diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h
index f70550f284..d5bb33902a 100644
--- a/src/quick/items/qquickshadereffectsource_p.h
+++ b/src/quick/items/qquickshadereffectsource_p.h
@@ -114,7 +114,7 @@ public:
Q_ENUM(TextureMirroring)
QQuickShaderEffectSource(QQuickItem *parent = nullptr);
- ~QQuickShaderEffectSource();
+ ~QQuickShaderEffectSource() override;
WrapMode wrapMode() const;
void setWrapMode(WrapMode mode);
diff --git a/src/quick/items/qquicksprite_p.h b/src/quick/items/qquicksprite_p.h
index 19cbc416ca..8e119a80a9 100644
--- a/src/quick/items/qquicksprite_p.h
+++ b/src/quick/items/qquicksprite_p.h
@@ -89,7 +89,7 @@ class Q_QUICK_EXPORT QQuickSprite : public QQuickStochasticState
public:
explicit QQuickSprite(QObject *parent = nullptr);
- ~QQuickSprite();
+ ~QQuickSprite() override;
QUrl source() const
{
diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h
index d6d22b05d8..da917683b6 100644
--- a/src/quick/items/qquickspriteengine_p.h
+++ b/src/quick/items/qquickspriteengine_p.h
@@ -192,7 +192,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickStochasticEngine : public QObject
public:
explicit QQuickStochasticEngine(QObject *parent = nullptr);
QQuickStochasticEngine(const QList<QQuickStochasticState*> &states, QObject *parent = nullptr);
- ~QQuickStochasticEngine();
+ ~QQuickStochasticEngine() override;
QQmlListProperty<QQuickStochasticState> states()
{
@@ -269,7 +269,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickSpriteEngine : public QQuickStochasticEngine
public:
explicit QQuickSpriteEngine(QObject *parent = nullptr);
QQuickSpriteEngine(const QList<QQuickSprite*> &sprites, QObject *parent = nullptr);
- ~QQuickSpriteEngine();
+ ~QQuickSpriteEngine() override;
QQmlListProperty<QQuickSprite> sprites()
{
return QQmlListProperty<QQuickSprite>(this, m_sprites);
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h
index 039ede2bad..15e989c13d 100644
--- a/src/quick/items/qquicktext_p.h
+++ b/src/quick/items/qquicktext_p.h
@@ -103,7 +103,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickText : public QQuickImplicitSizeItem
public:
QQuickText(QQuickItem *parent=nullptr);
- ~QQuickText();
+ ~QQuickText() override;
enum HAlignment { AlignLeft = Qt::AlignLeft,
AlignRight = Qt::AlignRight,
diff --git a/src/quick/items/qquickview.h b/src/quick/items/qquickview.h
index 006a691387..ecae25e90b 100644
--- a/src/quick/items/qquickview.h
+++ b/src/quick/items/qquickview.h
@@ -63,7 +63,7 @@ public:
QQuickView(QQmlEngine* engine, QWindow *parent);
explicit QQuickView(const QUrl &source, QWindow *parent = nullptr);
QQuickView(const QUrl &source, QQuickRenderControl *renderControl);
- virtual ~QQuickView();
+ ~QQuickView() override;
QUrl source() const;
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h
index 53e0581fbb..817178fdac 100644
--- a/src/quick/items/qquickwindow.h
+++ b/src/quick/items/qquickwindow.h
@@ -110,7 +110,7 @@ public:
explicit QQuickWindow(QWindow *parent = nullptr);
explicit QQuickWindow(QQuickRenderControl *renderControl);
- virtual ~QQuickWindow();
+ ~QQuickWindow() override;
QQuickItem *contentItem() const;
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index cd5ff31994..b5e3a2c1eb 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -114,7 +114,7 @@ public:
static inline QQuickWindowPrivate *get(QQuickWindow *c) { return c->d_func(); }
QQuickWindowPrivate();
- virtual ~QQuickWindowPrivate();
+ ~QQuickWindowPrivate() override;
void init(QQuickWindow *, QQuickRenderControl *control = nullptr);
diff --git a/src/quick/scenegraph/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<quint16>(rawData + 8), qFromBigEndian<quint16>(rawData + 10));
- texData->dataLength = (paddedSize.width() / 4) * (paddedSize.height() / 4) * 8;
- */
+ texData->dataLength = (paddedSize.width() / 4) * (paddedSize.height() / 4) * bpb;
QSize texSize(qFromBigEndian<quint16>(rawData + 12), qFromBigEndian<quint16>(rawData + 14));
texData->size = texSize;
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/coreapi/qsgabstractrenderer.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
index 304dc008d5..ab6fb4f317 100644
--- a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
+++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
@@ -62,7 +62,7 @@ public:
};
Q_DECLARE_FLAGS(ClearMode, ClearModeBit)
- virtual ~QSGAbstractRenderer();
+ ~QSGAbstractRenderer() override;
void setRootNode(QSGRootNode *node);
QSGRootNode *rootNode() const;
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h
index 528f100f8e..854e284c9e 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.h
+++ b/src/quick/scenegraph/coreapi/qsgnode.h
@@ -190,7 +190,7 @@ void Q_QUICK_EXPORT qsgnode_set_description(QSGNode *node, const QString &descri
class Q_QUICK_EXPORT QSGBasicGeometryNode : public QSGNode
{
public:
- ~QSGBasicGeometryNode();
+ ~QSGBasicGeometryNode() override;
void setGeometry(QSGGeometry *geometry);
const QSGGeometry *geometry() const { return m_geometry; }
@@ -224,7 +224,7 @@ class Q_QUICK_EXPORT QSGGeometryNode : public QSGBasicGeometryNode
{
public:
QSGGeometryNode();
- ~QSGGeometryNode();
+ ~QSGGeometryNode() override;
void setMaterial(QSGMaterial *material);
QSGMaterial *material() const { return m_material; }
@@ -257,7 +257,7 @@ class Q_QUICK_EXPORT QSGClipNode : public QSGBasicGeometryNode
{
public:
QSGClipNode();
- ~QSGClipNode();
+ ~QSGClipNode() override;
void setIsRectangular(bool rectHint);
bool isRectangular() const { return m_is_rectangular; }
@@ -277,7 +277,7 @@ class Q_QUICK_EXPORT QSGTransformNode : public QSGNode
{
public:
QSGTransformNode();
- ~QSGTransformNode();
+ ~QSGTransformNode() override;
void setMatrix(const QMatrix4x4 &matrix);
const QMatrix4x4 &matrix() const { return m_matrix; }
@@ -295,7 +295,7 @@ class Q_QUICK_EXPORT QSGRootNode : public QSGNode
{
public:
QSGRootNode();
- ~QSGRootNode();
+ ~QSGRootNode() override;
private:
void notifyNodeChange(QSGNode *node, DirtyState state);
@@ -312,7 +312,7 @@ class Q_QUICK_EXPORT QSGOpacityNode : public QSGNode
{
public:
QSGOpacityNode();
- ~QSGOpacityNode();
+ ~QSGOpacityNode() override;
void setOpacity(qreal opacity);
qreal opacity() const { return m_opacity; }
diff --git a/src/quick/scenegraph/coreapi/qsgrendernode.h b/src/quick/scenegraph/coreapi/qsgrendernode.h
index f6bc40d3ee..0fb83b080c 100644
--- a/src/quick/scenegraph/coreapi/qsgrendernode.h
+++ b/src/quick/scenegraph/coreapi/qsgrendernode.h
@@ -80,7 +80,7 @@ public:
};
QSGRenderNode();
- ~QSGRenderNode();
+ ~QSGRenderNode() override;
virtual StateFlags changedStates() const;
virtual void render(const RenderState *state) = 0;
diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h
index 00c23be60c..6d70d7ef6b 100644
--- a/src/quick/scenegraph/qsgcontext_p.h
+++ b/src/quick/scenegraph/qsgcontext_p.h
@@ -111,7 +111,7 @@ public:
};
explicit QSGContext(QObject *parent = nullptr);
- virtual ~QSGContext();
+ ~QSGContext() override;
virtual void renderContextInitialized(QSGRenderContext *renderContext);
virtual void renderContextInvalidated(QSGRenderContext *renderContext);
@@ -159,7 +159,7 @@ public:
};
QSGRenderContext(QSGContext *context);
- virtual ~QSGRenderContext();
+ ~QSGRenderContext() override;
QSGContext *sceneGraphContext() const { return m_sg; }
virtual bool isValid() const { return true; }
diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h
index 514e6e8c2b..e9e01dc710 100644
--- a/src/quick/scenegraph/util/qsgengine.h
+++ b/src/quick/scenegraph/util/qsgengine.h
@@ -68,7 +68,7 @@ public:
Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption)
explicit QSGEngine(QObject *parent = nullptr);
- ~QSGEngine();
+ ~QSGEngine() override;
void initialize(QOpenGLContext *context);
void invalidate();
diff --git a/src/quick/scenegraph/util/qsgimagenode.h b/src/quick/scenegraph/util/qsgimagenode.h
index 0e053c307f..526f52b7e5 100644
--- a/src/quick/scenegraph/util/qsgimagenode.h
+++ b/src/quick/scenegraph/util/qsgimagenode.h
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
class Q_QUICK_EXPORT QSGImageNode : public QSGGeometryNode
{
public:
- virtual ~QSGImageNode() { }
+ ~QSGImageNode() override { }
virtual void setRect(const QRectF &rect) = 0;
inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); }
diff --git a/src/quick/scenegraph/util/qsgninepatchnode.h b/src/quick/scenegraph/util/qsgninepatchnode.h
index 8509cbd326..e76afd3c4a 100644
--- a/src/quick/scenegraph/util/qsgninepatchnode.h
+++ b/src/quick/scenegraph/util/qsgninepatchnode.h
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
class Q_QUICK_EXPORT QSGNinePatchNode : public QSGGeometryNode
{
public:
- virtual ~QSGNinePatchNode() { }
+ ~QSGNinePatchNode() override { }
virtual void setTexture(QSGTexture *texture) = 0;
virtual void setBounds(const QRectF &bounds) = 0;
diff --git a/src/quick/scenegraph/util/qsgrectanglenode.h b/src/quick/scenegraph/util/qsgrectanglenode.h
index 8e0da1d9c7..ba52b65b07 100644
--- a/src/quick/scenegraph/util/qsgrectanglenode.h
+++ b/src/quick/scenegraph/util/qsgrectanglenode.h
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class Q_QUICK_EXPORT QSGRectangleNode : public QSGGeometryNode
{
public:
- virtual ~QSGRectangleNode() { }
+ ~QSGRectangleNode() override { }
virtual void setRect(const QRectF &rect) = 0;
inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); }
diff --git a/src/quick/scenegraph/util/qsgsimplematerial.h b/src/quick/scenegraph/util/qsgsimplematerial.h
index dcf9b89b21..79180ca8e2 100644
--- a/src/quick/scenegraph/util/qsgsimplematerial.h
+++ b/src/quick/scenegraph/util/qsgsimplematerial.h
@@ -185,7 +185,7 @@ public:
QSGSimpleMaterialComparableMaterial(PtrShaderCreateFunc func)
: QSGSimpleMaterial<State>(func) {}
- int compare(const QSGMaterial *other) const {
+ int compare(const QSGMaterial *other) const override {
return QSGSimpleMaterialComparableMaterial<State>::state()->compare(static_cast<const QSGSimpleMaterialComparableMaterial<State> *>(other)->state());
}
};
diff --git a/src/quick/scenegraph/util/qsgsimpletexturenode.h b/src/quick/scenegraph/util/qsgsimpletexturenode.h
index 09e4277c66..010463d3c6 100644
--- a/src/quick/scenegraph/util/qsgsimpletexturenode.h
+++ b/src/quick/scenegraph/util/qsgsimpletexturenode.h
@@ -52,7 +52,7 @@ class Q_QUICK_EXPORT QSGSimpleTextureNode : public QSGGeometryNode
{
public:
QSGSimpleTextureNode();
- ~QSGSimpleTextureNode();
+ ~QSGSimpleTextureNode() override;
void setRect(const QRectF &rect);
inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); }
diff --git a/src/quick/scenegraph/util/qsgtexture.h b/src/quick/scenegraph/util/qsgtexture.h
index 032129434e..7bd57a16e3 100644
--- a/src/quick/scenegraph/util/qsgtexture.h
+++ b/src/quick/scenegraph/util/qsgtexture.h
@@ -54,7 +54,7 @@ class Q_QUICK_EXPORT QSGTexture : public QObject
public:
QSGTexture();
- ~QSGTexture();
+ ~QSGTexture() override;
enum WrapMode {
Repeat,
diff --git a/src/quick/scenegraph/util/qsgtexture_p.h b/src/quick/scenegraph/util/qsgtexture_p.h
index 52dc6db2d0..18dd5eff68 100644
--- a/src/quick/scenegraph/util/qsgtexture_p.h
+++ b/src/quick/scenegraph/util/qsgtexture_p.h
@@ -83,7 +83,7 @@ class Q_QUICK_PRIVATE_EXPORT QSGPlainTexture : public QSGTexture
Q_OBJECT
public:
QSGPlainTexture();
- virtual ~QSGPlainTexture();
+ ~QSGPlainTexture() override;
void setOwnsTexture(bool owns) { m_owns_texture = owns; }
bool ownsTexture() const { return m_owns_texture; }
diff --git a/src/quick/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();
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<QVariantAnimation::Interpolator>(&_q_interpolateClockwiseRotation);
+ d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(reinterpret_cast<void *>(&_q_interpolateClockwiseRotation));
break;
case Counterclockwise:
- d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(&_q_interpolateCounterclockwiseRotation);
+ d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(reinterpret_cast<void *>(&_q_interpolateCounterclockwiseRotation));
break;
case Shortest:
- d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(&_q_interpolateShortestRotation);
+ d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(reinterpret_cast<void *>(&_q_interpolateShortestRotation));
break;
default:
d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType);
diff --git a/src/quick/util/qquickanimation_p.h b/src/quick/util/qquickanimation_p.h
index d1f460fef7..2293f2597f 100644
--- a/src/quick/util/qquickanimation_p.h
+++ b/src/quick/util/qquickanimation_p.h
@@ -88,7 +88,7 @@ public:
};
QQuickAbstractAnimation(QObject *parent=nullptr);
- virtual ~QQuickAbstractAnimation();
+ ~QQuickAbstractAnimation() override;
enum Loops { Infinite = -2 };
Q_ENUM(Loops)
@@ -167,7 +167,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPauseAnimation : public QQuickAbstractAnimati
public:
QQuickPauseAnimation(QObject *parent=nullptr);
- virtual ~QQuickPauseAnimation();
+ ~QQuickPauseAnimation() override;
int duration() const;
void setDuration(int);
@@ -193,7 +193,7 @@ class QQuickScriptAction : public QQuickAbstractAnimation
public:
QQuickScriptAction(QObject *parent=nullptr);
- virtual ~QQuickScriptAction();
+ ~QQuickScriptAction() override;
QQmlScriptString script() const;
void setScript(const QQmlScriptString &);
@@ -223,7 +223,7 @@ class QQuickPropertyAction : public QQuickAbstractAnimation
public:
QQuickPropertyAction(QObject *parent=nullptr);
- virtual ~QQuickPropertyAction();
+ ~QQuickPropertyAction() override;
QObject *target() const;
void setTargetObject(QObject *);
@@ -271,7 +271,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPropertyAnimation : public QQuickAbstractAnim
public:
QQuickPropertyAnimation(QObject *parent=nullptr);
- virtual ~QQuickPropertyAnimation();
+ ~QQuickPropertyAnimation() override;
virtual int duration() const;
virtual void setDuration(int);
@@ -326,7 +326,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickColorAnimation : public QQuickPropertyAnimati
public:
QQuickColorAnimation(QObject *parent=nullptr);
- virtual ~QQuickColorAnimation();
+ ~QQuickColorAnimation() override;
QColor from() const;
void setFrom(const QColor &);
@@ -345,7 +345,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickNumberAnimation : public QQuickPropertyAnimat
public:
QQuickNumberAnimation(QObject *parent=nullptr);
- virtual ~QQuickNumberAnimation();
+ ~QQuickNumberAnimation() override;
qreal from() const;
void setFrom(qreal);
@@ -370,7 +370,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickVector3dAnimation : public QQuickPropertyAnim
public:
QQuickVector3dAnimation(QObject *parent=nullptr);
- virtual ~QQuickVector3dAnimation();
+ ~QQuickVector3dAnimation() override;
QVector3D from() const;
void setFrom(QVector3D);
@@ -391,7 +391,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickRotationAnimation : public QQuickPropertyAnim
public:
QQuickRotationAnimation(QObject *parent=nullptr);
- virtual ~QQuickRotationAnimation();
+ ~QQuickRotationAnimation() override;
qreal from() const;
void setFrom(qreal);
@@ -419,7 +419,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickAnimationGroup : public QQuickAbstractAnimati
public:
QQuickAnimationGroup(QObject *parent);
- virtual ~QQuickAnimationGroup();
+ ~QQuickAnimationGroup() override;
QQmlListProperty<QQuickAbstractAnimation> animations();
friend class QQuickAbstractAnimation;
@@ -435,7 +435,7 @@ class QQuickSequentialAnimation : public QQuickAnimationGroup
public:
QQuickSequentialAnimation(QObject *parent=nullptr);
- virtual ~QQuickSequentialAnimation();
+ ~QQuickSequentialAnimation() override;
protected:
ThreadingModel threadingModel() const override;
@@ -452,7 +452,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickParallelAnimation : public QQuickAnimationGro
public:
QQuickParallelAnimation(QObject *parent=nullptr);
- virtual ~QQuickParallelAnimation();
+ ~QQuickParallelAnimation() override;
protected:
ThreadingModel threadingModel() const override;
diff --git a/src/quick/util/qquickanimation_p_p.h b/src/quick/util/qquickanimation_p_p.h
index 304258cde1..c20ec65c24 100644
--- a/src/quick/util/qquickanimation_p_p.h
+++ b/src/quick/util/qquickanimation_p_p.h
@@ -102,7 +102,7 @@ public:
QActionAnimation();
QActionAnimation(QAbstractAnimationAction *action);
- ~QActionAnimation();
+ ~QActionAnimation() override;
int duration() const override;
void setAnimAction(QAbstractAnimationAction *action);
@@ -130,7 +130,7 @@ class Q_AUTOTEST_EXPORT QQuickBulkValueAnimator : public QAbstractAnimationJob
Q_DISABLE_COPY(QQuickBulkValueAnimator)
public:
QQuickBulkValueAnimator();
- ~QQuickBulkValueAnimator();
+ ~QQuickBulkValueAnimator() override;
void setAnimValue(QQuickBulkValueUpdater *value);
QQuickBulkValueUpdater *getAnimValue() const { return animValue; }
@@ -307,7 +307,7 @@ class Q_AUTOTEST_EXPORT QQuickAnimationPropertyUpdater : public QQuickBulkValueU
{
public:
QQuickAnimationPropertyUpdater() : interpolatorType(0), interpolator(nullptr), prevInterpolatorType(0), reverse(false), fromSourced(false), fromDefined(false), wasDeleted(nullptr) {}
- ~QQuickAnimationPropertyUpdater();
+ ~QQuickAnimationPropertyUpdater() override;
void setValue(qreal v) override;
diff --git a/src/quick/util/qquickimageprovider.h b/src/quick/util/qquickimageprovider.h
index 4451105782..4f8193789a 100644
--- a/src/quick/util/qquickimageprovider.h
+++ b/src/quick/util/qquickimageprovider.h
@@ -59,7 +59,7 @@ class Q_QUICK_EXPORT QQuickTextureFactory : public QObject
Q_OBJECT
public:
QQuickTextureFactory();
- virtual ~QQuickTextureFactory();
+ ~QQuickTextureFactory() override;
virtual QSGTexture *createTexture(QQuickWindow *window) const = 0;
virtual QSize textureSize() const = 0;
@@ -74,7 +74,7 @@ class Q_QUICK_EXPORT QQuickImageResponse : public QObject
Q_OBJECT
public:
QQuickImageResponse();
- virtual ~QQuickImageResponse();
+ ~QQuickImageResponse() override;
virtual QQuickTextureFactory *textureFactory() const = 0;
virtual QString errorString() const;
@@ -91,7 +91,7 @@ class Q_QUICK_EXPORT QQuickImageProvider : public QQmlImageProviderBase
friend class QQuickImageProviderWithOptions; // ### Qt 6 Remove
public:
QQuickImageProvider(ImageType type, Flags flags = Flags());
- virtual ~QQuickImageProvider();
+ ~QQuickImageProvider() override;
ImageType imageType() const override;
Flags flags() const override;
@@ -114,7 +114,7 @@ class Q_QUICK_EXPORT QQuickAsyncImageProvider : public QQuickImageProvider
{
public:
QQuickAsyncImageProvider();
- virtual ~QQuickAsyncImageProvider();
+ ~QQuickAsyncImageProvider() override;
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options) = 0;
diff --git a/src/quick/util/qquickpath_p.h b/src/quick/util/qquickpath_p.h
index f8b67ef945..6b9a40fe6d 100644
--- a/src/quick/util/qquickpath_p.h
+++ b/src/quick/util/qquickpath_p.h
@@ -449,7 +449,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPath : public QObject, public QQmlParserStatu
Q_INTERFACES(QQmlParserStatus)
public:
QQuickPath(QObject *parent=nullptr);
- ~QQuickPath();
+ ~QQuickPath() override;
QQmlListProperty<QQuickPathElement> pathElements();
diff --git a/src/quick/util/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<QByteArray> &list)
return res;
}
+class BackendSupport
+{
+public:
+ BackendSupport()
+ {
+ delete QSGContext::createTextureFactoryFromImage(QImage()); // Force init of backend data
+ hasOpenGL = QQuickWindow::sceneGraphBackend().isEmpty(); // i.e. default
+ QList<QByteArray> 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;
diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h
index be198f2df8..28b058c2e8 100644
--- a/src/quick/util/qquickprofiler_p.h
+++ b/src/quick/util/qquickprofiler_p.h
@@ -333,7 +333,7 @@ public:
static void initialize(QObject *parent);
- virtual ~QQuickProfiler();
+ ~QQuickProfiler() override;
signals:
void dataReady(const QVector<QQuickProfilerData> &data);
diff --git a/src/quick/util/qquickstate_p.h b/src/quick/util/qquickstate_p.h
index 89af5882df..79874ee78e 100644
--- a/src/quick/util/qquickstate_p.h
+++ b/src/quick/util/qquickstate_p.h
@@ -160,7 +160,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickState : public QObject
public:
QQuickState(QObject *parent=nullptr);
- virtual ~QQuickState();
+ ~QQuickState() override;
QString name() const;
void setName(const QString &);
diff --git a/src/quickwidgets/qquickwidget.h b/src/quickwidgets/qquickwidget.h
index 8c9382e84b..3ddb0613ad 100644
--- a/src/quickwidgets/qquickwidget.h
+++ b/src/quickwidgets/qquickwidget.h
@@ -66,7 +66,7 @@ public:
explicit QQuickWidget(QWidget *parent = nullptr);
QQuickWidget(QQmlEngine* engine, QWidget *parent);
explicit QQuickWidget(const QUrl &source, QWidget *parent = nullptr);
- virtual ~QQuickWidget();
+ ~QQuickWidget() override;
QUrl source() const;