aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/fbitem.h8
-rw-r--r--examples/quick/rendercontrol/window_multithreaded.cpp4
-rw-r--r--examples/quick/rendercontrol/window_multithreaded.h12
-rw-r--r--examples/quick/rendercontrol/window_singlethreaded.cpp2
-rw-r--r--examples/quick/rendercontrol/window_singlethreaded.h8
-rw-r--r--src/3rdparty/masm/masm-defs.pri1
-rw-r--r--src/3rdparty/masm/stubs/WTFStubs.cpp5
-rw-r--r--src/imports/folderlistmodel/plugin.cpp2
-rw-r--r--src/imports/handlers/plugin.cpp2
-rw-r--r--src/imports/layouts/plugin.cpp2
-rw-r--r--src/imports/layouts/qquicklayout_p.h18
-rw-r--r--src/imports/layouts/qquicklayoutstyleinfo_p.h6
-rw-r--r--src/imports/layouts/qquicklinearlayout_p.h22
-rw-r--r--src/imports/layouts/qquickstacklayout_p.h16
-rw-r--r--src/imports/localstorage/plugin.cpp2
-rw-r--r--src/imports/models/plugin.cpp2
-rw-r--r--src/imports/particles/plugin.cpp2
-rw-r--r--src/imports/qtquick2/plugin.cpp2
-rw-r--r--src/imports/settings/plugin.cpp2
-rw-r--r--src/imports/shapes/plugin.cpp2
-rw-r--r--src/imports/statemachine/plugin.cpp2
-rw-r--r--src/imports/statemachine/signaltransition.h12
-rw-r--r--src/imports/testlib/main.cpp2
-rw-r--r--src/imports/window/plugin.cpp2
-rw-r--r--src/imports/xmllistmodel/plugin.cpp2
-rw-r--r--src/plugins/qmltooling/packetprotocol/packetprotocol.pro3
-rw-r--r--src/plugins/qmltooling/packetprotocol/qqmldebugpacket_p.h (renamed from src/plugins/qmltooling/shared/qqmldebugpacket.h)3
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro5
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h10
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugger.h10
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h14
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro3
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_local/qlocalclientconnectionfactory.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_local/qmldbg_local.pro7
-rw-r--r--src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp3
-rw-r--r--src/plugins/qmltooling/qmldbg_messages/qmldbg_messages.pro4
-rw-r--r--src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro4
-rw-r--r--src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.h18
-rw-r--r--src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro4
-rw-r--r--src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp12
-rw-r--r--src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.h10
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qmldbg_profiler.pro5
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp11
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h12
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h26
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro3
-rw-r--r--src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp3
-rw-r--r--src/plugins/qmltooling/qmldbg_server/qmldbg_server.pro8
-rw-r--r--src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp25
-rw-r--r--src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro7
-rw-r--r--src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp3
-rw-r--r--src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnectionfactory.h2
-rw-r--r--src/plugins/qmltooling/qmltooling.pro12
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp2
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
-rw-r--r--src/qml/compiler/qv4compileddata_p.h5
-rw-r--r--src/qml/compiler/qv4isel_moth_p.h14
-rw-r--r--src/qml/compiler/qv4ssa.cpp4
-rw-r--r--src/qml/debugger/debugger.pri5
-rw-r--r--src/qml/debugger/qqmlconfigurabledebugservice_p.h (renamed from src/plugins/qmltooling/shared/qqmlconfigurabledebugservice.h)15
-rw-r--r--src/qml/debugger/qqmldebugserver_p.h (renamed from src/plugins/qmltooling/shared/qqmldebugserver.h)12
-rw-r--r--src/qml/debugger/qqmldebugserverconnection_p.h (renamed from src/plugins/qmltooling/shared/qqmldebugserverconnection.h)9
-rw-r--r--src/qml/debugger/qqmldebugserviceinterfaces_p.h14
-rw-r--r--src/qml/jit/qv4assembler_p.h8
-rw-r--r--src/qml/jit/qv4isel_masm_p.h6
-rw-r--r--src/qml/jit/qv4regalloc.cpp4
-rw-r--r--src/qml/jsapi/qjsengine.h2
-rw-r--r--src/qml/jsruntime/qv4identifier.cpp2
-rw-r--r--src/qml/jsruntime/qv4value_p.h2
-rw-r--r--src/qml/qml/ftw/qhashedstring_p.h4
-rw-r--r--src/qml/qml/qqml.h54
-rw-r--r--src/qml/qml/qqmlapplicationengine.h6
-rw-r--r--src/qml/qml/qqmlbinding.cpp10
-rw-r--r--src/qml/qml/qqmlbinding_p.h6
-rw-r--r--src/qml/qml/qqmlcomponent.h18
-rw-r--r--src/qml/qml/qqmlcontext.h4
-rw-r--r--src/qml/qml/qqmlengine.cpp8
-rw-r--r--src/qml/qml/qqmlengine.h2
-rw-r--r--src/qml/qml/qqmlexpression.h6
-rw-r--r--src/qml/qml/qqmlextensionplugin.h2
-rw-r--r--src/qml/qml/qqmlfileselector.h2
-rw-r--r--src/qml/qml/qqmllist.h34
-rw-r--r--src/qml/qml/qqmlmetatype.cpp6
-rw-r--r--src/qml/qml/qqmlnotifier.cpp2
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp10
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp4
-rw-r--r--src/qml/qml/qqmlvmemetaobject_p.h6
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp2
-rw-r--r--src/qml/types/qqmllistmodel.cpp116
-rw-r--r--src/qml/types/qqmllistmodel_p.h6
-rw-r--r--src/qml/types/qqmllistmodel_p_p.h5
-rw-r--r--src/qml/util/qqmlpropertymap.h2
-rw-r--r--src/quick/accessible/qaccessiblequickitem_p.h70
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp2
-rw-r--r--src/quick/items/context2d/qquickcanvasitem_p.h18
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp2
-rw-r--r--src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp16
-rw-r--r--src/quick/items/context2d/qquickcontext2dtexture_p.h18
-rw-r--r--src/quick/items/context2d/qquickcontext2dtile_p.h2
-rw-r--r--src/quick/items/qquickanchors.cpp14
-rw-r--r--src/quick/items/qquickanchors_p_p.h22
-rw-r--r--src/quick/items/qquickanimatedimage_p.h6
-rw-r--r--src/quick/items/qquickanimatedsprite_p.h4
-rw-r--r--src/quick/items/qquickborderimage_p.h10
-rw-r--r--src/quick/items/qquickdrag.cpp4
-rw-r--r--src/quick/items/qquickdroparea_p.h8
-rw-r--r--src/quick/items/qquickflickable.cpp2
-rw-r--r--src/quick/items/qquickflickable_p.h18
-rw-r--r--src/quick/items/qquickflickable_p_p.h4
-rw-r--r--src/quick/items/qquickflipable.cpp4
-rw-r--r--src/quick/items/qquickflipable_p.h2
-rw-r--r--src/quick/items/qquickframebufferobject.cpp2
-rw-r--r--src/quick/items/qquickframebufferobject.h12
-rw-r--r--src/quick/items/qquickimage_p.h16
-rw-r--r--src/quick/items/qquickimagebase_p.h4
-rw-r--r--src/quick/items/qquickitem.cpp20
-rw-r--r--src/quick/items/qquickitem.h12
-rw-r--r--src/quick/items/qquickitem_p.h34
-rw-r--r--src/quick/items/qquickitemanimation.cpp2
-rw-r--r--src/quick/items/qquickitemanimation_p.h6
-rw-r--r--src/quick/items/qquickitemgrabresult.h2
-rw-r--r--src/quick/items/qquickitemsmodule.cpp3
-rw-r--r--src/quick/items/qquickitemview_p_p.h2
-rw-r--r--src/quick/items/qquickloader_p.h4
-rw-r--r--src/quick/items/qquickloader_p_p.h14
-rw-r--r--src/quick/items/qquickmousearea_p.h30
-rw-r--r--src/quick/items/qquickmultipointtoucharea.cpp4
-rw-r--r--src/quick/items/qquickmultipointtoucharea_p.h20
-rw-r--r--src/quick/items/qquickopenglshadereffectnode.cpp12
-rw-r--r--src/quick/items/qquickopenglshadereffectnode_p.h8
-rw-r--r--src/quick/items/qquickpainteditem.h14
-rw-r--r--src/quick/items/qquickpincharea_p.h10
-rw-r--r--src/quick/items/qquickpositioners_p.h22
-rw-r--r--src/quick/items/qquickpositioners_p_p.h10
-rw-r--r--src/quick/items/qquickrectangle_p.h2
-rw-r--r--src/quick/items/qquickrendercontrol.h6
-rw-r--r--src/quick/items/qquickrepeater_p.h4
-rw-r--r--src/quick/items/qquickshadereffect.cpp2
-rw-r--r--src/quick/items/qquickshadereffectmesh_p.h6
-rw-r--r--src/quick/items/qquickshadereffectsource.cpp2
-rw-r--r--src/quick/items/qquickshadereffectsource_p.h12
-rw-r--r--src/quick/items/qquicksprite_p.h2
-rw-r--r--src/quick/items/qquickspriteengine_p.h4
-rw-r--r--src/quick/items/qquickspritesequence_p.h2
-rw-r--r--src/quick/items/qquickstateoperations.cpp4
-rw-r--r--src/quick/items/qquickstateoperations_p.h46
-rw-r--r--src/quick/items/qquicktext_p.h24
-rw-r--r--src/quick/items/qquicktext_p_p.h6
-rw-r--r--src/quick/items/qquicktextcontrol_p.h4
-rw-r--r--src/quick/items/qquicktextedit_p.h40
-rw-r--r--src/quick/items/qquicktextedit_p_p.h4
-rw-r--r--src/quick/items/qquicktextinput_p.h36
-rw-r--r--src/quick/items/qquicktextinput_p_p.h4
-rw-r--r--src/quick/items/qquicktranslate_p.h8
-rw-r--r--src/quick/items/qquickview.h4
-rw-r--r--src/quick/items/qquickwindow.cpp4
-rw-r--r--src/quick/items/qquickwindow.h36
-rw-r--r--src/quick/items/qquickwindow_p.h2
-rw-r--r--src/quick/items/qquickwindowattached.cpp4
-rw-r--r--src/quick/items/qquickwindowmodule_p.h6
-rw-r--r--src/quick/scenegraph/coreapi/qsgabstractrenderer.h2
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h8
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h2
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer_p.h4
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp6
-rw-r--r--src/quick/scenegraph/qsgcontextplugin_p.h2
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p.cpp4
-rw-r--r--src/quick/scenegraph/qsgdefaultlayer.cpp2
-rw-r--r--src/quick/scenegraph/qsgdefaultlayer_p.h44
-rw-r--r--src/quick/scenegraph/qsgdefaultspritenode.cpp6
-rw-r--r--src/quick/scenegraph/util/qsgengine.h2
-rw-r--r--src/quick/util/qquickanimation_p_p.h2
-rw-r--r--src/quick/util/qquickglobal.cpp24
-rw-r--r--src/quick/util/qquickpropertychanges.cpp2
-rw-r--r--src/quick/util/qquickshortcut_p.h8
-rw-r--r--src/quick/util/qquickstate.cpp6
-rw-r--r--src/quick/util/qquickstate_p.h2
-rw-r--r--src/quickwidgets/qquickwidget.cpp2
-rw-r--r--src/quickwidgets/qquickwidget.h4
-rw-r--r--src/quickwidgets/qquickwidget_p.h6
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/particles/qquickimageparticle/BLACKLIST16
-rw-r--r--tests/auto/particles/qquickspritegoal/BLACKLIST3
-rw-r--r--tests/auto/qml/debugger/debugger.pro3
-rw-r--r--tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp1
-rw-r--r--tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp1
-rw-r--r--tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp3
-rw-r--r--tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess.pro4
-rw-r--r--tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/qqmldebugprocess.pro14
-rw-r--r--tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/tst_qqmldebugprocess.cpp126
-rw-r--r--tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocessprocess/qqmldebugprocessprocess.cpp39
-rw-r--r--tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocessprocess/qqmldebugprocessprocess.pro10
-rw-r--r--tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp1
-rw-r--r--tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/BLACKLIST2
-rw-r--r--tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp1
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/BLACKLIST2
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp20
-rw-r--r--tests/auto/qml/debugger/shared/debugutil.cpp195
-rw-r--r--tests/auto/qml/debugger/shared/debugutil.pri8
-rw-r--r--tests/auto/qml/debugger/shared/debugutil_p.h54
-rw-r--r--tests/auto/qml/debugger/shared/qqmldebugprocess.cpp245
-rw-r--r--tests/auto/qml/debugger/shared/qqmldebugprocess_p.h99
-rw-r--r--tests/auto/qml/qml.pro13
-rw-r--r--tests/auto/qml/qmlmin/qmlmin.pro6
-rw-r--r--tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/Singleton.qml (renamed from tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml)0
-rw-r--r--tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/qmldir (renamed from tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir)0
-rw-r--r--tests/auto/qml/qmlplugindump/qmlplugindump.pro4
-rw-r--r--tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp9
-rw-r--r--tests/auto/qml/qqmlengine/qqmlengine.pro5
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp4
-rw-r--r--tests/auto/qml/qqmlimport/tst_qqmlimport.cpp6
-rw-r--r--tests/auto/qml/qqmlinstantiator/stringmodel.h4
-rw-r--r--tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp6
-rw-r--r--tests/auto/qml/qwidgetsinqml/qwidgetsinqml.pro7
-rw-r--r--tests/auto/qml/qwidgetsinqml/tst_qwidgetsinqml.cpp288
-rw-r--r--tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml8
-rw-r--r--tests/auto/qmltest/listmodel/tst_listmodel.qml56
-rw-r--r--tests/auto/qmltest/listview/tst_listview.qml13
-rw-r--r--tests/auto/qmltest/shadersource/tst_DynamicallyCreatedSource.qml4
-rw-r--r--tests/auto/quick/drawingmodes/tst_drawingmodes.cpp34
-rw-r--r--tests/auto/quick/nodes/tst_nodestest.cpp6
-rw-r--r--tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp2
-rw-r--r--tests/auto/quick/qquickcanvasitem/data/tst_imagedata.qml4
-rw-r--r--tests/auto/quick/qquickimage/tst_qquickimage.cpp12
-rw-r--r--tests/auto/quick/qquickitem/BLACKLIST2
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp4
-rw-r--r--tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp81
-rw-r--r--tests/auto/quick/qquicklistview/data/flickBothDirections.qml1
-rw-r--r--tests/auto/quick/qquickloader/BLACKLIST4
-rw-r--r--tests/auto/quick/qquickmousearea/BLACKLIST3
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp6
-rw-r--r--tests/auto/quick/qquickpainteditem/BLACKLIST27
-rw-r--r--tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp4
-rw-r--r--tests/auto/quick/qquickshape/tst_qquickshape.cpp16
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp4
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp4
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp13
-rw-r--r--tests/auto/quick/quick.pro3
-rw-r--r--tests/auto/quick/rendernode/tst_rendernode.cpp14
-rw-r--r--tests/auto/quick/scenegraph/tst_scenegraph.cpp97
-rw-r--r--tests/auto/quick/shared/viewtestutil.cpp2
-rw-r--r--tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp4
254 files changed, 2179 insertions, 1172 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 4e4a28b8f9..31a134c4cc 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,4 +1,4 @@
load(qt_build_config)
CONFIG += warning_clean
-MODULE_VERSION = 5.10.0
+MODULE_VERSION = 5.11.0
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h b/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h
index f437e5771c..3a4c5a13c2 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h
+++ b/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h
@@ -64,9 +64,9 @@ class FbItemRenderer : public QQuickFramebufferObject::Renderer
{
public:
FbItemRenderer(bool multisample);
- void synchronize(QQuickFramebufferObject *item) Q_DECL_OVERRIDE;
- void render() Q_DECL_OVERRIDE;
- QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) Q_DECL_OVERRIDE;
+ void synchronize(QQuickFramebufferObject *item) override;
+ void render() override;
+ QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override;
private:
void ensureInit();
@@ -115,7 +115,7 @@ class FbItem : public QQuickFramebufferObject
public:
explicit FbItem(QQuickItem *parent = 0);
- QQuickFramebufferObject::Renderer *createRenderer() const Q_DECL_OVERRIDE;
+ QQuickFramebufferObject::Renderer *createRenderer() const override;
QVector3D eye() const { return m_eye; }
void setEye(const QVector3D &v);
diff --git a/examples/quick/rendercontrol/window_multithreaded.cpp b/examples/quick/rendercontrol/window_multithreaded.cpp
index 7e9db36776..ac82847dbf 100644
--- a/examples/quick/rendercontrol/window_multithreaded.cpp
+++ b/examples/quick/rendercontrol/window_multithreaded.cpp
@@ -227,14 +227,14 @@ class RenderControl : public QQuickRenderControl
{
public:
RenderControl(QWindow *w) : m_window(w) { }
- QWindow *renderWindow(QPoint *offset) Q_DECL_OVERRIDE;
+ QWindow *renderWindow(QPoint *offset) override;
private:
QWindow *m_window;
};
WindowMultiThreaded::WindowMultiThreaded()
- : m_qmlComponent(Q_NULLPTR),
+ : m_qmlComponent(nullptr),
m_rootItem(0),
m_quickInitialized(false),
m_psrRequested(false)
diff --git a/examples/quick/rendercontrol/window_multithreaded.h b/examples/quick/rendercontrol/window_multithreaded.h
index 71ce136500..ded80a0064 100644
--- a/examples/quick/rendercontrol/window_multithreaded.h
+++ b/examples/quick/rendercontrol/window_multithreaded.h
@@ -92,7 +92,7 @@ public:
void aboutToQuit();
private:
- bool event(QEvent *e) Q_DECL_OVERRIDE;
+ bool event(QEvent *e) override;
void init();
void cleanup();
void ensureFbo();
@@ -120,11 +120,11 @@ public:
~WindowMultiThreaded();
protected:
- void exposeEvent(QExposeEvent *e) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- bool event(QEvent *e) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *e) override;
+ void resizeEvent(QResizeEvent *e) override;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
+ bool event(QEvent *e) override;
private slots:
void run();
diff --git a/examples/quick/rendercontrol/window_singlethreaded.cpp b/examples/quick/rendercontrol/window_singlethreaded.cpp
index 7a7b4f57e9..d0bf0adad4 100644
--- a/examples/quick/rendercontrol/window_singlethreaded.cpp
+++ b/examples/quick/rendercontrol/window_singlethreaded.cpp
@@ -70,7 +70,7 @@ class RenderControl : public QQuickRenderControl
{
public:
RenderControl(QWindow *w) : m_window(w) { }
- QWindow *renderWindow(QPoint *offset) Q_DECL_OVERRIDE;
+ QWindow *renderWindow(QPoint *offset) override;
private:
QWindow *m_window;
diff --git a/examples/quick/rendercontrol/window_singlethreaded.h b/examples/quick/rendercontrol/window_singlethreaded.h
index 8ec64eb6f5..44b79d9f51 100644
--- a/examples/quick/rendercontrol/window_singlethreaded.h
+++ b/examples/quick/rendercontrol/window_singlethreaded.h
@@ -75,10 +75,10 @@ public:
~WindowSingleThreaded();
protected:
- void exposeEvent(QExposeEvent *e) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *e) override;
+ void resizeEvent(QResizeEvent *e) override;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
private slots:
void run();
diff --git a/src/3rdparty/masm/masm-defs.pri b/src/3rdparty/masm/masm-defs.pri
index c0c5f3d114..34d6a67451 100644
--- a/src/3rdparty/masm/masm-defs.pri
+++ b/src/3rdparty/masm/masm-defs.pri
@@ -3,6 +3,7 @@ DEFINES += ENABLE_ASSEMBLER_WX_EXCLUSIVE=1
# Avoid symbol clashes with QtScript during static linking
DEFINES += WTFReportAssertionFailure=qmlWTFReportAssertionFailure
+DEFINES += WTFReportAssertionFailureWithMessage=qmlWTFReportAssertionFailureWithMessage
DEFINES += WTFReportBacktrace=qmlWTFReportBacktrace
DEFINES += WTFInvokeCrashHook=qmlWTFInvokeCrashHook
diff --git a/src/3rdparty/masm/stubs/WTFStubs.cpp b/src/3rdparty/masm/stubs/WTFStubs.cpp
index 610b632baf..ea7e2d78e0 100644
--- a/src/3rdparty/masm/stubs/WTFStubs.cpp
+++ b/src/3rdparty/masm/stubs/WTFStubs.cpp
@@ -112,6 +112,11 @@ void dataLogFString(const char* str)
}
extern "C" {
+// When adding a new stub here do not forget to add
+// DEFINES += StubFunctionName=qmlStubFunctionName
+// for example:
+// DEFINES += WTFReportAssertionFailureWithMessage=qmlWTFReportAssertionFailureWithMessage
+// to prevent "duplicate symbol" error during static library linking. See bugs QTBUG-35041 and QTBUG-63050
void WTFReportAssertionFailure(const char* file, int line, const char* function, const char*assertion)
{
diff --git a/src/imports/folderlistmodel/plugin.cpp b/src/imports/folderlistmodel/plugin.cpp
index ef719109bd..2b58a5677a 100644
--- a/src/imports/folderlistmodel/plugin.cpp
+++ b/src/imports/folderlistmodel/plugin.cpp
@@ -59,7 +59,7 @@ class QmlFolderListModelPlugin : public QQmlExtensionPlugin
public:
QmlFolderListModelPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.folderlistmodel"));
qmlRegisterType<QQuickFolderListModel>(uri,1,0,"FolderListModel");
diff --git a/src/imports/handlers/plugin.cpp b/src/imports/handlers/plugin.cpp
index bc1ae244d3..d26ef2b2d4 100644
--- a/src/imports/handlers/plugin.cpp
+++ b/src/imports/handlers/plugin.cpp
@@ -74,7 +74,7 @@ class QtQuickHandlersPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
QtQuickHandlersPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.handlers"));
Q_UNUSED(uri);
diff --git a/src/imports/layouts/plugin.cpp b/src/imports/layouts/plugin.cpp
index da5f264ab5..fc3938c5d8 100644
--- a/src/imports/layouts/plugin.cpp
+++ b/src/imports/layouts/plugin.cpp
@@ -61,7 +61,7 @@ public:
{
initResources();
}
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Layouts"));
Q_UNUSED(uri);
diff --git a/src/imports/layouts/qquicklayout_p.h b/src/imports/layouts/qquicklayout_p.h
index 113498eb2b..7984e1bd4d 100644
--- a/src/imports/layouts/qquicklayout_p.h
+++ b/src/imports/layouts/qquicklayout_p.h
@@ -75,7 +75,7 @@ public:
static QQuickLayoutAttached *qmlAttachedProperties(QObject *object);
- void componentComplete() Q_DECL_OVERRIDE;
+ void componentComplete() override;
virtual QSizeF sizeHint(Qt::SizeHint whichSizeHint) const = 0;
virtual void setAlignment(QQuickItem *item, Qt::Alignment align) = 0;
virtual void invalidate(QQuickItem * childItem = 0);
@@ -92,21 +92,21 @@ public:
static QLayoutPolicy::Policy effectiveSizePolicy_helper(QQuickItem *item, Qt::Orientation orientation, QQuickLayoutAttached *info);
bool shouldIgnoreItem(QQuickItem *child, QQuickLayoutAttached *&info, QSizeF *sizeHints) const;
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
bool isReady() const;
void deactivateRecur();
/* QQuickItemChangeListener */
- void itemSiblingOrderChanged(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemImplicitWidthChanged(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemImplicitHeightChanged(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemVisibilityChanged(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemSiblingOrderChanged(QQuickItem *item) override;
+ void itemImplicitWidthChanged(QQuickItem *item) override;
+ void itemImplicitHeightChanged(QQuickItem *item) override;
+ void itemDestroyed(QQuickItem *item) override;
+ void itemVisibilityChanged(QQuickItem *item) override;
protected:
- void updatePolish() Q_DECL_OVERRIDE;
+ void updatePolish() override;
enum Orientation {
Vertical = 0,
diff --git a/src/imports/layouts/qquicklayoutstyleinfo_p.h b/src/imports/layouts/qquicklayoutstyleinfo_p.h
index ce86c2a37d..79f4ce2962 100644
--- a/src/imports/layouts/qquicklayoutstyleinfo_p.h
+++ b/src/imports/layouts/qquicklayoutstyleinfo_p.h
@@ -49,9 +49,9 @@ class QQuickLayoutStyleInfo : public QAbstractLayoutStyleInfo
public:
QQuickLayoutStyleInfo();
- qreal spacing(Qt::Orientation orientation) const Q_DECL_OVERRIDE;
- qreal windowMargin(Qt::Orientation orientation) const Q_DECL_OVERRIDE;
- bool hasChangedCore() const Q_DECL_OVERRIDE;
+ qreal spacing(Qt::Orientation orientation) const override;
+ qreal windowMargin(Qt::Orientation orientation) const override;
+ bool hasChangedCore() const override;
};
diff --git a/src/imports/layouts/qquicklinearlayout_p.h b/src/imports/layouts/qquicklinearlayout_p.h
index f796c8a855..6706ebf9fa 100644
--- a/src/imports/layouts/qquicklinearlayout_p.h
+++ b/src/imports/layouts/qquicklinearlayout_p.h
@@ -67,26 +67,26 @@ public:
QQuickItem *parent = 0);
~QQuickGridLayoutBase();
- void componentComplete() Q_DECL_OVERRIDE;
- void invalidate(QQuickItem *childItem = 0) Q_DECL_OVERRIDE;
+ void componentComplete() override;
+ void invalidate(QQuickItem *childItem = 0) override;
Qt::Orientation orientation() const;
void setOrientation(Qt::Orientation orientation);
- QSizeF sizeHint(Qt::SizeHint whichSizeHint) const Q_DECL_OVERRIDE;
+ QSizeF sizeHint(Qt::SizeHint whichSizeHint) const override;
Qt::LayoutDirection layoutDirection() const;
void setLayoutDirection(Qt::LayoutDirection dir);
Qt::LayoutDirection effectiveLayoutDirection() const;
- void setAlignment(QQuickItem *item, Qt::Alignment align) Q_DECL_OVERRIDE;
+ void setAlignment(QQuickItem *item, Qt::Alignment align) override;
/* QQuickItemChangeListener */
- void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemVisibilityChanged(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemDestroyed(QQuickItem *item) override;
+ void itemVisibilityChanged(QQuickItem *item) override;
protected:
- void updateLayoutItems() Q_DECL_OVERRIDE;
- QQuickItem *itemAt(int index) const Q_DECL_OVERRIDE;
- int itemCount() const Q_DECL_OVERRIDE;
+ void updateLayoutItems() override;
+ QQuickItem *itemAt(int index) const override;
+ int itemCount() const override;
- void rearrange(const QSizeF &size) Q_DECL_OVERRIDE;
+ void rearrange(const QSizeF &size) override;
virtual void insertLayoutItems() {}
signals:
@@ -109,7 +109,7 @@ public:
, m_layoutDirection(Qt::LeftToRight)
{}
- void mirrorChange() Q_DECL_OVERRIDE
+ void mirrorChange() override
{
Q_Q(QQuickGridLayoutBase);
q->invalidate();
diff --git a/src/imports/layouts/qquickstacklayout_p.h b/src/imports/layouts/qquickstacklayout_p.h
index 7b6400c3a3..8ba41720aa 100644
--- a/src/imports/layouts/qquickstacklayout_p.h
+++ b/src/imports/layouts/qquickstacklayout_p.h
@@ -56,16 +56,16 @@ public:
int currentIndex() const;
void setCurrentIndex(int index);
- void componentComplete() Q_DECL_OVERRIDE;
- QSizeF sizeHint(Qt::SizeHint whichSizeHint) const Q_DECL_OVERRIDE;
- void setAlignment(QQuickItem *item, Qt::Alignment align) Q_DECL_OVERRIDE;
- void invalidate(QQuickItem *childItem = 0) Q_DECL_OVERRIDE;
- void updateLayoutItems() Q_DECL_OVERRIDE;
- void rearrange(const QSizeF &) Q_DECL_OVERRIDE;
+ void componentComplete() override;
+ QSizeF sizeHint(Qt::SizeHint whichSizeHint) const override;
+ void setAlignment(QQuickItem *item, Qt::Alignment align) override;
+ void invalidate(QQuickItem *childItem = 0) override;
+ void updateLayoutItems() override;
+ void rearrange(const QSizeF &) override;
// iterator
- Q_INVOKABLE QQuickItem *itemAt(int index) const Q_DECL_OVERRIDE;
- int itemCount() const Q_DECL_OVERRIDE;
+ Q_INVOKABLE QQuickItem *itemAt(int index) const override;
+ int itemCount() const override;
int indexOf(QQuickItem *item) const;
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index 02cf125e48..7c9a77b11a 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -785,7 +785,7 @@ public:
{
initResources();
}
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.LocalStorage"));
qmlRegisterSingletonType<QQuickLocalStorage>(uri, 2, 0, "LocalStorage", module_api_factory);
diff --git a/src/imports/models/plugin.cpp b/src/imports/models/plugin.cpp
index dbb62cd25d..5933128713 100644
--- a/src/imports/models/plugin.cpp
+++ b/src/imports/models/plugin.cpp
@@ -78,7 +78,7 @@ class QtQmlModelsPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
QtQmlModelsPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQml.Models"));
Q_UNUSED(uri);
diff --git a/src/imports/particles/plugin.cpp b/src/imports/particles/plugin.cpp
index 28ce0f7796..f7a3472403 100644
--- a/src/imports/particles/plugin.cpp
+++ b/src/imports/particles/plugin.cpp
@@ -57,7 +57,7 @@ class QtQuick2ParticlesPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
QtQuick2ParticlesPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Particles"));
Q_UNUSED(uri);
diff --git a/src/imports/qtquick2/plugin.cpp b/src/imports/qtquick2/plugin.cpp
index d16467a5bb..a5b2c8c67e 100644
--- a/src/imports/qtquick2/plugin.cpp
+++ b/src/imports/qtquick2/plugin.cpp
@@ -57,7 +57,7 @@ class QtQuick2Plugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
QtQuick2Plugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick"));
Q_UNUSED(uri);
diff --git a/src/imports/settings/plugin.cpp b/src/imports/settings/plugin.cpp
index c422296446..70d24c12cd 100644
--- a/src/imports/settings/plugin.cpp
+++ b/src/imports/settings/plugin.cpp
@@ -58,7 +58,7 @@ class QmlSettingsPlugin : public QQmlExtensionPlugin
public:
QmlSettingsPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QByteArray(uri) == QByteArray("Qt.labs.settings"));
qmlRegisterType<QQmlSettings>(uri, 1, 0, "Settings");
diff --git a/src/imports/shapes/plugin.cpp b/src/imports/shapes/plugin.cpp
index 239ef78e55..c509d28e33 100644
--- a/src/imports/shapes/plugin.cpp
+++ b/src/imports/shapes/plugin.cpp
@@ -59,7 +59,7 @@ class QmlShapesPlugin : public QQmlExtensionPlugin
public:
QmlShapesPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QByteArray(uri) == QByteArray("QtQuick.Shapes"));
qmlRegisterType<QQuickShape>(uri, 1, 0, "Shape");
diff --git a/src/imports/statemachine/plugin.cpp b/src/imports/statemachine/plugin.cpp
index ae32f6446a..7308df8964 100644
--- a/src/imports/statemachine/plugin.cpp
+++ b/src/imports/statemachine/plugin.cpp
@@ -63,7 +63,7 @@ class QtQmlStateMachinePlugin : public QQmlExtensionPlugin
public:
QtQmlStateMachinePlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
qmlRegisterType<State>(uri, 1, 0, "State");
qmlRegisterType<StateMachine>(uri, 1, 0, "StateMachine");
diff --git a/src/imports/statemachine/signaltransition.h b/src/imports/statemachine/signaltransition.h
index c6512e2b19..3b3a7dae79 100644
--- a/src/imports/statemachine/signaltransition.h
+++ b/src/imports/statemachine/signaltransition.h
@@ -64,8 +64,8 @@ public:
QQmlScriptString guard() const;
void setGuard(const QQmlScriptString &guard);
- bool eventTest(QEvent *event) Q_DECL_OVERRIDE;
- void onTransition(QEvent *event) Q_DECL_OVERRIDE;
+ bool eventTest(QEvent *event) override;
+ void onTransition(QEvent *event) override;
const QJSValue &signal();
void setSignal(const QJSValue &signal);
@@ -81,8 +81,8 @@ Q_SIGNALS:
void qmlSignalChanged();
private:
- void classBegin() Q_DECL_OVERRIDE { m_complete = false; }
- void componentComplete() Q_DECL_OVERRIDE { m_complete = true; connectTriggered(); }
+ void classBegin() override { m_complete = false; }
+ void componentComplete() override { m_complete = true; connectTriggered(); }
void connectTriggered();
friend class SignalTransitionParser;
@@ -97,8 +97,8 @@ private:
class SignalTransitionParser : public QQmlCustomParser
{
public:
- void verifyBindings(const QV4::CompiledData::Unit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &props) Q_DECL_OVERRIDE;
- void applyBindings(QObject *object, QV4::CompiledData::CompilationUnit *compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) Q_DECL_OVERRIDE;
+ void verifyBindings(const QV4::CompiledData::Unit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &props) override;
+ void applyBindings(QObject *object, QV4::CompiledData::CompilationUnit *compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
};
QT_END_NAMESPACE
diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp
index fc013d5afc..2dbe8e08dc 100644
--- a/src/imports/testlib/main.cpp
+++ b/src/imports/testlib/main.cpp
@@ -151,7 +151,7 @@ class QTestQmlModule : public QQmlExtensionPlugin
public:
QTestQmlModule(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtTest"));
qmlRegisterType<QuickTestResult, 0>(uri,1,0,"TestResult");
diff --git a/src/imports/window/plugin.cpp b/src/imports/window/plugin.cpp
index 200f6f7b08..c4ea9a1d04 100644
--- a/src/imports/window/plugin.cpp
+++ b/src/imports/window/plugin.cpp
@@ -73,7 +73,7 @@ class QtQuick2WindowPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
QtQuick2WindowPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Window"));
Q_UNUSED(uri);
diff --git a/src/imports/xmllistmodel/plugin.cpp b/src/imports/xmllistmodel/plugin.cpp
index af7625c96a..dc6a02918b 100644
--- a/src/imports/xmllistmodel/plugin.cpp
+++ b/src/imports/xmllistmodel/plugin.cpp
@@ -58,7 +58,7 @@ class QmlXmlListModelPlugin : public QQmlExtensionPlugin
public:
QmlXmlListModelPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.XmlListModel"));
qmlRegisterType<QQuickXmlListModel>(uri,2,0,"XmlListModel");
diff --git a/src/plugins/qmltooling/packetprotocol/packetprotocol.pro b/src/plugins/qmltooling/packetprotocol/packetprotocol.pro
index 383e32b54e..990d3169ad 100644
--- a/src/plugins/qmltooling/packetprotocol/packetprotocol.pro
+++ b/src/plugins/qmltooling/packetprotocol/packetprotocol.pro
@@ -4,7 +4,8 @@ CONFIG += static internal_module
HEADERS = \
qpacketprotocol_p.h \
- qpacket_p.h
+ qpacket_p.h \
+ qqmldebugpacket_p.h
SOURCES = \
qpacketprotocol.cpp \
diff --git a/src/plugins/qmltooling/shared/qqmldebugpacket.h b/src/plugins/qmltooling/packetprotocol/qqmldebugpacket_p.h
index f1c21e0a2b..9a0f8cd82d 100644
--- a/src/plugins/qmltooling/shared/qqmldebugpacket.h
+++ b/src/plugins/qmltooling/packetprotocol/qqmldebugpacket_p.h
@@ -40,9 +40,10 @@
#ifndef QQMLDEBUGPACKET_P_H
#define QQMLDEBUGPACKET_P_H
+#include "qpacket_p.h"
+
#include <QtCore/qbuffer.h>
#include <QtQml/private/qqmldebugconnector_p.h>
-#include <QtPacketProtocol/private/qpacket_p.h>
//
// W A R N I N G
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro b/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro
index f3f8a21ff8..2d8f0ceda2 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro
+++ b/src/plugins/qmltooling/qmldbg_debugger/qmldbg_debugger.pro
@@ -12,8 +12,6 @@ SOURCES += \
$$PWD/qv4debugjob.cpp
HEADERS += \
- $$PWD/../shared/qqmlconfigurabledebugservice.h \
- $$PWD/../shared/qqmldebugpacket.h \
$$PWD/qqmldebuggerservicefactory.h \
$$PWD/qqmlenginedebugservice.h \
$$PWD/qqmlwatcher.h \
@@ -23,9 +21,6 @@ HEADERS += \
$$PWD/qv4datacollector.h \
$$PWD/qv4debugjob.h
-INCLUDEPATH += $$PWD \
- $$PWD/../shared
-
OTHER_FILES += \
$$PWD/qqmldebuggerservice.json
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
index 3d08c4c809..182e4257f8 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
@@ -39,7 +39,6 @@
#include "qqmlenginedebugservice.h"
#include "qqmlwatcher.h"
-#include "qqmldebugpacket.h"
#include <private/qqmldebugstatesdelegate_p.h>
#include <private/qqmlboundsignal_p.h>
@@ -57,6 +56,7 @@
#include <QtCore/qmetaobject.h>
#include <QtCore/qfileinfo.h>
#include <private/qmetaobject_p.h>
+#include <private/qqmldebugpacket_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h
index 2e40eb4de8..c0c24058eb 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h
@@ -95,17 +95,17 @@ public:
bool hasNotifySignal;
};
- void engineAboutToBeAdded(QJSEngine *) Q_DECL_OVERRIDE;
- void engineAboutToBeRemoved(QJSEngine *) Q_DECL_OVERRIDE;
- void objectCreated(QJSEngine *, QObject *) Q_DECL_OVERRIDE;
+ void engineAboutToBeAdded(QJSEngine *) override;
+ void engineAboutToBeRemoved(QJSEngine *) override;
+ void objectCreated(QJSEngine *, QObject *) override;
- void setStatesDelegate(QQmlDebugStatesDelegate *) Q_DECL_OVERRIDE;
+ void setStatesDelegate(QQmlDebugStatesDelegate *) override;
signals:
void scheduleMessage(const QByteArray &);
protected:
- virtual void messageReceived(const QByteArray &) Q_DECL_OVERRIDE;
+ void messageReceived(const QByteArray &) override;
private:
friend class QQmlDebuggerServiceFactory;
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
index 4573fb9d9a..8ff0a3ca64 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
@@ -432,7 +432,7 @@ QV4::ReturnedValue QV4DataCollector::getValue(Ref ref)
QV4::Scope scope(engine());
QV4::ScopedObject array(scope, m_values.value());
Q_ASSERT(ref < array->getLength());
- return array->getIndexed(ref, Q_NULLPTR);
+ return array->getIndexed(ref, nullptr);
}
// TODO: Drop this method once we don't need to support namesAsObjects anymore
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.h b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.h
index cd412e573d..06014302e6 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.h
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.h
@@ -129,14 +129,14 @@ public:
void runInEngine(QV4DebugJob *job);
// compile-time interface
- void maybeBreakAtInstruction() Q_DECL_OVERRIDE;
+ void maybeBreakAtInstruction() override;
// execution hooks
- void enteringFunction() Q_DECL_OVERRIDE;
- void leavingFunction(const QV4::ReturnedValue &retVal) Q_DECL_OVERRIDE;
- void aboutToThrow() Q_DECL_OVERRIDE;
+ void enteringFunction() override;
+ void leavingFunction(const QV4::ReturnedValue &retVal) override;
+ void aboutToThrow() override;
- bool pauseAtNextOpportunity() const Q_DECL_OVERRIDE;
+ bool pauseAtNextOpportunity() const override;
signals:
void debuggerPaused(QV4Debugger *self, QV4Debugger::PauseReason reason);
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
index 168a08865c..fe00ed1e28 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
@@ -40,13 +40,13 @@
#include "qv4debugservice.h"
#include "qv4debugjob.h"
#include "qqmlengine.h"
-#include "qqmldebugpacket.h"
#include <private/qv4engine_p.h>
#include <private/qv4isel_moth_p.h>
#include <private/qv4function_p.h>
#include <private/qqmldebugconnector_p.h>
#include <private/qv8engine_p.h>
+#include <private/qqmldebugpacket_p.h>
#include <QtCore/QJsonArray>
#include <QtCore/QJsonDocument>
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h
index bb13890ae4..5401956994 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h
@@ -51,9 +51,9 @@
// We mean it.
//
-#include "qqmlconfigurabledebugservice.h"
#include "qv4debuggeragent.h"
#include "qv4datacollector.h"
+#include <private/qqmlconfigurabledebugservice_p.h>
#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qv4debugging_p.h>
@@ -73,14 +73,14 @@ class QV4DebugServiceImpl : public QQmlConfigurableDebugService<QV4DebugService>
Q_OBJECT
public:
explicit QV4DebugServiceImpl(QObject *parent = 0);
- ~QV4DebugServiceImpl() Q_DECL_OVERRIDE;
+ ~QV4DebugServiceImpl() override;
- void engineAdded(QJSEngine *engine) Q_DECL_OVERRIDE;
- void engineAboutToBeRemoved(QJSEngine *engine) Q_DECL_OVERRIDE;
+ void engineAdded(QJSEngine *engine) override;
+ void engineAboutToBeRemoved(QJSEngine *engine) override;
- void stateAboutToBeChanged(State state) Q_DECL_OVERRIDE;
+ void stateAboutToBeChanged(State state) override;
- void signalEmitted(const QString &signal) Q_DECL_OVERRIDE;
+ void signalEmitted(const QString &signal) override;
void send(QJsonObject v8Payload);
int selectedFrame() const;
@@ -92,7 +92,7 @@ public:
QV4DebuggerAgent debuggerAgent;
protected:
- void messageReceived(const QByteArray &) Q_DECL_OVERRIDE;
+ void messageReceived(const QByteArray &) override;
void sendSomethingToSomebody(const char *type, int magicNumber = 1);
private:
diff --git a/src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp b/src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp
index 7145645609..7ce83daed6 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp
@@ -40,11 +40,11 @@
#include "globalinspector.h"
#include "highlight.h"
#include "inspecttool.h"
-#include "qqmldebugpacket.h"
#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qabstractanimation_p.h>
#include <private/qqmlcomponent_p.h>
+#include <private/qqmldebugpacket_p.h>
#include <QtGui/qwindow.h>
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro
index a8844944e0..18a61f15b7 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro
+++ b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro
@@ -1,8 +1,6 @@
TARGET = qmldbg_inspector
QT += qml-private quick-private core-private gui-private packetprotocol-private
-INCLUDEPATH *= $$PWD $$PWD/../shared
-
SOURCES += \
$$PWD/globalinspector.cpp \
$$PWD/highlight.cpp \
@@ -11,7 +9,6 @@ SOURCES += \
$$PWD/qquickwindowinspector.cpp
HEADERS += \
- $$PWD/../shared/qqmldebugpacket.h \
$$PWD/globalinspector.h \
$$PWD/highlight.h \
$$PWD/inspecttool.h\
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp b/src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp
index ab1aeebf64..d0d8d62615 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp
@@ -51,15 +51,15 @@ class QQmlInspectorServiceImpl : public QQmlInspectorService
public:
QQmlInspectorServiceImpl(QObject *parent = 0);
- void addWindow(QQuickWindow *window) Q_DECL_OVERRIDE;
- void setParentWindow(QQuickWindow *window, QWindow *parent) Q_DECL_OVERRIDE;
- void removeWindow(QQuickWindow *window) Q_DECL_OVERRIDE;
+ void addWindow(QQuickWindow *window) override;
+ void setParentWindow(QQuickWindow *window, QWindow *parent) override;
+ void removeWindow(QQuickWindow *window) override;
signals:
void scheduleMessage(const QByteArray &message);
protected:
- virtual void messageReceived(const QByteArray &) Q_DECL_OVERRIDE;
+ void messageReceived(const QByteArray &) override;
private:
friend class QQmlInspectorServiceFactory;
diff --git a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp
index 97e4b4e3e4..e60644518f 100644
--- a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp
+++ b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp
@@ -38,10 +38,10 @@
****************************************************************************/
#include "qlocalclientconnectionfactory.h"
-#include "qqmldebugserver.h"
#include <QtCore/qplugin.h>
#include <QtNetwork/qlocalsocket.h>
+#include <private/qqmldebugserver_p.h>
Q_DECLARE_METATYPE(QLocalSocket::LocalSocketError)
diff --git a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnectionfactory.h b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnectionfactory.h
index b64a1fff95..95bbd8956a 100644
--- a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnectionfactory.h
+++ b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnectionfactory.h
@@ -40,7 +40,7 @@
#ifndef QLOCALCLIENTCONNECTIONFACTORY_H
#define QLOCALCLIENTCONNECTIONFACTORY_H
-#include "qqmldebugserverconnection.h"
+#include <private/qqmldebugserverconnection_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_local/qmldbg_local.pro b/src/plugins/qmltooling/qmldbg_local/qmldbg_local.pro
index d731e47b7e..71dba262da 100644
--- a/src/plugins/qmltooling/qmldbg_local/qmldbg_local.pro
+++ b/src/plugins/qmltooling/qmldbg_local/qmldbg_local.pro
@@ -5,12 +5,7 @@ SOURCES += \
$$PWD/qlocalclientconnection.cpp
HEADERS += \
- $$PWD/qlocalclientconnectionfactory.h \
- $$PWD/../shared/qqmldebugserver.h \
- $$PWD/../shared/qqmldebugserverconnection.h
-
-INCLUDEPATH += $$PWD \
- $$PWD/../shared
+ $$PWD/qlocalclientconnectionfactory.h
OTHER_FILES += \
$$PWD/qlocalclientconnection.json
diff --git a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp
index b0f59717ac..bdfed03a40 100644
--- a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp
@@ -38,8 +38,9 @@
****************************************************************************/
#include "qdebugmessageservice.h"
-#include "qqmldebugpacket.h"
+
#include <private/qqmldebugconnector_p.h>
+#include <private/qqmldebugpacket_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_messages/qmldbg_messages.pro b/src/plugins/qmltooling/qmldbg_messages/qmldbg_messages.pro
index 5ddf7c615d..eda6df1a16 100644
--- a/src/plugins/qmltooling/qmldbg_messages/qmldbg_messages.pro
+++ b/src/plugins/qmltooling/qmldbg_messages/qmldbg_messages.pro
@@ -6,13 +6,9 @@ SOURCES += \
$$PWD/qdebugmessageservicefactory.cpp
HEADERS += \
- $$PWD/../shared/qqmldebugpacket.h \
$$PWD/qdebugmessageservice.h \
$$PWD/qdebugmessageservicefactory.h
-INCLUDEPATH += $$PWD \
- $$PWD/../shared
-
OTHER_FILES += \
$$PWD/qdebugmessageservice.json
diff --git a/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro b/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
index e5489574be..6630a394a0 100644
--- a/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
+++ b/src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
@@ -2,15 +2,11 @@ TARGET = qmldbg_native
QT = qml-private core-private packetprotocol-private
HEADERS += \
- $$PWD/../shared/qqmldebugpacket.h \
$$PWD/qqmlnativedebugconnector.h
SOURCES += \
$$PWD/qqmlnativedebugconnector.cpp
-INCLUDEPATH += $$PWD \
- $$PWD/../shared
-
OTHER_FILES += \
$$PWD/qqmlnativedebugconnector.json
diff --git a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
index 388d2e3b22..a4b3455eff 100644
--- a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
+++ b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
@@ -38,9 +38,9 @@
****************************************************************************/
#include "qqmlnativedebugconnector.h"
-#include "qqmldebugpacket.h"
#include <private/qhooks_p.h>
+#include <private/qqmldebugpacket_p.h>
#include <QtQml/qjsengine.h>
#include <QtCore/qdebug.h>
diff --git a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.h b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.h
index f8b7e1d527..a7f37b0f1e 100644
--- a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.h
+++ b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.h
@@ -51,16 +51,16 @@ class QQmlNativeDebugConnector : public QQmlDebugConnector
public:
QQmlNativeDebugConnector();
- ~QQmlNativeDebugConnector() Q_DECL_OVERRIDE;
+ ~QQmlNativeDebugConnector() override;
- bool blockingMode() const Q_DECL_OVERRIDE;
- QQmlDebugService *service(const QString &name) const Q_DECL_OVERRIDE;
- void addEngine(QJSEngine *engine) Q_DECL_OVERRIDE;
- void removeEngine(QJSEngine *engine) Q_DECL_OVERRIDE;
- bool hasEngine(QJSEngine *engine) const Q_DECL_OVERRIDE;
- bool addService(const QString &name, QQmlDebugService *service) Q_DECL_OVERRIDE;
- bool removeService(const QString &name) Q_DECL_OVERRIDE;
- bool open(const QVariantHash &configuration) Q_DECL_OVERRIDE;
+ bool blockingMode() const override;
+ QQmlDebugService *service(const QString &name) const override;
+ void addEngine(QJSEngine *engine) override;
+ void removeEngine(QJSEngine *engine) override;
+ bool hasEngine(QJSEngine *engine) const override;
+ bool addService(const QString &name, QQmlDebugService *service) override;
+ bool removeService(const QString &name) override;
+ bool open(const QVariantHash &configuration) override;
static void setDataStreamVersion(int version);
private:
diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro b/src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro
index 1873a6a77c..1cb5525622 100644
--- a/src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro
+++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qmldbg_nativedebugger.pro
@@ -6,13 +6,9 @@ SOURCES += \
$$PWD/qqmlnativedebugservice.cpp
HEADERS += \
- $$PWD/../shared/qqmldebugpacket.h \
$$PWD/qqmlnativedebugservicefactory.h \
$$PWD/qqmlnativedebugservice.h \
-INCLUDEPATH += $$PWD \
- $$PWD/../shared
-
OTHER_FILES += \
$$PWD/qqmlnativedebugservice.json
diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
index d536fd51ed..cff1728f49 100644
--- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
@@ -38,7 +38,6 @@
****************************************************************************/
#include "qqmlnativedebugservice.h"
-#include "qqmldebugpacket.h"
#include <private/qqmldebugconnector_p.h>
#include <private/qv4debugging_p.h>
@@ -51,6 +50,7 @@
#include <private/qv4identifier_p.h>
#include <private/qv4runtime_p.h>
#include <private/qv4isel_moth_p.h>
+#include <private/qqmldebugpacket_p.h>
#include <private/qqmldebugserviceinterfaces_p.h>
#include <QtQml/qjsengine.h>
@@ -188,16 +188,16 @@ public:
QV4::ExecutionEngine *engine() const { return m_engine; }
- bool pauseAtNextOpportunity() const Q_DECL_OVERRIDE {
+ bool pauseAtNextOpportunity() const override {
return m_pauseRequested
|| m_service->m_breakHandler->m_haveBreakPoints
|| m_stepping >= StepOver;
}
- void maybeBreakAtInstruction() Q_DECL_OVERRIDE;
- void enteringFunction() Q_DECL_OVERRIDE;
- void leavingFunction(const QV4::ReturnedValue &retVal) Q_DECL_OVERRIDE;
- void aboutToThrow() Q_DECL_OVERRIDE;
+ void maybeBreakAtInstruction() override;
+ void enteringFunction() override;
+ void leavingFunction(const QV4::ReturnedValue &retVal) override;
+ void aboutToThrow() override;
void handleCommand(QJsonObject *response, const QString &cmd, const QJsonObject &arguments);
diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.h b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.h
index 58bf1bc94a..4b4661be2f 100644
--- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.h
+++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.h
@@ -73,14 +73,14 @@ class QQmlNativeDebugServiceImpl : public QQmlNativeDebugService
public:
QQmlNativeDebugServiceImpl(QObject *parent);
- ~QQmlNativeDebugServiceImpl() Q_DECL_OVERRIDE;
+ ~QQmlNativeDebugServiceImpl() override;
- void engineAboutToBeAdded(QJSEngine *engine) Q_DECL_OVERRIDE;
- void engineAboutToBeRemoved(QJSEngine *engine) Q_DECL_OVERRIDE;
+ void engineAboutToBeAdded(QJSEngine *engine) override;
+ void engineAboutToBeRemoved(QJSEngine *engine) override;
- void stateAboutToBeChanged(State state) Q_DECL_OVERRIDE;
+ void stateAboutToBeChanged(State state) override;
- void messageReceived(const QByteArray &message) Q_DECL_OVERRIDE;
+ void messageReceived(const QByteArray &message) override;
void emitAsynchronousMessageToClient(const QJsonObject &message);
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qmldbg_profiler.pro b/src/plugins/qmltooling/qmldbg_profiler/qmldbg_profiler.pro
index 4629a7b81e..ac874b079e 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qmldbg_profiler.pro
+++ b/src/plugins/qmltooling/qmldbg_profiler/qmldbg_profiler.pro
@@ -9,17 +9,12 @@ SOURCES += \
$$PWD/qv4profileradapter.cpp
HEADERS += \
- $$PWD/../shared/qqmlconfigurabledebugservice.h \
- $$PWD/../shared/qqmldebugpacket.h \
$$PWD/qqmlenginecontrolservice.h \
$$PWD/qqmlprofileradapter.h \
$$PWD/qqmlprofilerservice.h \
$$PWD/qqmlprofilerservicefactory.h \
$$PWD/qv4profileradapter.h
-INCLUDEPATH += $$PWD \
- $$PWD/../shared
-
OTHER_FILES += \
$$PWD/qqmlprofilerservice.json
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp
index 9918a95116..4eedb4bd51 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qqmlenginecontrolservice.h"
-#include "qqmldebugpacket.h"
+#include <private/qqmldebugpacket_p.h>
#include <QJSEngine>
QT_BEGIN_NAMESPACE
@@ -53,8 +53,8 @@ void QQmlEngineControlServiceImpl::messageReceived(const QByteArray &message)
{
QMutexLocker lock(&dataMutex);
QQmlDebugPacket d(message);
- int command;
- int engineId;
+ qint32 command;
+ qint32 engineId;
d >> command >> engineId;
QJSEngine *engine = qobject_cast<QJSEngine *>(objectForId(engineId));
if (command == StartWaitingEngine && startingEngines.contains(engine)) {
@@ -112,10 +112,11 @@ void QQmlEngineControlServiceImpl::engineRemoved(QJSEngine *engine)
}
}
-void QQmlEngineControlServiceImpl::sendMessage(QQmlEngineControlServiceImpl::MessageType type, QJSEngine *engine)
+void QQmlEngineControlServiceImpl::sendMessage(QQmlEngineControlServiceImpl::MessageType type,
+ QJSEngine *engine)
{
QQmlDebugPacket d;
- d << int(type) << idForObject(engine);
+ d << static_cast<qint32>(type) << idForObject(engine);
emit messageToClient(name(), d.data());
}
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
index 6392944519..3c5daa0f4f 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
@@ -81,15 +81,15 @@ protected:
QList<QJSEngine *> stoppingEngines;
bool blockingMode;
- void messageReceived(const QByteArray &) Q_DECL_OVERRIDE;
- void engineAboutToBeAdded(QJSEngine *) Q_DECL_OVERRIDE;
- void engineAboutToBeRemoved(QJSEngine *) Q_DECL_OVERRIDE;
- void engineAdded(QJSEngine *) Q_DECL_OVERRIDE;
- void engineRemoved(QJSEngine *) Q_DECL_OVERRIDE;
+ void messageReceived(const QByteArray &) override;
+ void engineAboutToBeAdded(QJSEngine *) override;
+ void engineAboutToBeRemoved(QJSEngine *) override;
+ void engineAdded(QJSEngine *) override;
+ void engineRemoved(QJSEngine *) override;
void sendMessage(MessageType type, QJSEngine *engine);
- void stateChanged(State) Q_DECL_OVERRIDE;
+ void stateChanged(State) override;
};
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp
index d676731ba7..5ff1b1f97e 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp
@@ -38,8 +38,8 @@
****************************************************************************/
#include "qqmlprofileradapter.h"
-#include "qqmldebugpacket.h"
+#include <private/qqmldebugpacket_p.h>
#include <private/qqmldebugserviceinterfaces_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.h b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.h
index 7531cd1dff..b14b72d254 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.h
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.h
@@ -62,7 +62,7 @@ public:
QQmlProfilerAdapter(QQmlProfilerService *service, QQmlEnginePrivate *engine);
QQmlProfilerAdapter(QQmlProfilerService *service, QQmlTypeLoader *loader);
qint64 sendMessages(qint64 until, QList<QByteArray> &messages,
- bool trackLocations) Q_DECL_OVERRIDE;
+ bool trackLocations) override;
void receiveData(const QVector<QQmlProfilerData> &new_data,
const QQmlProfiler::LocationHash &locations);
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
index 4176ede40e..c388c6e74a 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
@@ -41,9 +41,9 @@
#include "qv4profileradapter.h"
#include "qqmlprofileradapter.h"
#include "qqmlprofilerservicefactory.h"
-#include "qqmldebugpacket.h"
#include <private/qjsengine_p.h>
+#include <private/qqmldebugpacket_p.h>
#include <private/qqmldebugpluginmanager_p.h>
#include <QtCore/qurl.h>
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h
index bbfc32b681..a5e060a1ab 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "qqmlconfigurabledebugservice.h"
+#include <private/qqmlconfigurabledebugservice_p.h>
#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmlprofilerdefinitions_p.h>
#include <private/qqmlabstractprofileradapter_p.h>
@@ -78,30 +78,30 @@ class QQmlProfilerServiceImpl :
Q_OBJECT
public:
- void engineAboutToBeAdded(QJSEngine *engine) Q_DECL_OVERRIDE;
- void engineAboutToBeRemoved(QJSEngine *engine) Q_DECL_OVERRIDE;
- void engineAdded(QJSEngine *engine) Q_DECL_OVERRIDE;
- void engineRemoved(QJSEngine *engine) Q_DECL_OVERRIDE;
+ void engineAboutToBeAdded(QJSEngine *engine) override;
+ void engineAboutToBeRemoved(QJSEngine *engine) override;
+ void engineAdded(QJSEngine *engine) override;
+ void engineRemoved(QJSEngine *engine) override;
- void addGlobalProfiler(QQmlAbstractProfilerAdapter *profiler) Q_DECL_OVERRIDE;
- void removeGlobalProfiler(QQmlAbstractProfilerAdapter *profiler) Q_DECL_OVERRIDE;
+ void addGlobalProfiler(QQmlAbstractProfilerAdapter *profiler) override;
+ void removeGlobalProfiler(QQmlAbstractProfilerAdapter *profiler) override;
void startProfiling(QJSEngine *engine,
- quint64 features = std::numeric_limits<quint64>::max()) Q_DECL_OVERRIDE;
- void stopProfiling(QJSEngine *engine) Q_DECL_OVERRIDE;
+ quint64 features = std::numeric_limits<quint64>::max()) override;
+ void stopProfiling(QJSEngine *engine) override;
QQmlProfilerServiceImpl(QObject *parent = 0);
- ~QQmlProfilerServiceImpl() Q_DECL_OVERRIDE;
+ ~QQmlProfilerServiceImpl() override;
- void dataReady(QQmlAbstractProfilerAdapter *profiler) Q_DECL_OVERRIDE;
+ void dataReady(QQmlAbstractProfilerAdapter *profiler) override;
signals:
void startFlushTimer();
void stopFlushTimer();
protected:
- virtual void stateAboutToBeChanged(State state) Q_DECL_OVERRIDE;
- virtual void messageReceived(const QByteArray &) Q_DECL_OVERRIDE;
+ void stateAboutToBeChanged(State state) override;
+ void messageReceived(const QByteArray &) override;
private:
friend class QQmlProfilerServiceFactory;
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.h b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.h
index 5d5b83f7ca..7ac378acd9 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.h
+++ b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.h
@@ -53,7 +53,7 @@
#include <private/qv4profiling_p.h>
#include <private/qqmlabstractprofileradapter_p.h>
-#include "qqmldebugpacket.h"
+#include <private/qqmldebugpacket_p.h>
#include <QStack>
#include <QList>
diff --git a/src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro b/src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro
index 6ca0a184ca..f165917041 100644
--- a/src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro
+++ b/src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro
@@ -5,8 +5,6 @@ PLUGIN_TYPE = qmltooling
PLUGIN_CLASS_NAME = QQuickProfilerAdapterFactory
load(qt_plugin)
-INCLUDEPATH += $$PWD/../shared
-
SOURCES += \
$$PWD/qquickprofileradapter.cpp \
$$PWD/qquickprofileradapterfactory.cpp
@@ -14,7 +12,6 @@ SOURCES += \
HEADERS += \
$$PWD/qquickprofileradapter.h \
$$PWD/qquickprofileradapterfactory.h \
- $$PWD/../shared/qqmldebugpacket.h
OTHER_FILES += \
qquickprofileradapter.json
diff --git a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp
index 35beb0ee0d..a05d11664d 100644
--- a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp
+++ b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp
@@ -38,8 +38,9 @@
****************************************************************************/
#include "qquickprofileradapter.h"
-#include "qqmldebugpacket.h"
+
#include <QCoreApplication>
+#include <private/qqmldebugpacket_p.h>
#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qquickprofiler_p.h>
diff --git a/src/plugins/qmltooling/qmldbg_server/qmldbg_server.pro b/src/plugins/qmltooling/qmldbg_server/qmldbg_server.pro
index fffdb4c888..d7d24a4d39 100644
--- a/src/plugins/qmltooling/qmldbg_server/qmldbg_server.pro
+++ b/src/plugins/qmltooling/qmldbg_server/qmldbg_server.pro
@@ -5,13 +5,7 @@ SOURCES += \
$$PWD/qqmldebugserver.cpp
HEADERS += \
- $$PWD/qqmldebugserverfactory.h \
- $$PWD/../shared/qqmldebugserver.h \
- $$PWD/../shared/qqmldebugserverconnection.h \
- $$PWD/../shared/qqmldebugpacket.h
-
-INCLUDEPATH += $$PWD \
- $$PWD/../shared
+ $$PWD/qqmldebugserverfactory.h
OTHER_FILES += \
qqmldebugserver.json
diff --git a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp
index 0a7421842a..f87ade568b 100644
--- a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp
+++ b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp
@@ -37,17 +37,17 @@
**
****************************************************************************/
-#include "qqmldebugserver.h"
#include "qqmldebugserverfactory.h"
-#include "qqmldebugserverconnection.h"
-#include "qqmldebugpacket.h"
+#include <private/qqmldebugserver_p.h>
+#include <private/qqmldebugserverconnection_p.h>
#include <private/qqmldebugservice_p.h>
#include <private/qjsengine_p.h>
#include <private/qqmlglobal_p.h>
#include <private/qqmldebugpluginmanager_p.h>
#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qpacketprotocol_p.h>
+#include <private/qqmldebugpacket_p.h>
#include <QtCore/QAtomicInt>
#include <QtCore/QDir>
@@ -131,19 +131,19 @@ class QQmlDebugServerImpl : public QQmlDebugServer
public:
QQmlDebugServerImpl();
- bool blockingMode() const Q_DECL_OVERRIDE;
+ bool blockingMode() const override;
- QQmlDebugService *service(const QString &name) const Q_DECL_OVERRIDE;
+ QQmlDebugService *service(const QString &name) const override;
- void addEngine(QJSEngine *engine) Q_DECL_OVERRIDE;
- void removeEngine(QJSEngine *engine) Q_DECL_OVERRIDE;
- bool hasEngine(QJSEngine *engine) const Q_DECL_OVERRIDE;
+ void addEngine(QJSEngine *engine) override;
+ void removeEngine(QJSEngine *engine) override;
+ bool hasEngine(QJSEngine *engine) const override;
- bool addService(const QString &name, QQmlDebugService *service) Q_DECL_OVERRIDE;
- bool removeService(const QString &name) Q_DECL_OVERRIDE;
+ bool addService(const QString &name, QQmlDebugService *service) override;
+ bool removeService(const QString &name) override;
- bool open(const QVariantHash &configuration) Q_DECL_OVERRIDE;
- void setDevice(QIODevice *socket) Q_DECL_OVERRIDE;
+ bool open(const QVariantHash &configuration) override;
+ void setDevice(QIODevice *socket) override;
void parseArguments();
@@ -767,4 +767,3 @@ QQmlDebugConnector *QQmlDebugServerFactory::create(const QString &key)
QT_END_NAMESPACE
#include "qqmldebugserver.moc"
-#include "moc_qqmldebugserver.cpp"
diff --git a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro
index 1face1813e..a0e9d06fd5 100644
--- a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro
+++ b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro
@@ -5,12 +5,7 @@ SOURCES += \
$$PWD/qtcpserverconnection.cpp
HEADERS += \
- $$PWD/qtcpserverconnectionfactory.h \
- $$PWD/../shared/qqmldebugserver.h \
- $$PWD/../shared/qqmldebugserverconnection.h
-
-INCLUDEPATH += $$PWD \
- $$PWD/../shared
+ $$PWD/qtcpserverconnectionfactory.h
OTHER_FILES += \
$$PWD/qtcpserverconnection.json
diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
index af4f5292ba..c2aafda863 100644
--- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
+++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
@@ -38,7 +38,8 @@
****************************************************************************/
#include "qtcpserverconnectionfactory.h"
-#include "qqmldebugserver.h"
+
+#include <private/qqmldebugserver_p.h>
#include <QtCore/qplugin.h>
#include <QtNetwork/qtcpserver.h>
diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnectionfactory.h b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnectionfactory.h
index d3b0e00584..d1282c9d47 100644
--- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnectionfactory.h
+++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnectionfactory.h
@@ -40,7 +40,7 @@
#ifndef QTCPSERVERCONNECTIONFACTORY_H
#define QTCPSERVERCONNECTIONFACTORY_H
-#include "qqmldebugserverconnection.h"
+#include <private/qqmldebugserverconnection_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro
index 27c51b53c8..5895169ca0 100644
--- a/src/plugins/qmltooling/qmltooling.pro
+++ b/src/plugins/qmltooling/qmltooling.pro
@@ -19,17 +19,19 @@ qtConfig(qml-network) {
qmldbg_tcp
}
+# Services
+SUBDIRS += \
+ qmldbg_messages \
+ qmldbg_profiler
+qmldbg_messages.depends = packetprotocol
+qmldbg_profiler.depends = packetprotocol
+
qtConfig(qml-interpreter) {
- # Services
SUBDIRS += \
qmldbg_debugger \
- qmldbg_profiler \
- qmldbg_messages \
qmldbg_nativedebugger
qmldbg_debugger.depends = packetprotocol
- qmldbg_profiler.depends = packetprotocol
- qmldbg_messages.depends = packetprotocol
qmldbg_nativedebugger.depends = packetprotocol
}
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index 57121e5460..02ff8947c4 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -1067,6 +1067,8 @@ void IRBuilder::setBindingValue(QV4::CompiledData::Binding *binding, QQmlJS::AST
} else if (QQmlJS::AST::NumericLiteral *lit = QQmlJS::AST::cast<QQmlJS::AST::NumericLiteral *>(expr)) {
binding->type = QV4::CompiledData::Binding::Type_Number;
binding->setNumberValueInternal(lit->value);
+ } else if (QQmlJS::AST::cast<QQmlJS::AST::FunctionExpression *>(expr)) {
+ binding->flags |= QV4::CompiledData::Binding::IsFunctionExpression;
} else {
if (QQmlJS::AST::UnaryMinusExpression *unaryMinus = QQmlJS::AST::cast<QQmlJS::AST::UnaryMinusExpression *>(expr)) {
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 5b7a7f9050..3fff29bce0 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2628,7 +2628,7 @@ bool Codegen::visit(ReturnStatement *ast)
// Since we're leaving, don't let any finally statements we emit as part of the unwinding
// jump to exception handlers at run-time if they throw.
- IR::BasicBlock *unwindBlock = _function->newBasicBlock(/*no exception handler*/Q_NULLPTR);
+ IR::BasicBlock *unwindBlock = _function->newBasicBlock(/*no exception handler*/nullptr);
_block->JUMP(unwindBlock);
_block = unwindBlock;
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index adf6c21cc3..a83dea1a0a 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -301,6 +301,7 @@ struct Q_QML_PRIVATE_EXPORT Binding
IsBindingToAlias = 0x40,
IsDeferredBinding = 0x80,
IsCustomParserBinding = 0x100,
+ IsFunctionExpression = 0x200
};
union {
@@ -368,6 +369,8 @@ struct Q_QML_PRIVATE_EXPORT Binding
return false;
}
+ bool isFunctionExpression() const { return (flags & IsFunctionExpression); }
+
static QString escapedString(const QString &string);
bool containsTranslations() const { return type == Type_Translation || type == Type_TranslationById; }
@@ -957,7 +960,7 @@ struct Q_QML_PRIVATE_EXPORT CompilationUnit : public CompilationUnitBase, public
void markObjects(MarkStack *markStack);
- void destroy() Q_DECL_OVERRIDE;
+ void destroy() override;
bool loadFromDisk(const QUrl &url, const QDateTime &sourceTimeStamp, EvalISelFactory *iselFactory, QString *errorString);
diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h
index 4b84bd2831..db49177783 100644
--- a/src/qml/compiler/qv4isel_moth_p.h
+++ b/src/qml/compiler/qv4isel_moth_p.h
@@ -72,11 +72,11 @@ struct CompilationUnit : public QV4::CompiledData::CompilationUnit
{
virtual ~CompilationUnit();
#if !defined(V4_BOOTSTRAP)
- void linkBackendToEngine(QV4::ExecutionEngine *engine) Q_DECL_OVERRIDE;
- bool memoryMapCode(QString *errorString) Q_DECL_OVERRIDE;
+ void linkBackendToEngine(QV4::ExecutionEngine *engine) override;
+ bool memoryMapCode(QString *errorString) override;
#endif
- void prepareCodeOffsetsForDiskStorage(CompiledData::Unit *unit) Q_DECL_OVERRIDE;
- bool saveCodeToDisk(QIODevice *device, const CompiledData::Unit *unit, QString *errorString) Q_DECL_OVERRIDE;
+ void prepareCodeOffsetsForDiskStorage(CompiledData::Unit *unit) override;
+ bool saveCodeToDisk(QIODevice *device, const CompiledData::Unit *unit, QString *errorString) override;
QVector<QByteArray> codeRefs;
@@ -216,11 +216,11 @@ class Q_QML_EXPORT ISelFactory: public EvalISelFactory
public:
ISelFactory() : EvalISelFactory(QStringLiteral("moth")) {}
virtual ~ISelFactory() {}
- EvalInstructionSelection *create(QQmlEnginePrivate *qmlEngine, QV4::ExecutableAllocator *execAllocator, IR::Module *module, QV4::Compiler::JSUnitGenerator *jsGenerator) Q_DECL_OVERRIDE Q_DECL_FINAL
+ EvalInstructionSelection *create(QQmlEnginePrivate *qmlEngine, QV4::ExecutableAllocator *execAllocator, IR::Module *module, QV4::Compiler::JSUnitGenerator *jsGenerator) override final
{ return new InstructionSelection(qmlEngine, execAllocator, module, jsGenerator, this); }
- bool jitCompileRegexps() const Q_DECL_OVERRIDE Q_DECL_FINAL
+ bool jitCompileRegexps() const override final
{ return false; }
- QQmlRefPointer<QV4::CompiledData::CompilationUnit> createUnitForLoading() Q_DECL_OVERRIDE;
+ QQmlRefPointer<QV4::CompiledData::CompilationUnit> createUnitForLoading() override;
};
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 8cf5fac760..cf79168c6c 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -2068,7 +2068,7 @@ public:
}
protected:
- void visitTemp(Temp *e) Q_DECL_OVERRIDE Q_DECL_FINAL
+ void visitTemp(Temp *e) override final
{
_collectedTemps.append(e);
}
@@ -5108,7 +5108,7 @@ private:
return checker.seenSideEffects();
}
- void visitTemp(Temp *) Q_DECL_OVERRIDE Q_DECL_FINAL {}
+ void visitTemp(Temp *) override final {}
};
void mergeBasicBlocks(IR::Function *function, DefUses *du, DominatorTree *dt)
diff --git a/src/qml/debugger/debugger.pri b/src/qml/debugger/debugger.pri
index da1ab867d4..b8d2347b17 100644
--- a/src/qml/debugger/debugger.pri
+++ b/src/qml/debugger/debugger.pri
@@ -3,8 +3,11 @@ contains(QT_CONFIG, no-qml-debug) {
MODULE_DEFINES += QT_NO_QML_DEBUGGER
} else {
HEADERS += \
+ $$PWD/qqmlconfigurabledebugservice_p.h \
$$PWD/qqmldebugpluginmanager_p.h \
- $$PWD/qqmldebugservicefactory_p.h
+ $$PWD/qqmldebugservicefactory_p.h \
+ $$PWD/qqmldebugserver_p.h \
+ $$PWD/qqmldebugserverconnection_p.h
SOURCES += \
$$PWD/qqmldebug.cpp \
diff --git a/src/plugins/qmltooling/shared/qqmlconfigurabledebugservice.h b/src/qml/debugger/qqmlconfigurabledebugservice_p.h
index 85ff9b182f..e09d5f779a 100644
--- a/src/plugins/qmltooling/shared/qqmlconfigurabledebugservice.h
+++ b/src/qml/debugger/qqmlconfigurabledebugservice_p.h
@@ -38,8 +38,8 @@
****************************************************************************/
-#ifndef QQMLCONFIGURABLEDEBUGSEVICE_H
-#define QQMLCONFIGURABLEDEBUGSEVICE_H
+#ifndef QQMLCONFIGURABLEDEBUGSEVICE_P_H
+#define QQMLCONFIGURABLEDEBUGSEVICE_P_H
//
// W A R N I N G
@@ -52,8 +52,9 @@
// We mean it.
//
-#include <private/qqmldebugservice_p.h>
-#include <private/qqmldebugconnector_p.h>
+#include "qqmldebugservice_p.h"
+#include "qqmldebugconnector_p.h"
+
#include <QtCore/qmutex.h>
QT_BEGIN_NAMESPACE
@@ -85,7 +86,7 @@ protected:
QQmlDebugConnector::instance()->blockingMode());
}
- void stateChanged(QQmlDebugService::State newState) Q_DECL_OVERRIDE
+ void stateChanged(QQmlDebugService::State newState) override
{
if (newState != QQmlDebugService::Enabled)
stopWaiting();
@@ -93,7 +94,7 @@ protected:
init();
}
- void engineAboutToBeAdded(QJSEngine *engine) Q_DECL_OVERRIDE
+ void engineAboutToBeAdded(QJSEngine *engine) override
{
QMutexLocker lock(&m_configMutex);
if (m_waitingForConfiguration)
@@ -109,4 +110,4 @@ protected:
QT_END_NAMESPACE
-#endif // QQMLCONFIGURABLEDEBUGSEVICE_H
+#endif // QQMLCONFIGURABLEDEBUGSEVICE_P_H
diff --git a/src/plugins/qmltooling/shared/qqmldebugserver.h b/src/qml/debugger/qqmldebugserver_p.h
index 109f1e246c..e848b00bda 100644
--- a/src/plugins/qmltooling/shared/qqmldebugserver.h
+++ b/src/qml/debugger/qqmldebugserver_p.h
@@ -37,12 +37,12 @@
**
****************************************************************************/
-#ifndef QQMLDEBUGSERVER_H
-#define QQMLDEBUGSERVER_H
+#ifndef QQMLDEBUGSERVER_P_H
+#define QQMLDEBUGSERVER_P_H
-#include <private/qqmldebugconnector_p.h>
-#include <private/qtqmlglobal_p.h>
+#include "qqmldebugconnector_p.h"
+#include <private/qtqmlglobal_p.h>
#include <QtCore/QIODevice>
//
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
-class QQmlDebugServer : public QQmlDebugConnector
+class Q_QML_PRIVATE_EXPORT QQmlDebugServer : public QQmlDebugConnector
{
Q_OBJECT
public:
@@ -67,4 +67,4 @@ public:
QT_END_NAMESPACE
-#endif // QQMLDEBUGSERVER_H
+#endif // QQMLDEBUGSERVER_P_H
diff --git a/src/plugins/qmltooling/shared/qqmldebugserverconnection.h b/src/qml/debugger/qqmldebugserverconnection_p.h
index 3fac15acb2..536ad830b4 100644
--- a/src/plugins/qmltooling/shared/qqmldebugserverconnection.h
+++ b/src/qml/debugger/qqmldebugserverconnection_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QQMLDEBUGSERVERCONNECTION_H
-#define QQMLDEBUGSERVERCONNECTION_H
+#ifndef QQMLDEBUGSERVERCONNECTION_P_H
+#define QQMLDEBUGSERVERCONNECTION_P_H
#include <private/qtqmlglobal_p.h>
#include <QtCore/qobject.h>
@@ -56,9 +56,8 @@
QT_BEGIN_NAMESPACE
-
class QQmlDebugServer;
-class QQmlDebugServerConnection : public QObject
+class Q_QML_PRIVATE_EXPORT QQmlDebugServerConnection : public QObject
{
Q_OBJECT
public:
@@ -73,7 +72,7 @@ public:
virtual void flush() = 0;
};
-class QQmlDebugServerConnectionFactory : public QObject
+class Q_QML_PRIVATE_EXPORT QQmlDebugServerConnectionFactory : public QObject
{
Q_OBJECT
public:
diff --git a/src/qml/debugger/qqmldebugserviceinterfaces_p.h b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
index 707ef1a937..12965ff383 100644
--- a/src/qml/debugger/qqmldebugserviceinterfaces_p.h
+++ b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
@@ -116,7 +116,7 @@ public:
protected:
friend class QQmlDebugConnector;
- QV4DebugService(float version, QObject *parent = 0) :
+ QV4DebugService(float version, QObject *parent = nullptr) :
QQmlDebugService(s_key, version, parent) {}
};
@@ -138,7 +138,7 @@ public:
protected:
friend class QQmlDebugConnector;
- QQmlProfilerService(float version, QObject *parent = 0) :
+ QQmlProfilerService(float version, QObject *parent = nullptr) :
QQmlDebugService(s_key, version, parent) {}
};
@@ -154,7 +154,7 @@ public:
protected:
friend class QQmlDebugConnector;
- QQmlEngineDebugService(float version, QObject *parent = 0) :
+ QQmlEngineDebugService(float version, QObject *parent = nullptr) :
QQmlDebugService(s_key, version, parent) {}
QQmlBoundSignal *nextSignal(QQmlBoundSignal *prev) { return prev->m_nextSignal; }
@@ -173,7 +173,7 @@ public:
protected:
friend class QQmlDebugConnector;
- QQmlInspectorService(float version, QObject *parent = 0) :
+ QQmlInspectorService(float version, QObject *parent = nullptr) :
QQmlDebugService(s_key, version, parent) {}
};
@@ -188,7 +188,7 @@ public:
protected:
friend class QQmlDebugConnector;
- QDebugMessageService(float version, QObject *parent = 0) :
+ QDebugMessageService(float version, QObject *parent = nullptr) :
QQmlDebugService(s_key, version, parent) {}
};
@@ -201,7 +201,7 @@ public:
protected:
friend class QQmlDebugConnector;
- QQmlEngineControlService(float version, QObject *parent = 0) :
+ QQmlEngineControlService(float version, QObject *parent = nullptr) :
QQmlDebugService(s_key, version, parent) {}
};
@@ -215,7 +215,7 @@ public:
protected:
friend class QQmlDebugConnector;
- QQmlNativeDebugService(float version, QObject *parent = 0)
+ QQmlNativeDebugService(float version, QObject *parent = nullptr)
: QQmlDebugService(s_key, version, parent) {}
};
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h
index 9e38696d7a..2ae4818814 100644
--- a/src/qml/jit/qv4assembler_p.h
+++ b/src/qml/jit/qv4assembler_p.h
@@ -80,11 +80,11 @@ struct CompilationUnit : public QV4::CompiledData::CompilationUnit
virtual ~CompilationUnit();
#if !defined(V4_BOOTSTRAP)
- void linkBackendToEngine(QV4::ExecutionEngine *engine) Q_DECL_OVERRIDE;
- bool memoryMapCode(QString *errorString) Q_DECL_OVERRIDE;
+ void linkBackendToEngine(QV4::ExecutionEngine *engine) override;
+ bool memoryMapCode(QString *errorString) override;
#endif
- void prepareCodeOffsetsForDiskStorage(CompiledData::Unit *unit) Q_DECL_OVERRIDE;
- bool saveCodeToDisk(QIODevice *device, const CompiledData::Unit *unit, QString *errorString) Q_DECL_OVERRIDE;
+ void prepareCodeOffsetsForDiskStorage(CompiledData::Unit *unit) override;
+ bool saveCodeToDisk(QIODevice *device, const CompiledData::Unit *unit, QString *errorString) override;
// Coderef + execution engine
diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h
index 7019a117a2..869f857c41 100644
--- a/src/qml/jit/qv4isel_masm_p.h
+++ b/src/qml/jit/qv4isel_masm_p.h
@@ -302,11 +302,11 @@ class Q_QML_EXPORT ISelFactory: public EvalISelFactory
public:
ISelFactory() : EvalISelFactory(QStringLiteral("jit")) {}
virtual ~ISelFactory() {}
- EvalInstructionSelection *create(QQmlEnginePrivate *qmlEngine, QV4::ExecutableAllocator *execAllocator, IR::Module *module, QV4::Compiler::JSUnitGenerator *jsGenerator) Q_DECL_OVERRIDE Q_DECL_FINAL
+ EvalInstructionSelection *create(QQmlEnginePrivate *qmlEngine, QV4::ExecutableAllocator *execAllocator, IR::Module *module, QV4::Compiler::JSUnitGenerator *jsGenerator) override final
{ return new InstructionSelection<JITAssembler>(qmlEngine, execAllocator, module, jsGenerator, this); }
- bool jitCompileRegexps() const Q_DECL_OVERRIDE Q_DECL_FINAL
+ bool jitCompileRegexps() const override final
{ return true; }
- QQmlRefPointer<CompiledData::CompilationUnit> createUnitForLoading() Q_DECL_OVERRIDE Q_DECL_FINAL;
+ QQmlRefPointer<CompiledData::CompilationUnit> createUnitForLoading() override final;
};
} // end of namespace JIT
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp
index d418b050c4..cd2d53ab40 100644
--- a/src/qml/jit/qv4regalloc.cpp
+++ b/src/qml/jit/qv4regalloc.cpp
@@ -87,7 +87,7 @@ public:
{}
protected:
- void addStmtNr(Stmt *s) Q_DECL_OVERRIDE Q_DECL_FINAL
+ void addStmtNr(Stmt *s) override final
{
addJustifiedNr(intervals->positionForStatement(s));
}
@@ -115,7 +115,7 @@ public:
}
protected:
- void visitTemp(Temp *e) Q_DECL_OVERRIDE Q_DECL_FINAL
+ void visitTemp(Temp *e) override final
{
switch (e->kind) {
case Temp::PhysicalRegister: {
diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h
index 41c4b81270..f92a26445f 100644
--- a/src/qml/jsapi/qjsengine.h
+++ b/src/qml/jsapi/qjsengine.h
@@ -119,7 +119,7 @@ private:
friend inline bool qjsvalue_cast_helper(const QJSValue &, int, void *);
protected:
- QJSEngine(QJSEnginePrivate &dd, QObject *parent = Q_NULLPTR);
+ QJSEngine(QJSEnginePrivate &dd, QObject *parent = nullptr);
private:
QV8Engine *d;
diff --git a/src/qml/jsruntime/qv4identifier.cpp b/src/qml/jsruntime/qv4identifier.cpp
index 6260fd0cc8..e35f72b820 100644
--- a/src/qml/jsruntime/qv4identifier.cpp
+++ b/src/qml/jsruntime/qv4identifier.cpp
@@ -152,7 +152,7 @@ const IdentifierHashEntry *IdentifierHashBase::lookup(const QString &str) const
return 0;
Q_ASSERT(d->entries);
- uint hash = String::createHashValue(str.constData(), str.length(), Q_NULLPTR);
+ uint hash = String::createHashValue(str.constData(), str.length(), nullptr);
uint idx = hash % d->alloc;
while (1) {
if (!d->entries[idx].identifier)
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 50cecb6598..17d0c32853 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -601,7 +601,7 @@ struct Q_QML_PRIVATE_EXPORT Primitive : public Value
inline Primitive Primitive::undefinedValue()
{
Primitive v;
- v.setM(Q_NULLPTR);
+ v.setM(nullptr);
return v;
}
diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h
index 9ee50ec931..956805d696 100644
--- a/src/qml/qml/ftw/qhashedstring_p.h
+++ b/src/qml/qml/ftw/qhashedstring_p.h
@@ -1311,12 +1311,12 @@ bool QHashedString::compare(const char *lhs, const char *rhs, int length)
quint32 QHashedString::stringHash(const QChar *data, int length)
{
- return QV4::String::createHashValue(data, length, Q_NULLPTR);
+ return QV4::String::createHashValue(data, length, nullptr);
}
quint32 QHashedString::stringHash(const char *data, int length)
{
- return QV4::String::createHashValue(data, length, Q_NULLPTR);
+ return QV4::String::createHashValue(data, length, nullptr);
}
void QHashedString::computeHash() const
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h
index ddb4af0b81..219df264be 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -112,10 +112,10 @@ int qmlRegisterType()
qRegisterNormalizedMetaType<T *>(pointerName.constData()),
qRegisterNormalizedMetaType<QQmlListProperty<T> >(listName.constData()),
0,
- Q_NULLPTR,
+ nullptr,
QString(),
- Q_NULLPTR, 0, 0, Q_NULLPTR, &T::staticMetaObject,
+ nullptr, 0, 0, nullptr, &T::staticMetaObject,
QQmlPrivate::attachedPropertiesFunc<T>(),
QQmlPrivate::attachedPropertiesMetaObject<T>(),
@@ -124,9 +124,9 @@ int qmlRegisterType()
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueSource>::cast(),
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueInterceptor>::cast(),
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
- Q_NULLPTR,
+ nullptr,
0
};
@@ -146,7 +146,7 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin
qRegisterNormalizedMetaType<T *>(pointerName.constData()),
qRegisterNormalizedMetaType<QQmlListProperty<T> >(listName.constData()),
0,
- Q_NULLPTR,
+ nullptr,
reason,
uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
@@ -158,9 +158,9 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueSource>::cast(),
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueInterceptor>::cast(),
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
- Q_NULLPTR,
+ nullptr,
0
};
@@ -178,7 +178,7 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin
qRegisterNormalizedMetaType<T *>(pointerName.constData()),
qRegisterNormalizedMetaType<QQmlListProperty<T> >(listName.constData()),
0,
- Q_NULLPTR,
+ nullptr,
reason,
uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
@@ -190,9 +190,9 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueSource>::cast(),
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueInterceptor>::cast(),
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
- Q_NULLPTR,
+ nullptr,
metaObjectRevision
};
@@ -217,7 +217,7 @@ int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int ve
qRegisterNormalizedMetaType<T *>(pointerName.constData()),
qRegisterNormalizedMetaType<QQmlListProperty<T> >(listName.constData()),
0,
- Q_NULLPTR,
+ nullptr,
reason,
uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
@@ -231,7 +231,7 @@ int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int ve
QQmlPrivate::createParent<E>, &E::staticMetaObject,
- Q_NULLPTR,
+ nullptr,
0
};
@@ -256,7 +256,7 @@ int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int ve
qRegisterNormalizedMetaType<T *>(pointerName.constData()),
qRegisterNormalizedMetaType<QQmlListProperty<T> >(listName.constData()),
0,
- Q_NULLPTR,
+ nullptr,
reason,
uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
@@ -270,7 +270,7 @@ int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int ve
QQmlPrivate::createParent<E>, &E::staticMetaObject,
- Q_NULLPTR,
+ nullptr,
metaObjectRevision
};
@@ -301,9 +301,9 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueSource>::cast(),
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueInterceptor>::cast(),
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
- Q_NULLPTR,
+ nullptr,
0
};
@@ -332,9 +332,9 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueSource>::cast(),
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueInterceptor>::cast(),
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
- Q_NULLPTR,
+ nullptr,
metaObjectRevision
};
@@ -363,9 +363,9 @@ int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor)
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueSource>::cast(),
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueInterceptor>::cast(),
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
- Q_NULLPTR,
+ nullptr,
metaObjectRevision
};
@@ -384,10 +384,10 @@ int qmlRegisterExtendedType()
qRegisterNormalizedMetaType<T *>(pointerName.constData()),
qRegisterNormalizedMetaType<QQmlListProperty<T> >(listName.constData()),
0,
- Q_NULLPTR,
+ nullptr,
QString(),
- Q_NULLPTR, 0, 0, Q_NULLPTR, &T::staticMetaObject,
+ nullptr, 0, 0, nullptr, &T::staticMetaObject,
QQmlPrivate::attachedPropertiesFunc<T>(),
QQmlPrivate::attachedPropertiesMetaObject<T>(),
@@ -398,7 +398,7 @@ int qmlRegisterExtendedType()
QQmlPrivate::createParent<E>, &E::staticMetaObject,
- Q_NULLPTR,
+ nullptr,
0
};
@@ -437,7 +437,7 @@ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor,
QQmlPrivate::createParent<E>, &E::staticMetaObject,
- Q_NULLPTR,
+ nullptr,
0
};
@@ -487,7 +487,7 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor,
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueSource>::cast(),
QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueInterceptor>::cast(),
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
parser,
0
@@ -583,7 +583,7 @@ inline int qmlRegisterSingletonType(const char *uri, int versionMajor, int versi
uri, versionMajor, versionMinor, typeName,
- callback, Q_NULLPTR, Q_NULLPTR, 0, 0
+ callback, nullptr, nullptr, 0, 0
};
return QQmlPrivate::qmlregister(QQmlPrivate::SingletonRegistration, &api);
@@ -601,7 +601,7 @@ inline int qmlRegisterSingletonType(const char *uri, int versionMajor, int versi
uri, versionMajor, versionMinor, typeName,
- Q_NULLPTR, callback, &T::staticMetaObject, qRegisterNormalizedMetaType<T *>(pointerName.constData()), 0
+ nullptr, callback, &T::staticMetaObject, qRegisterNormalizedMetaType<T *>(pointerName.constData()), 0
};
return QQmlPrivate::qmlregister(QQmlPrivate::SingletonRegistration, &api);
diff --git a/src/qml/qml/qqmlapplicationengine.h b/src/qml/qml/qqmlapplicationengine.h
index 6c57f46c72..d0f9e6d319 100644
--- a/src/qml/qml/qqmlapplicationengine.h
+++ b/src/qml/qml/qqmlapplicationengine.h
@@ -53,9 +53,9 @@ class Q_QML_EXPORT QQmlApplicationEngine : public QQmlEngine
{
Q_OBJECT
public:
- QQmlApplicationEngine(QObject *parent = Q_NULLPTR);
- QQmlApplicationEngine(const QUrl &url, QObject *parent = Q_NULLPTR);
- QQmlApplicationEngine(const QString &filePath, QObject *parent = Q_NULLPTR);
+ QQmlApplicationEngine(QObject *parent = nullptr);
+ QQmlApplicationEngine(const QUrl &url, QObject *parent = nullptr);
+ QQmlApplicationEngine(const QString &filePath, QObject *parent = nullptr);
~QQmlApplicationEngine();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index 566fbb86ac..43ab74138c 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -180,7 +180,7 @@ class QQmlBindingBinding: public QQmlBinding
{
protected:
void doUpdate(const DeleteWatcher &,
- QQmlPropertyData::WriteFlags flags, QV4::Scope &) Q_DECL_OVERRIDE Q_DECL_FINAL
+ QQmlPropertyData::WriteFlags flags, QV4::Scope &) override final
{
Q_ASSERT(!m_targetIndex.hasValueTypeIndex());
QQmlPropertyData *pd = nullptr;
@@ -196,7 +196,7 @@ class QQmlNonbindingBinding: public QQmlBinding
{
protected:
void doUpdate(const DeleteWatcher &watcher,
- QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) Q_DECL_OVERRIDE
+ QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) override
{
auto ep = QQmlEnginePrivate::get(scope.engine);
ep->referenceScarceResources();
@@ -238,7 +238,7 @@ class GenericBinding: public QQmlNonbindingBinding
protected:
// Returns true if successful, false if an error description was set on expression
Q_ALWAYS_INLINE bool write(const QV4::Value &result, bool isUndefined,
- QQmlPropertyData::WriteFlags flags) Q_DECL_OVERRIDE Q_DECL_FINAL
+ QQmlPropertyData::WriteFlags flags) override final
{
Q_ASSERT(targetObject());
@@ -307,7 +307,7 @@ public:
}
void doUpdate(const DeleteWatcher &watcher,
- QQmlPropertyData::WriteFlags flags, QV4::Scope &) Q_DECL_OVERRIDE Q_DECL_FINAL
+ QQmlPropertyData::WriteFlags flags, QV4::Scope &) override final
{
if (watcher.wasDeleted())
return;
@@ -622,7 +622,7 @@ public:
protected:
Q_ALWAYS_INLINE bool write(const QV4::Value &result, bool isUndefined,
- QQmlPropertyData::WriteFlags flags) Q_DECL_OVERRIDE Q_DECL_FINAL
+ QQmlPropertyData::WriteFlags flags) override final
{
QQmlPropertyData *pd;
QQmlPropertyData vtpd;
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h
index 38d59a8919..8bc9554a42 100644
--- a/src/qml/qml/qqmlbinding_p.h
+++ b/src/qml/qml/qqmlbinding_p.h
@@ -86,10 +86,10 @@ public:
void setNotifyOnValueChanged(bool);
- void refresh() Q_DECL_OVERRIDE;
+ void refresh() override;
- void setEnabled(bool, QQmlPropertyData::WriteFlags flags = QQmlPropertyData::DontRemoveBinding) Q_DECL_OVERRIDE;
- QString expression() const Q_DECL_OVERRIDE;
+ void setEnabled(bool, QQmlPropertyData::WriteFlags flags = QQmlPropertyData::DontRemoveBinding) override;
+ QString expression() const override;
void update(QQmlPropertyData::WriteFlags flags = QQmlPropertyData::DontRemoveBinding);
typedef int Identifier;
diff --git a/src/qml/qml/qqmlcomponent.h b/src/qml/qml/qqmlcomponent.h
index ca60f01eb5..b8cc556e4a 100644
--- a/src/qml/qml/qqmlcomponent.h
+++ b/src/qml/qml/qqmlcomponent.h
@@ -77,12 +77,12 @@ public:
enum CompilationMode { PreferSynchronous, Asynchronous };
Q_ENUM(CompilationMode)
- QQmlComponent(QObject *parent = Q_NULLPTR);
- QQmlComponent(QQmlEngine *, QObject *parent = Q_NULLPTR);
- QQmlComponent(QQmlEngine *, const QString &fileName, QObject *parent = Q_NULLPTR);
- QQmlComponent(QQmlEngine *, const QString &fileName, CompilationMode mode, QObject *parent = Q_NULLPTR);
- QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent = Q_NULLPTR);
- QQmlComponent(QQmlEngine *, const QUrl &url, CompilationMode mode, QObject *parent = Q_NULLPTR);
+ QQmlComponent(QObject *parent = nullptr);
+ QQmlComponent(QQmlEngine *, QObject *parent = nullptr);
+ QQmlComponent(QQmlEngine *, const QString &fileName, QObject *parent = nullptr);
+ 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();
enum Status { Null, Ready, Loading, Error };
@@ -101,12 +101,12 @@ public:
QUrl url() const;
- virtual QObject *create(QQmlContext *context = Q_NULLPTR);
+ virtual QObject *create(QQmlContext *context = nullptr);
virtual QObject *beginCreate(QQmlContext *);
virtual void completeCreate();
- void create(QQmlIncubator &, QQmlContext *context = Q_NULLPTR,
- QQmlContext *forContext = Q_NULLPTR);
+ void create(QQmlIncubator &, QQmlContext *context = nullptr,
+ QQmlContext *forContext = nullptr);
QQmlContext *creationContext() const;
diff --git a/src/qml/qml/qqmlcontext.h b/src/qml/qml/qqmlcontext.h
index 781eac44fc..b2b95b7573 100644
--- a/src/qml/qml/qqmlcontext.h
+++ b/src/qml/qml/qqmlcontext.h
@@ -62,8 +62,8 @@ class Q_QML_EXPORT QQmlContext : public QObject
Q_DECLARE_PRIVATE(QQmlContext)
public:
- QQmlContext(QQmlEngine *parent, QObject *objParent = Q_NULLPTR);
- QQmlContext(QQmlContext *parent, QObject *objParent = Q_NULLPTR);
+ QQmlContext(QQmlEngine *parent, QObject *objParent = nullptr);
+ QQmlContext(QQmlContext *parent, QObject *objParent = nullptr);
virtual ~QQmlContext();
bool isValid() const;
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 8f3c8ea8dd..a3fe4cad0f 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -131,21 +131,21 @@ int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject,
0,
0,
0,
- Q_NULLPTR,
+ nullptr,
reason,
uri, versionMajor, versionMinor, qmlName, &staticMetaObject,
QQmlAttachedPropertiesFunc(),
- Q_NULLPTR,
+ nullptr,
0,
0,
0,
- Q_NULLPTR, Q_NULLPTR,
+ nullptr, nullptr,
- Q_NULLPTR,
+ nullptr,
0
};
diff --git a/src/qml/qml/qqmlengine.h b/src/qml/qml/qqmlengine.h
index 2bf4c0497b..b775054253 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_PROPERTY(QString offlineStoragePath READ offlineStoragePath WRITE setOfflineStoragePath)
Q_OBJECT
public:
- explicit QQmlEngine(QObject *p = Q_NULLPTR);
+ explicit QQmlEngine(QObject *p = nullptr);
virtual ~QQmlEngine();
QQmlContext *rootContext() const;
diff --git a/src/qml/qml/qqmlexpression.h b/src/qml/qml/qqmlexpression.h
index 5239d59c8a..e9c8770e92 100644
--- a/src/qml/qml/qqmlexpression.h
+++ b/src/qml/qml/qqmlexpression.h
@@ -60,8 +60,8 @@ class Q_QML_EXPORT QQmlExpression : public QObject
Q_OBJECT
public:
QQmlExpression();
- QQmlExpression(QQmlContext *, QObject *, const QString &, QObject * = Q_NULLPTR);
- explicit QQmlExpression(const QQmlScriptString &, QQmlContext * = Q_NULLPTR, QObject * = Q_NULLPTR, QObject * = Q_NULLPTR);
+ QQmlExpression(QQmlContext *, QObject *, const QString &, QObject * = nullptr);
+ explicit QQmlExpression(const QQmlScriptString &, QQmlContext * = nullptr, QObject * = nullptr, QObject * = nullptr);
virtual ~QQmlExpression();
QQmlEngine *engine() const;
@@ -84,7 +84,7 @@ public:
void clearError();
QQmlError error() const;
- QVariant evaluate(bool *valueIsUndefined = Q_NULLPTR);
+ QVariant evaluate(bool *valueIsUndefined = nullptr);
Q_SIGNALS:
void valueChanged();
diff --git a/src/qml/qml/qqmlextensionplugin.h b/src/qml/qml/qqmlextensionplugin.h
index c0915c0abe..84a46fb93e 100644
--- a/src/qml/qml/qqmlextensionplugin.h
+++ b/src/qml/qml/qqmlextensionplugin.h
@@ -58,7 +58,7 @@ class Q_QML_EXPORT QQmlExtensionPlugin
Q_INTERFACES(QQmlExtensionInterface)
Q_INTERFACES(QQmlTypesExtensionInterface)
public:
- explicit QQmlExtensionPlugin(QObject *parent = Q_NULLPTR);
+ explicit QQmlExtensionPlugin(QObject *parent = nullptr);
~QQmlExtensionPlugin();
QUrl baseUrl() const;
diff --git a/src/qml/qml/qqmlfileselector.h b/src/qml/qml/qqmlfileselector.h
index 03b951420e..4eaf92c918 100644
--- a/src/qml/qml/qqmlfileselector.h
+++ b/src/qml/qml/qqmlfileselector.h
@@ -54,7 +54,7 @@ class Q_QML_EXPORT QQmlFileSelector : public QObject
Q_OBJECT
Q_DECLARE_PRIVATE(QQmlFileSelector)
public:
- explicit QQmlFileSelector(QQmlEngine *engine, QObject *parent = Q_NULLPTR);
+ explicit QQmlFileSelector(QQmlEngine *engine, QObject *parent = nullptr);
~QQmlFileSelector();
QFileSelector *selector() const Q_DECL_NOTHROW;
void setSelector(QFileSelector *selector);
diff --git a/src/qml/qml/qqmllist.h b/src/qml/qml/qqmllist.h
index e3955deee5..4c6ae0cb8f 100644
--- a/src/qml/qml/qqmllist.h
+++ b/src/qml/qml/qqmllist.h
@@ -61,20 +61,20 @@ public:
typedef void (*ClearFunction)(QQmlListProperty<T> *);
QQmlListProperty()
- : object(Q_NULLPTR),
- data(Q_NULLPTR),
- append(Q_NULLPTR),
- count(Q_NULLPTR),
- at(Q_NULLPTR),
- clear(Q_NULLPTR),
- dummy1(Q_NULLPTR),
- dummy2(Q_NULLPTR)
+ : object(nullptr),
+ data(nullptr),
+ append(nullptr),
+ count(nullptr),
+ at(nullptr),
+ clear(nullptr),
+ dummy1(nullptr),
+ dummy2(nullptr)
{}
QQmlListProperty(QObject *o, QList<T *> &list)
: object(o), data(&list), append(qlist_append), count(qlist_count), at(qlist_at),
clear(qlist_clear),
- dummy1(Q_NULLPTR),
- dummy2(Q_NULLPTR)
+ dummy1(nullptr),
+ dummy2(nullptr)
{}
QQmlListProperty(QObject *o, void *d, AppendFunction a, CountFunction c, AtFunction t,
ClearFunction r )
@@ -84,17 +84,17 @@ public:
count(c),
at(t),
clear(r),
- dummy1(Q_NULLPTR),
- dummy2(Q_NULLPTR)
+ dummy1(nullptr),
+ dummy2(nullptr)
{}
QQmlListProperty(QObject *o, void *d, CountFunction c, AtFunction t)
: object(o),
data(d),
- append(Q_NULLPTR),
+ append(nullptr),
count(c), at(t),
- clear(Q_NULLPTR),
- dummy1(Q_NULLPTR),
- dummy2(Q_NULLPTR)
+ clear(nullptr),
+ dummy1(nullptr),
+ dummy2(nullptr)
{}
bool operator==(const QQmlListProperty &o) const {
return object == o.object &&
@@ -140,7 +140,7 @@ class Q_QML_EXPORT QQmlListReference
{
public:
QQmlListReference();
- QQmlListReference(QObject *, const char *property, QQmlEngine * = Q_NULLPTR);
+ QQmlListReference(QObject *, const char *property, QQmlEngine * = nullptr);
QQmlListReference(const QQmlListReference &);
QQmlListReference &operator=(const QQmlListReference &);
~QQmlListReference();
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 8e6be538ef..4f69017ff0 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -235,7 +235,7 @@ public:
struct PropertyCacheByMinorVersion
{
- PropertyCacheByMinorVersion() : cache(Q_NULLPTR), minorVersion(-1) {}
+ PropertyCacheByMinorVersion() : cache(nullptr), minorVersion(-1) {}
explicit PropertyCacheByMinorVersion(QQmlPropertyCache *pc, int ver) : cache(pc), minorVersion(ver) {}
QQmlPropertyCachePtr cache;
int minorVersion;
@@ -840,7 +840,7 @@ QQmlPropertyCache *QQmlTypePrivate::propertyCacheForMinorVersion(int minorVersio
for (int i = 0; i < propertyCaches.count(); ++i)
if (propertyCaches.at(i).minorVersion == minorVersion)
return propertyCaches.at(i).cache;
- return Q_NULLPTR;
+ return nullptr;
}
void QQmlTypePrivate::setPropertyCacheForMinorVersion(int minorVersion, QQmlPropertyCache *cache)
@@ -2442,7 +2442,7 @@ void QQmlMetaType::freeUnusedTypesAndCaches()
while (it != data->propertyCaches.end()) {
if ((*it)->count() == 1) {
- QQmlPropertyCache *pc = Q_NULLPTR;
+ QQmlPropertyCache *pc = nullptr;
qSwap(pc, *it);
it = data->propertyCaches.erase(it);
pc->release();
diff --git a/src/qml/qml/qqmlnotifier.cpp b/src/qml/qml/qqmlnotifier.cpp
index 938e2b77e2..e068ad174a 100644
--- a/src/qml/qml/qqmlnotifier.cpp
+++ b/src/qml/qml/qqmlnotifier.cpp
@@ -74,7 +74,7 @@ namespace {
void QQmlNotifier::notify(QQmlData *ddata, int notifierIndex)
{
if (QQmlNotifierEndpoint *ep = ddata->notify(notifierIndex))
- emitNotify(ep, Q_NULLPTR);
+ emitNotify(ep, nullptr);
}
void QQmlNotifier::emitNotify(QQmlNotifierEndpoint *endpoint, void **a)
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 11fc3ceb44..d009536767 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -1113,8 +1113,16 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo
return 0;
}
}
- if (parent)
+ if (instance->isWidgetType()) {
+ if (parent && parent->isWidgetType()) {
+ QAbstractDeclarativeData::setWidgetParent(instance, parent);
+ } else {
+ // No parent! Layouts need to handle this through a default property that
+ // reparents accordingly. Otherwise the garbage collector will collect.
+ }
+ } else if (parent) {
QQml_setParent_noEvent(instance, parent);
+ }
ddata = QQmlData::get(instance, /*create*/true);
ddata->lineNumber = obj->location.line;
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index ce47ab9fa9..a5cdccc97a 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -399,11 +399,11 @@ ReturnedValue QQmlValueTypeWrapper::get(const Managed *m, String *name, bool *ha
VALUE_TYPE_LOAD(QMetaType::Bool, bool, bool);
QVariant v;
- void *args[] = { Q_NULLPTR, Q_NULLPTR };
+ void *args[] = { nullptr, nullptr };
if (result->propType() == QMetaType::QVariant) {
args[0] = &v;
} else {
- v = QVariant(result->propType(), static_cast<void *>(Q_NULLPTR));
+ v = QVariant(result->propType(), static_cast<void *>(nullptr));
args[0] = v.data();
}
metaObject->d.static_metacall(reinterpret_cast<QObject*>(gadget), QMetaObject::ReadProperty, index, args);
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h
index 891db5eb3f..27e638ceb4 100644
--- a/src/qml/qml/qqmlvmemetaobject_p.h
+++ b/src/qml/qml/qqmlvmemetaobject_p.h
@@ -101,7 +101,7 @@ public:
static QQmlInterceptorMetaObject *get(QObject *obj);
- QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *o) Q_DECL_OVERRIDE;
+ QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *o) override;
// Used by auto-tests for inspection
QQmlPropertyCache *propertyCache() const { return cache; }
@@ -118,7 +118,7 @@ public:
}
protected:
- int metaCall(QObject *o, QMetaObject::Call c, int id, void **a) Q_DECL_OVERRIDE;
+ int metaCall(QObject *o, QMetaObject::Call c, int id, void **a) override;
bool intercept(QMetaObject::Call c, int id, void **a);
public:
@@ -163,7 +163,7 @@ public:
static QQmlVMEMetaObject *getForSignal(QObject *o, int coreIndex);
protected:
- int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a) Q_DECL_OVERRIDE;
+ int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a) override;
public:
QV4::ExecutionEngine *engine;
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 1630efe081..25d99e0c87 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -521,7 +521,7 @@ void QtObject::method_matrix4x4(const BuiltinFunction *, Scope &scope, CallData
QV4::ExecutionEngine *v4 = scope.engine;
if (callData->argc == 0) {
- scope.result = scope.engine->fromVariant(QQml_valueTypeProvider()->createValueType(QMetaType::QMatrix4x4, 0, Q_NULLPTR));
+ scope.result = scope.engine->fromVariant(QQml_valueTypeProvider()->createValueType(QMetaType::QMatrix4x4, 0, nullptr));
return;
}
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index d72d2e9487..c8f8a0fc70 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -42,6 +42,7 @@
#include <private/qqmlopenmetaobject_p.h>
#include <private/qqmljsast_p.h>
#include <private/qqmljsengine_p.h>
+#include <private/qjsvalue_p.h>
#include <private/qqmlcustomparser_p.h>
#include <private/qqmlengine_p.h>
@@ -84,7 +85,7 @@ static QString roleTypeName(ListLayout::Role::DataType t)
static const QString roleTypeNames[] = {
QStringLiteral("String"), QStringLiteral("Number"), QStringLiteral("Bool"),
QStringLiteral("List"), QStringLiteral("QObject"), QStringLiteral("VariantMap"),
- QStringLiteral("DateTime")
+ QStringLiteral("DateTime"), QStringLiteral("Function")
};
if (t > ListLayout::Role::Invalid && t < ListLayout::Role::MaxDataType)
@@ -123,8 +124,8 @@ const ListLayout::Role &ListLayout::getRoleOrCreate(QV4::String *key, Role::Data
const ListLayout::Role &ListLayout::createRole(const QString &key, ListLayout::Role::DataType type)
{
- const int dataSizes[] = { sizeof(QString), sizeof(double), sizeof(bool), sizeof(ListModel *), sizeof(QPointer<QObject>), sizeof(QVariantMap), sizeof(QDateTime) };
- const int dataAlignments[] = { sizeof(QString), sizeof(double), sizeof(bool), sizeof(ListModel *), sizeof(QObject *), sizeof(QVariantMap), sizeof(QDateTime) };
+ const int dataSizes[] = { sizeof(QString), sizeof(double), sizeof(bool), sizeof(ListModel *), sizeof(QPointer<QObject>), sizeof(QVariantMap), sizeof(QDateTime), sizeof(QJSValue) };
+ const int dataAlignments[] = { sizeof(QString), sizeof(double), sizeof(bool), sizeof(ListModel *), sizeof(QObject *), sizeof(QVariantMap), sizeof(QDateTime), sizeof(QJSValue) };
Role *r = new Role;
r->name = key;
@@ -217,11 +218,20 @@ const ListLayout::Role *ListLayout::getRoleOrCreate(const QString &key, const QV
switch (data.type()) {
case QVariant::Double: type = Role::Number; break;
case QVariant::Int: type = Role::Number; break;
- case QVariant::UserType: type = Role::List; break;
case QVariant::Bool: type = Role::Bool; break;
case QVariant::String: type = Role::String; break;
case QVariant::Map: type = Role::VariantMap; break;
case QVariant::DateTime: type = Role::DateTime; break;
+ case QVariant::UserType: {
+ if (data.userType() == qMetaTypeId<QJSValue>() &&
+ data.value<QJSValue>().isCallable()) {
+ type = Role::Function;
+ break;
+ } else {
+ type = Role::List;
+ break;
+ }
+ }
default: type = Role::Invalid; break;
}
@@ -465,6 +475,12 @@ void ListModel::set(int elementIndex, QV4::Object *object, QVector<int> *roles)
const ListLayout::Role &r = m_layout->getRoleOrCreate(propertyName, ListLayout::Role::DateTime);
QDateTime dt = dd->toQDateTime();
roleIndex = e->setDateTimeProperty(r, dt);
+ } else if (QV4::FunctionObject *f = propertyValue->as<QV4::FunctionObject>()) {
+ const ListLayout::Role &r = m_layout->getRoleOrCreate(propertyName, ListLayout::Role::Function);
+ QV4::ScopedFunctionObject func(scope, f);
+ QJSValue jsv;
+ QJSValuePrivate::setValue(&jsv, v4, func);
+ roleIndex = e->setFunctionProperty(r, jsv);
} else if (QV4::Object *o = propertyValue->as<QV4::Object>()) {
if (QV4::QObjectWrapper *wrapper = o->as<QV4::QObjectWrapper>()) {
QObject *o = wrapper->object();
@@ -688,6 +704,17 @@ QDateTime *ListElement::getDateTimeProperty(const ListLayout::Role &role)
return dt;
}
+QJSValue *ListElement::getFunctionProperty(const ListLayout::Role &role)
+{
+ QJSValue *f = 0;
+
+ char *mem = getPropertyMemory(role);
+ if (isMemoryUsed<QJSValue>(mem))
+ f = reinterpret_cast<QJSValue *>(mem);
+
+ return f;
+}
+
QPointer<QObject> *ListElement::getGuardProperty(const ListLayout::Role &role)
{
char *mem = getPropertyMemory(role);
@@ -781,6 +808,14 @@ QVariant ListElement::getProperty(const ListLayout::Role &role, const QQmlListMo
}
}
break;
+ case ListLayout::Role::Function:
+ {
+ if (isMemoryUsed<QJSValue>(mem)) {
+ QJSValue *func = reinterpret_cast<QJSValue *>(mem);
+ data = QVariant::fromValue(*func);
+ }
+ }
+ break;
default:
break;
}
@@ -943,6 +978,24 @@ int ListElement::setDateTimeProperty(const ListLayout::Role &role, const QDateTi
return roleIndex;
}
+int ListElement::setFunctionProperty(const ListLayout::Role &role, const QJSValue &f)
+{
+ int roleIndex = -1;
+
+ if (role.type == ListLayout::Role::Function) {
+ char *mem = getPropertyMemory(role);
+ if (isMemoryUsed<QJSValue>(mem)) {
+ QJSValue *f = reinterpret_cast<QJSValue *>(mem);
+ f->~QJSValue();
+ }
+ new (mem) QJSValue(f);
+ roleIndex = role.index;
+ }
+
+ return roleIndex;
+}
+
+
void ListElement::setStringPropertyFast(const ListLayout::Role &role, const QString &s)
{
char *mem = getPropertyMemory(role);
@@ -989,6 +1042,12 @@ void ListElement::setDateTimePropertyFast(const ListLayout::Role &role, const QD
new (mem) QDateTime(dt);
}
+void ListElement::setFunctionPropertyFast(const ListLayout::Role &role, const QJSValue &f)
+{
+ char *mem = getPropertyMemory(role);
+ new (mem) QJSValue(f);
+}
+
void ListElement::clearProperty(const ListLayout::Role &role)
{
switch (role.type) {
@@ -1013,6 +1072,9 @@ void ListElement::clearProperty(const ListLayout::Role &role)
case ListLayout::Role::VariantMap:
setVariantMapProperty(role, (QVariantMap *)0);
break;
+ case ListLayout::Role::Function:
+ setFunctionProperty(role, QJSValue());
+ break;
default:
break;
}
@@ -1070,6 +1132,7 @@ void ListElement::sync(ListElement *src, ListLayout *srcLayout, ListElement *tar
case ListLayout::Role::Number:
case ListLayout::Role::Bool:
case ListLayout::Role::DateTime:
+ case ListLayout::Role::Function:
{
QVariant v = src->getProperty(srcRole, 0, 0);
target->setVariantProperty(targetRole, v);
@@ -1132,6 +1195,13 @@ void ListElement::destroy(ListLayout *layout)
dt->~QDateTime();
}
break;
+ case ListLayout::Role::Function:
+ {
+ QJSValue *f = getFunctionProperty(r);
+ if (f)
+ f->~QJSValue();
+ }
+ break;
default:
// other types don't need explicit cleanup.
break;
@@ -1171,6 +1241,9 @@ int ListElement::setVariantProperty(const ListLayout::Role &role, const QVariant
case ListLayout::Role::DateTime:
roleIndex = setDateTimeProperty(role, d.toDateTime());
break;
+ case ListLayout::Role::Function:
+ roleIndex = setFunctionProperty(role, d.value<QJSValue>());
+ break;
default:
break;
}
@@ -1213,6 +1286,11 @@ int ListElement::setJsProperty(const ListLayout::Role &role, const QV4::Value &d
QV4::Scoped<QV4::DateObject> dd(scope, d);
QDateTime dt = dd->toQDateTime();
roleIndex = setDateTimeProperty(role, dt);
+ } else if (d.as<QV4::FunctionObject>()) {
+ QV4::ScopedFunctionObject f(scope, d);
+ QJSValue jsv;
+ QJSValuePrivate::setValue(&jsv, eng, f);
+ roleIndex = setFunctionProperty(role, jsv);
} else if (d.isObject()) {
QV4::ScopedObject o(scope, d);
QV4::QObjectWrapper *wrapper = o->as<QV4::QObjectWrapper>();
@@ -2443,7 +2521,7 @@ bool QQmlListModelParser::verifyProperty(const QV4::CompiledData::Unit *qmlUnit,
}
} else if (binding->type == QV4::CompiledData::Binding::Type_Script) {
QString scriptStr = binding->valueAsScriptString(qmlUnit);
- if (!definesEmptyList(scriptStr)) {
+ if (!binding->isFunctionExpression() && !definesEmptyList(scriptStr)) {
QByteArray script = scriptStr.toUtf8();
bool ok;
evaluateEnum(script, &ok);
@@ -2457,7 +2535,7 @@ bool QQmlListModelParser::verifyProperty(const QV4::CompiledData::Unit *qmlUnit,
return true;
}
-bool QQmlListModelParser::applyProperty(const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding, ListModel *model, int outterElementIndex)
+bool QQmlListModelParser::applyProperty(QV4::CompiledData::CompilationUnit *compilationUnit, const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding, ListModel *model, int outterElementIndex)
{
const QString elementName = qmlUnit->stringAt(binding->propertyNameIndex);
@@ -2485,7 +2563,7 @@ bool QQmlListModelParser::applyProperty(const QV4::CompiledData::Unit *qmlUnit,
const QV4::CompiledData::Binding *subBinding = target->bindingTable();
for (quint32 i = 0; i < target->nBindings; ++i, ++subBinding) {
- roleSet |= applyProperty(qmlUnit, subBinding, subModel, elementIndex);
+ roleSet |= applyProperty(compilationUnit, qmlUnit, subBinding, subModel, elementIndex);
}
} else {
@@ -2503,6 +2581,25 @@ bool QQmlListModelParser::applyProperty(const QV4::CompiledData::Unit *qmlUnit,
const ListLayout::Role &role = model->getOrCreateListRole(elementName);
ListModel *emptyModel = new ListModel(role.subLayout, 0, -1);
value = QVariant::fromValue(emptyModel);
+ } else if (binding->isFunctionExpression()) {
+ QQmlBinding::Identifier id = binding->value.compiledScriptIndex;
+ Q_ASSERT(id != QQmlBinding::Invalid);
+
+ auto v4 = compilationUnit->engine;
+ QV4::Scope scope(v4);
+ // for now we do not provide a context object; data from the ListElement must be passed to the function
+ QV4::ScopedContext context(scope, QV4::QmlContext::create(v4->rootContext(), QQmlContextData::get(qmlContext(model->m_modelCache)), nullptr));
+ QV4::ScopedFunctionObject function(scope, QV4::FunctionObject::createScriptFunction(context, compilationUnit->runtimeFunctions[id]));
+
+ // ### we need the inner function declaration (at this point the function has been wrapped)
+ const unsigned int parameterCount = function->formalParameterCount();
+ QV4::ScopedCallData callData(scope, parameterCount);
+ callData->thisObject = v4->globalObject;
+ function->call(scope, callData);
+
+ QJSValue v;
+ QJSValuePrivate::setValue(&v, v4, scope.result);
+ value.setValue<QJSValue>(v);
} else {
QByteArray script = scriptStr.toUtf8();
bool ok;
@@ -2546,7 +2643,7 @@ void QQmlListModelParser::applyBindings(QObject *obj, QV4::CompiledData::Compila
for (const QV4::CompiledData::Binding *binding : bindings) {
if (binding->type != QV4::CompiledData::Binding::Type_Object)
continue;
- setRoles |= applyProperty(qmlUnit, binding, rv->m_listModel, /*outter element index*/-1);
+ setRoles |= applyProperty(compilationUnit, qmlUnit, binding, rv->m_listModel, /*outter element index*/-1);
}
if (setRoles == false)
@@ -2586,6 +2683,9 @@ bool QQmlListModelParser::definesEmptyList(const QString &s)
strings (quoted and optionally within a call to QT_TR_NOOP), boolean values
(true, false), numbers, or enumeration values (such as AlignText.AlignHCenter).
+ Beginning with Qt 5.11 ListElement also allows assigning a function declaration to
+ a role. This allows the definition of ListElements with callable actions.
+
\section1 Referencing Roles
The role names are used by delegates to obtain data from list elements.
diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h
index 1fda703797..499a113504 100644
--- a/src/qml/types/qqmllistmodel_p.h
+++ b/src/qml/types/qqmllistmodel_p.h
@@ -189,13 +189,13 @@ public:
QQmlListModelParser() : QQmlCustomParser(QQmlCustomParser::AcceptsSignalHandlers) {}
- void verifyBindings(const QV4::CompiledData::Unit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings) Q_DECL_OVERRIDE;
- void applyBindings(QObject *obj, QV4::CompiledData::CompilationUnit *compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) Q_DECL_OVERRIDE;
+ void verifyBindings(const QV4::CompiledData::Unit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
+ void applyBindings(QObject *obj, QV4::CompiledData::CompilationUnit *compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
private:
bool verifyProperty(const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding);
// returns true if a role was set
- bool applyProperty(const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding, ListModel *model, int outterElementIndex);
+ bool applyProperty(QV4::CompiledData::CompilationUnit *compilationUnit, const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding, ListModel *model, int outterElementIndex);
static bool definesEmptyList(const QString &);
diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h
index 271437e680..dea1ef2eb3 100644
--- a/src/qml/types/qqmllistmodel_p_p.h
+++ b/src/qml/types/qqmllistmodel_p_p.h
@@ -216,6 +216,7 @@ public:
QObject,
VariantMap,
DateTime,
+ Function,
MaxDataType
};
@@ -283,6 +284,7 @@ private:
int setVariantMapProperty(const ListLayout::Role &role, QV4::Object *o);
int setVariantMapProperty(const ListLayout::Role &role, QVariantMap *m);
int setDateTimeProperty(const ListLayout::Role &role, const QDateTime &dt);
+ int setFunctionProperty(const ListLayout::Role &role, const QJSValue &f);
void setStringPropertyFast(const ListLayout::Role &role, const QString &s);
void setDoublePropertyFast(const ListLayout::Role &role, double n);
@@ -291,6 +293,7 @@ private:
void setListPropertyFast(const ListLayout::Role &role, ListModel *m);
void setVariantMapFast(const ListLayout::Role &role, QV4::Object *o);
void setDateTimePropertyFast(const ListLayout::Role &role, const QDateTime &dt);
+ void setFunctionPropertyFast(const ListLayout::Role &role, const QJSValue &f);
void clearProperty(const ListLayout::Role &role);
@@ -301,6 +304,7 @@ private:
QPointer<QObject> *getGuardProperty(const ListLayout::Role &role);
QVariantMap *getVariantMapProperty(const ListLayout::Role &role);
QDateTime *getDateTimeProperty(const ListLayout::Role &role);
+ QJSValue *getFunctionProperty(const ListLayout::Role &role);
inline char *getPropertyMemory(const ListLayout::Role &role);
@@ -400,6 +404,7 @@ private:
friend class ListElement;
friend class QQmlListModelWorkerAgent;
+ friend class QQmlListModelParser;
};
QT_END_NAMESPACE
diff --git a/src/qml/util/qqmlpropertymap.h b/src/qml/util/qqmlpropertymap.h
index 8c5ecce48e..3930ac00a8 100644
--- a/src/qml/util/qqmlpropertymap.h
+++ b/src/qml/util/qqmlpropertymap.h
@@ -55,7 +55,7 @@ class Q_QML_EXPORT QQmlPropertyMap : public QObject
{
Q_OBJECT
public:
- explicit QQmlPropertyMap(QObject *parent = Q_NULLPTR);
+ explicit QQmlPropertyMap(QObject *parent = nullptr);
virtual ~QQmlPropertyMap();
QVariant value(const QString &key) const;
diff --git a/src/quick/accessible/qaccessiblequickitem_p.h b/src/quick/accessible/qaccessiblequickitem_p.h
index 577a105627..5375d37bf0 100644
--- a/src/quick/accessible/qaccessiblequickitem_p.h
+++ b/src/quick/accessible/qaccessiblequickitem_p.h
@@ -66,73 +66,73 @@ class QAccessibleQuickItem : public QAccessibleObject, public QAccessibleActionI
public:
QAccessibleQuickItem(QQuickItem *item);
- QWindow *window() const Q_DECL_OVERRIDE;
+ QWindow *window() const override;
- QRect rect() const Q_DECL_OVERRIDE;
+ QRect rect() const override;
QRect viewRect() const;
bool clipsChildren() const;
- QAccessibleInterface *childAt(int x, int y) const Q_DECL_OVERRIDE;
+ QAccessibleInterface *childAt(int x, int y) const override;
- QAccessibleInterface *parent() const Q_DECL_OVERRIDE;
- QAccessibleInterface *child(int index) const Q_DECL_OVERRIDE;
- int childCount() const Q_DECL_OVERRIDE;
- int indexOfChild(const QAccessibleInterface *iface) const Q_DECL_OVERRIDE;
+ QAccessibleInterface *parent() const override;
+ QAccessibleInterface *child(int index) const override;
+ int childCount() const override;
+ int indexOfChild(const QAccessibleInterface *iface) const override;
QList<QQuickItem *> childItems() const;
- QAccessible::State state() const Q_DECL_OVERRIDE;
- QAccessible::Role role() const Q_DECL_OVERRIDE;
- QString text(QAccessible::Text) const Q_DECL_OVERRIDE;
+ QAccessible::State state() const override;
+ QAccessible::Role role() const override;
+ QString text(QAccessible::Text) const override;
bool isAccessible() const;
// Action Interface
- QStringList actionNames() const Q_DECL_OVERRIDE;
- void doAction(const QString &actionName) Q_DECL_OVERRIDE;
- QStringList keyBindingsForAction(const QString &actionName) const Q_DECL_OVERRIDE;
+ QStringList actionNames() const override;
+ void doAction(const QString &actionName) override;
+ QStringList keyBindingsForAction(const QString &actionName) const override;
// Value Interface
- QVariant currentValue() const Q_DECL_OVERRIDE;
- void setCurrentValue(const QVariant &value) Q_DECL_OVERRIDE;
- QVariant maximumValue() const Q_DECL_OVERRIDE;
- QVariant minimumValue() const Q_DECL_OVERRIDE;
- QVariant minimumStepSize() const Q_DECL_OVERRIDE;
+ QVariant currentValue() const override;
+ void setCurrentValue(const QVariant &value) override;
+ QVariant maximumValue() const override;
+ QVariant minimumValue() const override;
+ QVariant minimumStepSize() const override;
// Text Interface
- void selection(int selectionIndex, int *startOffset, int *endOffset) const Q_DECL_OVERRIDE;
- int selectionCount() const Q_DECL_OVERRIDE;
- void addSelection(int startOffset, int endOffset) Q_DECL_OVERRIDE;
- void removeSelection(int selectionIndex) Q_DECL_OVERRIDE;
- void setSelection(int selectionIndex, int startOffset, int endOffset) Q_DECL_OVERRIDE;
+ void selection(int selectionIndex, int *startOffset, int *endOffset) const override;
+ int selectionCount() const override;
+ void addSelection(int startOffset, int endOffset) override;
+ void removeSelection(int selectionIndex) override;
+ void setSelection(int selectionIndex, int startOffset, int endOffset) override;
// cursor
- int cursorPosition() const Q_DECL_OVERRIDE;
- void setCursorPosition(int position) Q_DECL_OVERRIDE;
+ int cursorPosition() const override;
+ void setCursorPosition(int position) override;
// text
- QString text(int startOffset, int endOffset) const Q_DECL_OVERRIDE;
+ QString text(int startOffset, int endOffset) const override;
QString textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType,
- int *startOffset, int *endOffset) const Q_DECL_OVERRIDE;
+ int *startOffset, int *endOffset) const override;
QString textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType,
- int *startOffset, int *endOffset) const Q_DECL_OVERRIDE;
+ int *startOffset, int *endOffset) const override;
QString textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType,
- int *startOffset, int *endOffset) const Q_DECL_OVERRIDE;
- int characterCount() const Q_DECL_OVERRIDE;
+ int *startOffset, int *endOffset) const override;
+ int characterCount() const override;
// character <-> geometry
- QRect characterRect(int /* offset */) const Q_DECL_OVERRIDE { return QRect(); }
- int offsetAtPoint(const QPoint & /* point */) const Q_DECL_OVERRIDE { return -1; }
+ QRect characterRect(int /* offset */) const override { return QRect(); }
+ int offsetAtPoint(const QPoint & /* point */) const override { return -1; }
- void scrollToSubstring(int /* startIndex */, int /* endIndex */) Q_DECL_OVERRIDE {}
- QString attributes(int /* offset */, int *startOffset, int *endOffset) const Q_DECL_OVERRIDE
+ void scrollToSubstring(int /* startIndex */, int /* endIndex */) override {}
+ QString attributes(int /* offset */, int *startOffset, int *endOffset) const override
{ *startOffset = 0; *endOffset = 0; return QString(); }
QTextDocument *textDocument() const;
protected:
QQuickItem *item() const { return static_cast<QQuickItem*>(object()); }
- void *interface_cast(QAccessible::InterfaceType t) Q_DECL_OVERRIDE;
+ void *interface_cast(QAccessible::InterfaceType t) override;
private:
QTextDocument *m_doc;
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index 670dc6d032..b492842ad4 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -65,7 +65,7 @@ class QQuickCanvasTextureProvider : public QSGTextureProvider
{
public:
QSGTexture *tex;
- QSGTexture *texture() const Q_DECL_OVERRIDE { return tex; }
+ QSGTexture *texture() const override { return tex; }
void fireTextureChanged() { emit textureChanged(); }
};
diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h
index 217ae9bb69..59de847680 100644
--- a/src/quick/items/context2d/qquickcanvasitem_p.h
+++ b/src/quick/items/context2d/qquickcanvasitem_p.h
@@ -155,8 +155,8 @@ public:
Q_INVOKABLE QString toDataURL(const QString& type = QLatin1String("image/png")) const;
QQmlRefPointer<QQuickCanvasPixmap> loadedPixmap(const QUrl& url);
- bool isTextureProvider() const Q_DECL_OVERRIDE;
- QSGTextureProvider *textureProvider() const Q_DECL_OVERRIDE;
+ bool isTextureProvider() const override;
+ QSGTextureProvider *textureProvider() const override;
Q_SIGNALS:
void paint(const QRect &region);
@@ -185,13 +185,13 @@ private Q_SLOTS:
void schedulePolish();
protected:
- void componentComplete() Q_DECL_OVERRIDE;
- void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &) Q_DECL_OVERRIDE;
- void updatePolish() Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void releaseResources() Q_DECL_OVERRIDE;
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ void componentComplete() override;
+ void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &) override;
+ void updatePolish() override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ void releaseResources() override;
+ bool event(QEvent *event) override;
private:
Q_DECLARE_PRIVATE(QQuickCanvasItem)
Q_INVOKABLE void delayedCreate();
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 9ac7422a39..37e574a884 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -3960,7 +3960,7 @@ class QQuickContext2DTextureCleanup : public QRunnable
{
public:
QQuickContext2DTexture *texture;
- void run() Q_DECL_OVERRIDE { delete texture; }
+ void run() override { delete texture; }
};
QMutex QQuickContext2D::mutex;
diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
index b985cb0ccc..30895d9b0e 100644
--- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
+++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
@@ -100,8 +100,8 @@ namespace {
{
}
- void paint(QPainter *p) const Q_DECL_OVERRIDE { p->fillRect(m_rect, m_brush); }
- QRectF boundingRect() const Q_DECL_OVERRIDE { return m_rect; }
+ void paint(QPainter *p) const override { p->fillRect(m_rect, m_brush); }
+ QRectF boundingRect() const override { return m_rect; }
private:
QRectF m_rect;
@@ -117,8 +117,8 @@ namespace {
{
}
- void paint(QPainter *p) const Q_DECL_OVERRIDE { p->fillPath(m_path, m_brush); }
- QRectF boundingRect() const Q_DECL_OVERRIDE { return m_path.boundingRect(); }
+ void paint(QPainter *p) const override { p->fillPath(m_path, m_brush); }
+ QRectF boundingRect() const override { return m_path.boundingRect(); }
private:
QPainterPath m_path;
@@ -134,9 +134,9 @@ namespace {
{
}
- void paint(QPainter *p) const Q_DECL_OVERRIDE { p->strokePath(m_path, m_pen); }
+ void paint(QPainter *p) const override { p->strokePath(m_path, m_pen); }
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
qreal d = qMax(qreal(1), m_pen.widthF());
return m_path.boundingRect().adjusted(-d, -d, d, d);
@@ -156,9 +156,9 @@ namespace {
{
}
- void paint(QPainter *p) const Q_DECL_OVERRIDE { p->drawImage(m_offset, m_image); }
+ void paint(QPainter *p) const override { p->drawImage(m_offset, m_image); }
- QRectF boundingRect() const Q_DECL_OVERRIDE { return QRectF(m_image.rect()).translated(m_offset); }
+ QRectF boundingRect() const override { return QRectF(m_image.rect()).translated(m_offset); }
private:
QImage m_image;
diff --git a/src/quick/items/context2d/qquickcontext2dtexture_p.h b/src/quick/items/context2d/qquickcontext2dtexture_p.h
index 81896dcdc1..0e1fbd5d34 100644
--- a/src/quick/items/context2d/qquickcontext2dtexture_p.h
+++ b/src/quick/items/context2d/qquickcontext2dtexture_p.h
@@ -189,21 +189,21 @@ class QQuickContext2DFBOTexture : public QQuickContext2DTexture
public:
QQuickContext2DFBOTexture();
~QQuickContext2DFBOTexture();
- QQuickContext2DTile* createTile() const Q_DECL_OVERRIDE;
- QPaintDevice* beginPainting() Q_DECL_OVERRIDE;
- void endPainting() Q_DECL_OVERRIDE;
+ QQuickContext2DTile* createTile() const override;
+ QPaintDevice* beginPainting() override;
+ void endPainting() override;
QRectF normalizedTextureSubRect() const;
- QQuickCanvasItem::RenderTarget renderTarget() const Q_DECL_OVERRIDE;
- void compositeTile(QQuickContext2DTile* tile) Q_DECL_OVERRIDE;
- QSize adjustedTileSize(const QSize &ts) Q_DECL_OVERRIDE;
+ QQuickCanvasItem::RenderTarget renderTarget() const override;
+ void compositeTile(QQuickContext2DTile* tile) override;
+ QSize adjustedTileSize(const QSize &ts) override;
- QSGTexture *textureForNextFrame(QSGTexture *, QQuickWindow *window) Q_DECL_OVERRIDE;
+ QSGTexture *textureForNextFrame(QSGTexture *, QQuickWindow *window) override;
protected:
- QVector2D scaleFactor() const Q_DECL_OVERRIDE;
+ QVector2D scaleFactor() const override;
public Q_SLOTS:
- void grabImage(const QRectF& region = QRectF()) Q_DECL_OVERRIDE;
+ void grabImage(const QRectF& region = QRectF()) override;
private:
bool doMultisampling() const;
diff --git a/src/quick/items/context2d/qquickcontext2dtile_p.h b/src/quick/items/context2d/qquickcontext2dtile_p.h
index d5255edcfc..c3d4dfef64 100644
--- a/src/quick/items/context2d/qquickcontext2dtile_p.h
+++ b/src/quick/items/context2d/qquickcontext2dtile_p.h
@@ -93,7 +93,7 @@ class QQuickContext2DFBOTile : public QQuickContext2DTile
public:
QQuickContext2DFBOTile();
~QQuickContext2DFBOTile();
- virtual void setRect(const QRect& r) override;
+ void setRect(const QRect& r) override;
QOpenGLFramebufferObject* fbo() const {return m_fbo;}
void drawFinished() override;
diff --git a/src/quick/items/qquickanchors.cpp b/src/quick/items/qquickanchors.cpp
index c0bec7d716..45b405bd82 100644
--- a/src/quick/items/qquickanchors.cpp
+++ b/src/quick/items/qquickanchors.cpp
@@ -832,7 +832,7 @@ void QQuickAnchors::resetTop()
Q_D(QQuickAnchors);
d->usedAnchors &= ~TopAnchor;
d->remDepend(d->topAnchorItem);
- d->topAnchorItem = Q_NULLPTR;
+ d->topAnchorItem = nullptr;
d->topAnchorLine = QQuickAnchors::InvalidAnchor;
emit topChanged();
d->updateVerticalAnchors();
@@ -872,7 +872,7 @@ void QQuickAnchors::resetBottom()
Q_D(QQuickAnchors);
d->usedAnchors &= ~BottomAnchor;
d->remDepend(d->bottomAnchorItem);
- d->bottomAnchorItem = Q_NULLPTR;
+ d->bottomAnchorItem = nullptr;
d->bottomAnchorLine = QQuickAnchors::InvalidAnchor;
emit bottomChanged();
d->updateVerticalAnchors();
@@ -912,7 +912,7 @@ void QQuickAnchors::resetVerticalCenter()
Q_D(QQuickAnchors);
d->usedAnchors &= ~VCenterAnchor;
d->remDepend(d->vCenterAnchorItem);
- d->vCenterAnchorItem = Q_NULLPTR;
+ d->vCenterAnchorItem = nullptr;
d->vCenterAnchorLine = QQuickAnchors::InvalidAnchor;
emit verticalCenterChanged();
d->updateVerticalAnchors();
@@ -952,7 +952,7 @@ void QQuickAnchors::resetBaseline()
Q_D(QQuickAnchors);
d->usedAnchors &= ~BaselineAnchor;
d->remDepend(d->baselineAnchorItem);
- d->baselineAnchorItem = Q_NULLPTR;
+ d->baselineAnchorItem = nullptr;
d->baselineAnchorLine = QQuickAnchors::InvalidAnchor;
emit baselineChanged();
d->updateVerticalAnchors();
@@ -992,7 +992,7 @@ void QQuickAnchors::resetLeft()
Q_D(QQuickAnchors);
d->usedAnchors &= ~LeftAnchor;
d->remDepend(d->leftAnchorItem);
- d->leftAnchorItem = Q_NULLPTR;
+ d->leftAnchorItem = nullptr;
d->leftAnchorLine = QQuickAnchors::InvalidAnchor;
emit leftChanged();
d->updateHorizontalAnchors();
@@ -1032,7 +1032,7 @@ void QQuickAnchors::resetRight()
Q_D(QQuickAnchors);
d->usedAnchors &= ~RightAnchor;
d->remDepend(d->rightAnchorItem);
- d->rightAnchorItem = Q_NULLPTR;
+ d->rightAnchorItem = nullptr;
d->rightAnchorLine = QQuickAnchors::InvalidAnchor;
emit rightChanged();
d->updateHorizontalAnchors();
@@ -1072,7 +1072,7 @@ void QQuickAnchors::resetHorizontalCenter()
Q_D(QQuickAnchors);
d->usedAnchors &= ~HCenterAnchor;
d->remDepend(d->hCenterAnchorItem);
- d->hCenterAnchorItem = Q_NULLPTR;
+ d->hCenterAnchorItem = nullptr;
d->hCenterAnchorLine = QQuickAnchors::InvalidAnchor;
emit horizontalCenterChanged();
d->updateHorizontalAnchors();
diff --git a/src/quick/items/qquickanchors_p_p.h b/src/quick/items/qquickanchors_p_p.h
index 906f607302..ae6ca02786 100644
--- a/src/quick/items/qquickanchors_p_p.h
+++ b/src/quick/items/qquickanchors_p_p.h
@@ -90,15 +90,15 @@ public:
, hCenterOffset(0)
, baselineOffset(0)
, item(i)
- , fill(Q_NULLPTR)
- , centerIn(Q_NULLPTR)
- , leftAnchorItem(Q_NULLPTR)
- , rightAnchorItem(Q_NULLPTR)
- , topAnchorItem(Q_NULLPTR)
- , bottomAnchorItem(Q_NULLPTR)
- , vCenterAnchorItem(Q_NULLPTR)
- , hCenterAnchorItem(Q_NULLPTR)
- , baselineAnchorItem(Q_NULLPTR)
+ , fill(nullptr)
+ , centerIn(nullptr)
+ , leftAnchorItem(nullptr)
+ , rightAnchorItem(nullptr)
+ , topAnchorItem(nullptr)
+ , bottomAnchorItem(nullptr)
+ , vCenterAnchorItem(nullptr)
+ , hCenterAnchorItem(nullptr)
+ , baselineAnchorItem(nullptr)
, leftAnchorLine(QQuickAnchors::InvalidAnchor)
, leftMarginExplicit(false)
, rightAnchorLine(QQuickAnchors::InvalidAnchor)
@@ -141,8 +141,8 @@ public:
void updateMe();
// QQuickItemGeometryListener interface
- void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) Q_DECL_OVERRIDE;
- QQuickAnchorsPrivate *anchorPrivate() Q_DECL_OVERRIDE { return this; }
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
+ QQuickAnchorsPrivate *anchorPrivate() override { return this; }
bool checkHValid() const;
bool checkVValid() const;
diff --git a/src/quick/items/qquickanimatedimage_p.h b/src/quick/items/qquickanimatedimage_p.h
index 94e44f27cd..f7a6bd808b 100644
--- a/src/quick/items/qquickanimatedimage_p.h
+++ b/src/quick/items/qquickanimatedimage_p.h
@@ -90,7 +90,7 @@ public:
int frameCount() const;
// Extends QQuickImage's src property
- void setSource(const QUrl&) Q_DECL_OVERRIDE;
+ void setSource(const QUrl&) override;
virtual QSize sourceSize();
Q_SIGNALS:
@@ -106,8 +106,8 @@ private Q_SLOTS:
void onCacheChanged();
protected:
- void load() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void load() override;
+ void componentComplete() override;
private:
Q_DISABLE_COPY(QQuickAnimatedImage)
diff --git a/src/quick/items/qquickanimatedsprite_p.h b/src/quick/items/qquickanimatedsprite_p.h
index 850461a011..276e6fbb92 100644
--- a/src/quick/items/qquickanimatedsprite_p.h
+++ b/src/quick/items/qquickanimatedsprite_p.h
@@ -169,8 +169,8 @@ protected Q_SLOTS:
void reset();
protected:
- void componentComplete() Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ void componentComplete() override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
private:
void maybeUpdate();
bool isCurrentFrameChangedConnected();
diff --git a/src/quick/items/qquickborderimage_p.h b/src/quick/items/qquickborderimage_p.h
index 844f71e2c9..f43e6c8e1e 100644
--- a/src/quick/items/qquickborderimage_p.h
+++ b/src/quick/items/qquickborderimage_p.h
@@ -83,7 +83,7 @@ public:
TileMode verticalTileMode() const;
void setVerticalTileMode(TileMode);
- void setSource(const QUrl &url) Q_DECL_OVERRIDE;
+ void setSource(const QUrl &url) override;
Q_SIGNALS:
void horizontalTileModeChanged();
@@ -91,16 +91,16 @@ Q_SIGNALS:
void sourceSizeChanged();
protected:
- void load() Q_DECL_OVERRIDE;
- void pixmapChange() Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ void load() override;
+ void pixmapChange() override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
private:
void setGridScaledImage(const QQuickGridScaledImage& sci);
private Q_SLOTS:
void doUpdate();
- void requestFinished() Q_DECL_OVERRIDE;
+ void requestFinished() override;
#if QT_CONFIG(qml_network)
void sciRequestFinished();
#endif
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index 7c936ff21c..6dc005a03c 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -82,8 +82,8 @@ public:
{
}
- void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) Q_DECL_OVERRIDE;
- void itemParentChanged(QQuickItem *, QQuickItem *parent) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
+ void itemParentChanged(QQuickItem *, QQuickItem *parent) override;
void updatePosition();
void restartDrag();
void deliverEnterEvent();
diff --git a/src/quick/items/qquickdroparea_p.h b/src/quick/items/qquickdroparea_p.h
index 0c4c072db7..d25cd4decc 100644
--- a/src/quick/items/qquickdroparea_p.h
+++ b/src/quick/items/qquickdroparea_p.h
@@ -175,10 +175,10 @@ Q_SIGNALS:
void dropped(QQuickDropEvent *drop);
protected:
- void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent *event) override;
+ void dragEnterEvent(QDragEnterEvent *event) override;
+ void dragLeaveEvent(QDragLeaveEvent *event) override;
+ void dropEvent(QDropEvent *event) override;
private:
Q_DISABLE_COPY(QQuickDropArea)
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index ee5f177855..cd918cef5f 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -213,7 +213,7 @@ public:
}
protected:
- void finished() Q_DECL_OVERRIDE {
+ void finished() override {
if (!flickable)
return;
axisData->move.setValue(axisData->transitionTo);
diff --git a/src/quick/items/qquickflickable_p.h b/src/quick/items/qquickflickable_p.h
index 7558ee7df8..4ad01323a4 100644
--- a/src/quick/items/qquickflickable_p.h
+++ b/src/quick/items/qquickflickable_p.h
@@ -263,14 +263,14 @@ Q_SIGNALS:
Q_REVISION(9) void verticalOvershootChanged();
protected:
- bool childMouseEventFilter(QQuickItem *, QEvent *) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ bool childMouseEventFilter(QQuickItem *, QEvent *) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
#if QT_CONFIG(wheelevent)
- void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *event) override;
#endif
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *event) override;
QQuickFlickableVisibleArea *visibleArea();
@@ -288,11 +288,11 @@ protected:
virtual qreal maxYExtent() const;
qreal vWidth() const;
qreal vHeight() const;
- void componentComplete() Q_DECL_OVERRIDE;
+ void componentComplete() override;
virtual void viewportMoved(Qt::Orientations orient);
void geometryChanged(const QRectF &newGeometry,
- const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
+ const QRectF &oldGeometry) override;
+ void mouseUngrabEvent() override;
bool filterMouseEvent(QQuickItem *receiver, QMouseEvent *event);
bool xflick() const;
diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h
index 8609a15fcd..54cc67875a 100644
--- a/src/quick/items/qquickflickable_p_p.h
+++ b/src/quick/items/qquickflickable_p_p.h
@@ -87,7 +87,7 @@ public:
{
Velocity(QQuickFlickablePrivate *p)
: parent(p) {}
- void setValue(qreal v) Q_DECL_OVERRIDE {
+ void setValue(qreal v) override {
if (v != value()) {
QQuickTimeLineValue::setValue(v);
parent->updateVelocity();
@@ -195,7 +195,7 @@ public:
qreal overShootDistance(qreal size) const;
- void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
void draggingStarting();
void draggingEnding();
diff --git a/src/quick/items/qquickflipable.cpp b/src/quick/items/qquickflipable.cpp
index a960cd8b80..4273ed4881 100644
--- a/src/quick/items/qquickflipable.cpp
+++ b/src/quick/items/qquickflipable.cpp
@@ -57,7 +57,7 @@ public:
transform = t;
update();
}
- void applyTo(QMatrix4x4 *matrix) const Q_DECL_OVERRIDE {
+ void applyTo(QMatrix4x4 *matrix) const override {
*matrix *= transform;
}
private:
@@ -70,7 +70,7 @@ class QQuickFlipablePrivate : public QQuickItemPrivate
public:
QQuickFlipablePrivate() : current(QQuickFlipable::Front), front(0), back(0), sideDirty(false) {}
- void transformChanged() Q_DECL_OVERRIDE;
+ void transformChanged() override;
void updateSide();
void setBackTransform();
diff --git a/src/quick/items/qquickflipable_p.h b/src/quick/items/qquickflipable_p.h
index a76977d4ac..ec922725ef 100644
--- a/src/quick/items/qquickflipable_p.h
+++ b/src/quick/items/qquickflipable_p.h
@@ -93,7 +93,7 @@ Q_SIGNALS:
void sideChanged();
protected:
- void updatePolish() Q_DECL_OVERRIDE;
+ void updatePolish() override;
private Q_SLOTS:
void retransformBack();
diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp
index 042ee21aec..5a40d6b705 100644
--- a/src/quick/items/qquickframebufferobject.cpp
+++ b/src/quick/items/qquickframebufferobject.cpp
@@ -219,7 +219,7 @@ public:
window->update();
}
- QSGTexture *texture() const Q_DECL_OVERRIDE
+ QSGTexture *texture() const override
{
return QSGSimpleTextureNode::texture();
}
diff --git a/src/quick/items/qquickframebufferobject.h b/src/quick/items/qquickframebufferobject.h
index 13eeb931ad..d66ca40b3a 100644
--- a/src/quick/items/qquickframebufferobject.h
+++ b/src/quick/items/qquickframebufferobject.h
@@ -75,7 +75,7 @@ public:
void *data;
};
- QQuickFramebufferObject(QQuickItem *parent = Q_NULLPTR);
+ QQuickFramebufferObject(QQuickItem *parent = nullptr);
bool textureFollowsItemSize() const;
void setTextureFollowsItemSize(bool follows);
@@ -85,15 +85,15 @@ public:
virtual Renderer *createRenderer() const = 0;
- bool isTextureProvider() const Q_DECL_OVERRIDE;
- QSGTextureProvider *textureProvider() const Q_DECL_OVERRIDE;
- void releaseResources() Q_DECL_OVERRIDE;
+ bool isTextureProvider() const override;
+ QSGTextureProvider *textureProvider() const override;
+ void releaseResources() override;
protected:
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
protected:
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
Q_SIGNALS:
void textureFollowsItemSizeChanged(bool);
diff --git a/src/quick/items/qquickimage_p.h b/src/quick/items/qquickimage_p.h
index a5331266c9..09b2c1eeb7 100644
--- a/src/quick/items/qquickimage_p.h
+++ b/src/quick/items/qquickimage_p.h
@@ -91,7 +91,7 @@ public:
qreal paintedWidth() const;
qreal paintedHeight() const;
- QRectF boundingRect() const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
HAlignment horizontalAlignment() const;
void setHorizontalAlignment(HAlignment align);
@@ -99,13 +99,13 @@ public:
VAlignment verticalAlignment() const;
void setVerticalAlignment(VAlignment align);
- bool isTextureProvider() const Q_DECL_OVERRIDE { return true; }
- QSGTextureProvider *textureProvider() const Q_DECL_OVERRIDE;
+ bool isTextureProvider() const override { return true; }
+ QSGTextureProvider *textureProvider() const override;
bool mipmap() const;
void setMipmap(bool use);
- virtual void emitAutoTransformBaseChanged() Q_DECL_OVERRIDE { emit autoTransformChanged(); }
+ void emitAutoTransformBaseChanged() override { emit autoTransformChanged(); }
Q_SIGNALS:
void fillModeChanged();
@@ -120,12 +120,12 @@ private Q_SLOTS:
protected:
QQuickImage(QQuickImagePrivate &dd, QQuickItem *parent);
- void pixmapChange() Q_DECL_OVERRIDE;
+ void pixmapChange() override;
void updatePaintedGeometry();
- void releaseResources() Q_DECL_OVERRIDE;
+ void releaseResources() override;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
private:
Q_DISABLE_COPY(QQuickImage)
diff --git a/src/quick/items/qquickimagebase_p.h b/src/quick/items/qquickimagebase_p.h
index 54b1f789c9..4d4a6fceaf 100644
--- a/src/quick/items/qquickimagebase_p.h
+++ b/src/quick/items/qquickimagebase_p.h
@@ -115,9 +115,9 @@ Q_SIGNALS:
protected:
virtual void load();
- void componentComplete() Q_DECL_OVERRIDE;
+ void componentComplete() override;
virtual void pixmapChange();
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
QQuickImageBase(QQuickImageBasePrivate &dd, QQuickItem *parent);
private Q_SLOTS:
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index ccc4e90abf..6579175cc6 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -2489,13 +2489,13 @@ QQuickItem *QQuickItemPrivate::nextTabChildItem(const QQuickItem *item, int star
{
if (!item) {
qWarning() << "QQuickItemPrivate::nextTabChildItem called with null item.";
- return Q_NULLPTR;
+ return nullptr;
}
const QList<QQuickItem *> &children = item->childItems();
const int count = children.count();
if (start < 0 || start >= count) {
qWarning() << "QQuickItemPrivate::nextTabChildItem: Start index value out of range for item" << item;
- return Q_NULLPTR;
+ return nullptr;
}
while (start < count) {
QQuickItem *child = children.at(start);
@@ -2503,14 +2503,14 @@ QQuickItem *QQuickItemPrivate::nextTabChildItem(const QQuickItem *item, int star
return child;
++start;
}
- return Q_NULLPTR;
+ return nullptr;
}
QQuickItem *QQuickItemPrivate::prevTabChildItem(const QQuickItem *item, int start)
{
if (!item) {
qWarning() << "QQuickItemPrivate::prevTabChildItem called with null item.";
- return Q_NULLPTR;
+ return nullptr;
}
const QList<QQuickItem *> &children = item->childItems();
const int count = children.count();
@@ -2518,7 +2518,7 @@ QQuickItem *QQuickItemPrivate::prevTabChildItem(const QQuickItem *item, int star
start = count - 1;
if (start < 0 || start >= count) {
qWarning() << "QQuickItemPrivate::prevTabChildItem: Start index value out of range for item" << item;
- return Q_NULLPTR;
+ return nullptr;
}
while (start >= 0) {
QQuickItem *child = children.at(start);
@@ -2526,7 +2526,7 @@ QQuickItem *QQuickItemPrivate::prevTabChildItem(const QQuickItem *item, int star
return child;
--start;
}
- return Q_NULLPTR;
+ return nullptr;
}
QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, bool forward)
@@ -2566,8 +2566,8 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
QQuickItem *last = current;
bool hasChildren = !current->childItems().isEmpty() && current->isEnabled() && current->isVisible();
- QQuickItem *firstChild = Q_NULLPTR;
- QQuickItem *lastChild = Q_NULLPTR;
+ QQuickItem *firstChild = nullptr;
+ QQuickItem *lastChild = nullptr;
if (hasChildren) {
firstChild = nextTabChildItem(current, 0);
if (!firstChild)
@@ -2599,11 +2599,11 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
if (!current->childItems().isEmpty())
skip = true;
// back to the parent
- } else if (QQuickItem *parent = !isTabFence ? current->parentItem() : Q_NULLPTR) {
+ } else if (QQuickItem *parent = !isTabFence ? current->parentItem() : nullptr) {
// we would evaluate the parent twice, thus we skip
if (forward) {
skip = true;
- } else if (QQuickItem *firstSibling = !forward ? nextTabChildItem(parent, 0) : Q_NULLPTR) {
+ } else if (QQuickItem *firstSibling = !forward ? nextTabChildItem(parent, 0) : nullptr) {
if (last != firstSibling
|| (parent->isFocusScope() && parent->activeFocusOnTab() && parent->hasActiveFocus()))
skip = true;
diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h
index 25641f16f9..f6ee54e94d 100644
--- a/src/quick/items/qquickitem.h
+++ b/src/quick/items/qquickitem.h
@@ -59,7 +59,7 @@ class Q_QUICK_EXPORT QQuickTransform : public QObject
{
Q_OBJECT
public:
- explicit QQuickTransform(QObject *parent = Q_NULLPTR);
+ explicit QQuickTransform(QObject *parent = nullptr);
~QQuickTransform();
void appendToItem(QQuickItem *);
@@ -196,7 +196,7 @@ public:
};
Q_ENUM(TransformOrigin)
- explicit QQuickItem(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickItem(QQuickItem *parent = nullptr);
virtual ~QQuickItem();
QQuickWindow *window() const;
@@ -392,7 +392,7 @@ Q_SIGNALS:
void implicitHeightChanged();
protected:
- bool event(QEvent *) Q_DECL_OVERRIDE;
+ bool event(QEvent *) override;
bool isComponentComplete() const;
virtual void itemChange(ItemChange, const ItemChangeData &);
@@ -405,8 +405,8 @@ protected:
bool heightValid() const; // ### better name?
void setImplicitSize(qreal, qreal);
- void classBegin() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void classBegin() override;
+ void componentComplete() override;
virtual void keyPressEvent(QKeyEvent *event);
virtual void keyReleaseEvent(QKeyEvent *event);
@@ -445,7 +445,7 @@ protected:
virtual void updatePolish();
protected:
- QQuickItem(QQuickItemPrivate &dd, QQuickItem *parent = Q_NULLPTR);
+ QQuickItem(QQuickItemPrivate &dd, QQuickItem *parent = nullptr);
private:
Q_PRIVATE_SLOT(d_func(), void _q_resourceObjectDeleted(QObject *))
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h
index 2f0c316602..9ed5286f22 100644
--- a/src/quick/items/qquickitem_p.h
+++ b/src/quick/items/qquickitem_p.h
@@ -101,10 +101,10 @@ public:
void complete();
protected:
- void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) Q_DECL_OVERRIDE;
- void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemChildAdded(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
- void itemChildRemoved(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override;
+ void itemDestroyed(QQuickItem *item) override;
+ void itemChildAdded(QQuickItem *, QQuickItem *) override;
+ void itemChildRemoved(QQuickItem *, QQuickItem *) override;
//void itemVisibilityChanged(QQuickItem *item)
private:
@@ -194,11 +194,11 @@ public:
QQuickShaderEffectSource *effectSource() const { return m_effectSource; }
- void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) Q_DECL_OVERRIDE;
- void itemOpacityChanged(QQuickItem *) Q_DECL_OVERRIDE;
- void itemParentChanged(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
- void itemSiblingOrderChanged(QQuickItem *) Q_DECL_OVERRIDE;
- void itemVisibilityChanged(QQuickItem *) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
+ void itemOpacityChanged(QQuickItem *) override;
+ void itemParentChanged(QQuickItem *, QQuickItem *) override;
+ void itemSiblingOrderChanged(QQuickItem *) override;
+ void itemVisibilityChanged(QQuickItem *) override;
void updateMatrix();
void updateGeometry();
@@ -714,8 +714,8 @@ Q_SIGNALS:
void priorityChanged();
private:
- void keyPressed(QKeyEvent *event, bool post) Q_DECL_OVERRIDE;
- void keyReleased(QKeyEvent *event, bool post) Q_DECL_OVERRIDE;
+ void keyPressed(QKeyEvent *event, bool post) override;
+ void keyReleased(QKeyEvent *event, bool post) override;
void setFocusNavigation(QQuickItem *currentItem, const char *dir,
Qt::FocusReason reason = Qt::OtherFocusReason);
};
@@ -751,7 +751,7 @@ class QQuickEnterKeyAttached : public QObject
Q_PROPERTY(Qt::EnterKeyType type READ type WRITE setType NOTIFY typeChanged)
public:
- explicit QQuickEnterKeyAttached(QObject *parent = Q_NULLPTR);
+ explicit QQuickEnterKeyAttached(QObject *parent = nullptr);
Qt::EnterKeyType type() const;
void setType(Qt::EnterKeyType type);
@@ -819,7 +819,7 @@ public:
return QQmlListProperty<QQuickItem>(this, d->targets);
}
- void componentComplete() Q_DECL_OVERRIDE;
+ void componentComplete() override;
static QQuickKeysAttached *qmlAttachedProperties(QObject *);
@@ -871,11 +871,11 @@ Q_SIGNALS:
void volumeDownPressed(QQuickKeyEvent *event);
private:
- void keyPressed(QKeyEvent *event, bool post) Q_DECL_OVERRIDE;
- void keyReleased(QKeyEvent *event, bool post) Q_DECL_OVERRIDE;
+ void keyPressed(QKeyEvent *event, bool post) override;
+ void keyReleased(QKeyEvent *event, bool post) override;
#if QT_CONFIG(im)
- void inputMethodEvent(QInputMethodEvent *, bool post) Q_DECL_OVERRIDE;
- QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
+ void inputMethodEvent(QInputMethodEvent *, bool post) override;
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
#endif
void shortcutOverride(QKeyEvent *event) override;
static QByteArray keyToSignal(int key);
diff --git a/src/quick/items/qquickitemanimation.cpp b/src/quick/items/qquickitemanimation.cpp
index d4d346def9..4b5c81b4d4 100644
--- a/src/quick/items/qquickitemanimation.cpp
+++ b/src/quick/items/qquickitemanimation.cpp
@@ -211,7 +211,7 @@ struct QQuickParentAnimationData : public QAbstractAnimationAction
//### reverse should probably apply on a per-action basis
bool reverse;
QList<QQuickParentChange *> pc;
- void doAction() Q_DECL_OVERRIDE
+ void doAction() override
{
for (int ii = 0; ii < actions.count(); ++ii) {
const QQuickStateAction &action = actions.at(ii);
diff --git a/src/quick/items/qquickitemanimation_p.h b/src/quick/items/qquickitemanimation_p.h
index a503cff223..3b3fad9cc4 100644
--- a/src/quick/items/qquickitemanimation_p.h
+++ b/src/quick/items/qquickitemanimation_p.h
@@ -89,7 +89,7 @@ protected:
QAbstractAnimationJob* transition(QQuickStateActions &actions,
QQmlProperties &modified,
TransitionDirection direction,
- QObject *defaultTarget = 0) Q_DECL_OVERRIDE;
+ QObject *defaultTarget = 0) override;
};
class QQuickAnchorAnimationPrivate;
@@ -121,7 +121,7 @@ protected:
QAbstractAnimationJob* transition(QQuickStateActions &actions,
QQmlProperties &modified,
TransitionDirection direction,
- QObject *defaultTarget = 0) Q_DECL_OVERRIDE;
+ QObject *defaultTarget = 0) override;
};
#if QT_CONFIG(quick_path)
@@ -188,7 +188,7 @@ protected:
QAbstractAnimationJob* transition(QQuickStateActions &actions,
QQmlProperties &modified,
TransitionDirection direction,
- QObject *defaultTarget = 0) Q_DECL_OVERRIDE;
+ QObject *defaultTarget = 0) override;
Q_SIGNALS:
void durationChanged(int);
void easingChanged(const QEasingCurve &);
diff --git a/src/quick/items/qquickitemgrabresult.h b/src/quick/items/qquickitemgrabresult.h
index 30f8f0c2ef..3dc10e2d75 100644
--- a/src/quick/items/qquickitemgrabresult.h
+++ b/src/quick/items/qquickitemgrabresult.h
@@ -82,7 +82,7 @@ private Q_SLOTS:
private:
friend class QQuickItem;
- QQuickItemGrabResult(QObject *parent = Q_NULLPTR);
+ QQuickItemGrabResult(QObject *parent = nullptr);
};
QT_END_NAMESPACE
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp
index 1406e5b547..3c87496c83 100644
--- a/src/quick/items/qquickitemsmodule.cpp
+++ b/src/quick/items/qquickitemsmodule.cpp
@@ -156,6 +156,9 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor)
QQmlPrivate::RegisterAutoParent autoparent = { 0, &qquickitem_autoParent };
QQmlPrivate::qmlregister(QQmlPrivate::AutoParentRegistration, &autoparent);
+ // Register the latest version, even if there are no new types or new revisions for existing types yet.
+ qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
+
#if !QT_CONFIG(quick_animatedimage)
qmlRegisterTypeNotAvailable(uri,major,minor,"AnimatedImage", QCoreApplication::translate("QQuickAnimatedImage","Qt was built without support for QMovie"));
#else
diff --git a/src/quick/items/qquickitemview_p_p.h b/src/quick/items/qquickitemview_p_p.h
index 2c04022cde..374b8388ba 100644
--- a/src/quick/items/qquickitemview_p_p.h
+++ b/src/quick/items/qquickitemview_p_p.h
@@ -201,7 +201,7 @@ public:
void regenerate(bool orientationChanged=false);
void layout();
- virtual void animationFinished(QAbstractAnimationJob *) override;
+ void animationFinished(QAbstractAnimationJob *) override;
void refill();
void refill(qreal from, qreal to);
void mirrorChange() override;
diff --git a/src/quick/items/qquickloader_p.h b/src/quick/items/qquickloader_p.h
index db171dcd1e..27e5d1ec8b 100644
--- a/src/quick/items/qquickloader_p.h
+++ b/src/quick/items/qquickloader_p.h
@@ -105,8 +105,8 @@ Q_SIGNALS:
void asynchronousChanged();
protected:
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ void componentComplete() override;
private:
void setSource(const QUrl &sourceUrl, bool needsClear);
diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h
index 9b6267e011..7492527401 100644
--- a/src/quick/items/qquickloader_p_p.h
+++ b/src/quick/items/qquickloader_p_p.h
@@ -68,8 +68,8 @@ public:
QQuickLoaderIncubator(QQuickLoaderPrivate *l, IncubationMode mode) : QQmlIncubator(mode), loader(l) {}
protected:
- void statusChanged(Status) Q_DECL_OVERRIDE;
- void setInitialState(QObject *) Q_DECL_OVERRIDE;
+ void statusChanged(Status) override;
+ void setInitialState(QObject *) override;
private:
QQuickLoaderPrivate *loader;
@@ -84,9 +84,9 @@ public:
QQuickLoaderPrivate();
~QQuickLoaderPrivate();
- void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void itemImplicitWidthChanged(QQuickItem *) Q_DECL_OVERRIDE;
- void itemImplicitHeightChanged(QQuickItem *) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override;
+ void itemImplicitWidthChanged(QQuickItem *) override;
+ void itemImplicitHeightChanged(QQuickItem *) override;
void clear();
void initResize();
void load();
@@ -97,8 +97,8 @@ public:
static QUrl resolveSourceUrl(QQmlV4Function *args);
QV4::ReturnedValue extractInitialPropertyValues(QQmlV4Function *args, QObject *loader, bool *error);
- qreal getImplicitWidth() const Q_DECL_OVERRIDE;
- qreal getImplicitHeight() const Q_DECL_OVERRIDE;
+ qreal getImplicitWidth() const override;
+ qreal getImplicitHeight() const override;
QUrl source;
QQuickItem *item;
diff --git a/src/quick/items/qquickmousearea_p.h b/src/quick/items/qquickmousearea_p.h
index ee166a2082..ae6c56726e 100644
--- a/src/quick/items/qquickmousearea_p.h
+++ b/src/quick/items/qquickmousearea_p.h
@@ -164,25 +164,25 @@ protected:
bool setPressed(Qt::MouseButton button, bool p, Qt::MouseEventSource source);
bool sendMouseEvent(QMouseEvent *event);
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void hoverEnterEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverMoveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void hoverEnterEvent(QHoverEvent *event) override;
+ void hoverMoveEvent(QHoverEvent *event) override;
+ void hoverLeaveEvent(QHoverEvent *event) override;
#if QT_CONFIG(wheelevent)
- void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *event) override;
#endif
- bool childMouseEventFilter(QQuickItem *i, QEvent *e) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
- void windowDeactivateEvent() Q_DECL_OVERRIDE;
+ bool childMouseEventFilter(QQuickItem *i, QEvent *e) override;
+ void timerEvent(QTimerEvent *event) override;
+ void windowDeactivateEvent() override;
void geometryChanged(const QRectF &newGeometry,
- const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void itemChange(ItemChange change, const ItemChangeData& value) Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ const QRectF &oldGeometry) override;
+ void itemChange(ItemChange change, const ItemChangeData& value) override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
private:
void handlePress();
diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp
index 54136b1bbf..bdf30469ce 100644
--- a/src/quick/items/qquickmultipointtoucharea.cpp
+++ b/src/quick/items/qquickmultipointtoucharea.cpp
@@ -491,7 +491,7 @@ void QQuickMultiPointTouchArea::setMouseEnabled(bool arg)
if (_mouseEnabled != arg) {
_mouseEnabled = arg;
if (_mouseTouchPoint && !arg)
- _mouseTouchPoint = Q_NULLPTR;
+ _mouseTouchPoint = nullptr;
emit mouseEnabledChanged();
}
}
@@ -835,7 +835,7 @@ void QQuickMultiPointTouchArea::mouseReleaseEvent(QMouseEvent *event)
updateTouchData(event);
_mouseTouchPoint->setInUse(false);
_releasedTouchPoints.removeAll(_mouseTouchPoint);
- _mouseTouchPoint = Q_NULLPTR;
+ _mouseTouchPoint = nullptr;
}
QQuickWindow *c = window();
diff --git a/src/quick/items/qquickmultipointtoucharea_p.h b/src/quick/items/qquickmultipointtoucharea_p.h
index 25e1056712..64fe81563d 100644
--- a/src/quick/items/qquickmultipointtoucharea_p.h
+++ b/src/quick/items/qquickmultipointtoucharea_p.h
@@ -265,13 +265,13 @@ Q_SIGNALS:
void mouseEnabledChanged();
protected:
- void touchEvent(QTouchEvent *) Q_DECL_OVERRIDE;
- bool childMouseEventFilter(QQuickItem *receiver, QEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void touchUngrabEvent() Q_DECL_OVERRIDE;
+ void touchEvent(QTouchEvent *) override;
+ bool childMouseEventFilter(QQuickItem *receiver, QEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void touchUngrabEvent() override;
void addTouchPrototype(QQuickTouchPoint* prototype);
void addTouchPoint(const QTouchEvent::TouchPoint *p);
@@ -285,10 +285,10 @@ protected:
bool sendMouseEvent(QMouseEvent *event);
bool shouldFilter(QEvent *event);
void grabGesture();
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
#ifdef Q_OS_OSX
- void hoverEnterEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
+ void hoverEnterEvent(QHoverEvent *event) override;
+ void hoverLeaveEvent(QHoverEvent *event) override;
void setTouchEventsEnabled(bool enable);
#endif
diff --git a/src/quick/items/qquickopenglshadereffectnode.cpp b/src/quick/items/qquickopenglshadereffectnode.cpp
index 5dbfee73cb..a6431135eb 100644
--- a/src/quick/items/qquickopenglshadereffectnode.cpp
+++ b/src/quick/items/qquickopenglshadereffectnode.cpp
@@ -67,16 +67,16 @@ class QQuickCustomMaterialShader : public QSGMaterialShader
{
public:
QQuickCustomMaterialShader(const QQuickOpenGLShaderEffectMaterialKey &key, const QVector<QByteArray> &attributes);
- void deactivate() Q_DECL_OVERRIDE;
- void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) Q_DECL_OVERRIDE;
- char const *const *attributeNames() const Q_DECL_OVERRIDE;
+ void deactivate() override;
+ void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override;
+ char const *const *attributeNames() const override;
protected:
friend class QQuickOpenGLShaderEffectNode;
- void compile() Q_DECL_OVERRIDE;
- const char *vertexShader() const Q_DECL_OVERRIDE;
- const char *fragmentShader() const Q_DECL_OVERRIDE;
+ void compile() override;
+ const char *vertexShader() const override;
+ const char *fragmentShader() const override;
const QQuickOpenGLShaderEffectMaterialKey m_key;
QVector<QByteArray> m_attributes;
diff --git a/src/quick/items/qquickopenglshadereffectnode_p.h b/src/quick/items/qquickopenglshadereffectnode_p.h
index 784294d9eb..68eece7660 100644
--- a/src/quick/items/qquickopenglshadereffectnode_p.h
+++ b/src/quick/items/qquickopenglshadereffectnode_p.h
@@ -110,9 +110,9 @@ public:
};
explicit QQuickOpenGLShaderEffectMaterial(QQuickOpenGLShaderEffectNode *node = 0);
- QSGMaterialType *type() const Q_DECL_OVERRIDE;
- QSGMaterialShader *createShader() const Q_DECL_OVERRIDE;
- int compare(const QSGMaterial *other) const Q_DECL_OVERRIDE;
+ QSGMaterialType *type() const override;
+ QSGMaterialShader *createShader() const override;
+ int compare(const QSGMaterial *other) const override;
QVector<QByteArray> attributes;
QVector<UniformData> uniforms[QQuickOpenGLShaderEffectMaterialKey::ShaderTypeCount];
@@ -151,7 +151,7 @@ public:
QQuickOpenGLShaderEffectNode();
virtual ~QQuickOpenGLShaderEffectNode();
- void preprocess() Q_DECL_OVERRIDE;
+ void preprocess() override;
Q_SIGNALS:
void logAndStatusChanged(const QString &, int status);
diff --git a/src/quick/items/qquickpainteditem.h b/src/quick/items/qquickpainteditem.h
index e8b471ac01..66a0ea83c9 100644
--- a/src/quick/items/qquickpainteditem.h
+++ b/src/quick/items/qquickpainteditem.h
@@ -57,7 +57,7 @@ class Q_QUICK_EXPORT QQuickPaintedItem : public QQuickItem
Q_PROPERTY(QSize textureSize READ textureSize WRITE setTextureSize NOTIFY textureSizeChanged)
public:
- explicit QQuickPaintedItem(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickPaintedItem(QQuickItem *parent = nullptr);
virtual ~QQuickPaintedItem();
enum RenderTarget {
@@ -107,8 +107,8 @@ public:
virtual void paint(QPainter *painter) = 0;
- bool isTextureProvider() const Q_DECL_OVERRIDE;
- QSGTextureProvider *textureProvider() const Q_DECL_OVERRIDE;
+ bool isTextureProvider() const override;
+ QSGTextureProvider *textureProvider() const override;
Q_SIGNALS:
void fillColorChanged();
@@ -118,10 +118,10 @@ Q_SIGNALS:
void textureSizeChanged();
protected:
- QQuickPaintedItem(QQuickPaintedItemPrivate &dd, QQuickItem *parent = Q_NULLPTR);
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
- void releaseResources() Q_DECL_OVERRIDE;
- void itemChange(ItemChange, const ItemChangeData &) Q_DECL_OVERRIDE;
+ QQuickPaintedItem(QQuickPaintedItemPrivate &dd, QQuickItem *parent = nullptr);
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
+ void releaseResources() override;
+ void itemChange(ItemChange, const ItemChangeData &) override;
private Q_SLOTS:
void invalidateSceneGraph();
diff --git a/src/quick/items/qquickpincharea_p.h b/src/quick/items/qquickpincharea_p.h
index fc96594a4b..2363f1e2d4 100644
--- a/src/quick/items/qquickpincharea_p.h
+++ b/src/quick/items/qquickpincharea_p.h
@@ -286,13 +286,13 @@ Q_SIGNALS:
Q_REVISION(1) void smartZoom(QQuickPinchEvent *pinch);
protected:
- bool childMouseEventFilter(QQuickItem *i, QEvent *e) Q_DECL_OVERRIDE;
- void touchEvent(QTouchEvent *event) Q_DECL_OVERRIDE;
+ bool childMouseEventFilter(QQuickItem *i, QEvent *e) override;
+ void touchEvent(QTouchEvent *event) override;
void geometryChanged(const QRectF &newGeometry,
- const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void itemChange(ItemChange change, const ItemChangeData& value) Q_DECL_OVERRIDE;
- bool event(QEvent *) Q_DECL_OVERRIDE;
+ const QRectF &oldGeometry) override;
+ void itemChange(ItemChange change, const ItemChangeData& value) override;
+ bool event(QEvent *) override;
private:
void clearPinch();
diff --git a/src/quick/items/qquickpositioners_p.h b/src/quick/items/qquickpositioners_p.h
index 9ae7029d69..ce583aefe8 100644
--- a/src/quick/items/qquickpositioners_p.h
+++ b/src/quick/items/qquickpositioners_p.h
@@ -158,10 +158,10 @@ public:
protected:
QQuickBasePositioner(QQuickBasePositionerPrivate &dd, PositionerType at, QQuickItem *parent);
- void componentComplete() Q_DECL_OVERRIDE;
- void itemChange(ItemChange, const ItemChangeData &) Q_DECL_OVERRIDE;
+ void componentComplete() override;
+ void itemChange(ItemChange, const ItemChangeData &) override;
- void updatePolish() Q_DECL_OVERRIDE;
+ void updatePolish() override;
Q_SIGNALS:
void spacingChanged();
@@ -234,8 +234,8 @@ public:
QQuickColumn(QQuickItem *parent=0);
protected:
- void doPositioning(QSizeF *contentSize) Q_DECL_OVERRIDE;
- void reportConflictingAnchors() Q_DECL_OVERRIDE;
+ void doPositioning(QSizeF *contentSize) override;
+ void reportConflictingAnchors() override;
private:
Q_DISABLE_COPY(QQuickColumn)
};
@@ -258,8 +258,8 @@ Q_SIGNALS:
void effectiveLayoutDirectionChanged();
protected:
- void doPositioning(QSizeF *contentSize) Q_DECL_OVERRIDE;
- void reportConflictingAnchors() Q_DECL_OVERRIDE;
+ void doPositioning(QSizeF *contentSize) override;
+ void reportConflictingAnchors() override;
private:
Q_DISABLE_COPY(QQuickRow)
Q_DECLARE_PRIVATE(QQuickRow)
@@ -335,8 +335,8 @@ Q_SIGNALS:
Q_REVISION(1) void verticalAlignmentChanged(VAlignment alignment);
protected:
- void doPositioning(QSizeF *contentSize) Q_DECL_OVERRIDE;
- void reportConflictingAnchors() Q_DECL_OVERRIDE;
+ void doPositioning(QSizeF *contentSize) override;
+ void reportConflictingAnchors() override;
private:
int m_rows;
@@ -377,8 +377,8 @@ Q_SIGNALS:
void effectiveLayoutDirectionChanged();
protected:
- void doPositioning(QSizeF *contentSize) Q_DECL_OVERRIDE;
- void reportConflictingAnchors() Q_DECL_OVERRIDE;
+ void doPositioning(QSizeF *contentSize) override;
+ void reportConflictingAnchors() override;
protected:
QQuickFlow(QQuickFlowPrivate &dd, QQuickItem *parent);
private:
diff --git a/src/quick/items/qquickpositioners_p_p.h b/src/quick/items/qquickpositioners_p_p.h
index 0be4c56df6..f4cb283a22 100644
--- a/src/quick/items/qquickpositioners_p_p.h
+++ b/src/quick/items/qquickpositioners_p_p.h
@@ -122,7 +122,7 @@ public:
Qt::LayoutDirection layoutDirection;
- void mirrorChange() Q_DECL_OVERRIDE {
+ void mirrorChange() override {
effectiveLayoutDirectionChange();
}
bool isLeftToRight() const {
@@ -132,24 +132,24 @@ public:
return effectiveLayoutMirror ? layoutDirection == Qt::RightToLeft : layoutDirection == Qt::LeftToRight;
}
- void itemSiblingOrderChanged(QQuickItem* other) Q_DECL_OVERRIDE
+ void itemSiblingOrderChanged(QQuickItem* other) override
{
Q_UNUSED(other);
setPositioningDirty();
}
- void itemGeometryChanged(QQuickItem *, QQuickGeometryChange change, const QRectF &) Q_DECL_OVERRIDE
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange change, const QRectF &) override
{
if (change.sizeChange())
setPositioningDirty();
}
- void itemVisibilityChanged(QQuickItem *) Q_DECL_OVERRIDE
+ void itemVisibilityChanged(QQuickItem *) override
{
setPositioningDirty();
}
- void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE
+ void itemDestroyed(QQuickItem *item) override
{
Q_Q(QQuickBasePositioner);
int index = q->positionedItems.find(QQuickBasePositioner::PositionedItem(item));
diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h
index 724a06013c..52f0bc975b 100644
--- a/src/quick/items/qquickrectangle_p.h
+++ b/src/quick/items/qquickrectangle_p.h
@@ -170,7 +170,7 @@ Q_SIGNALS:
void radiusChanged();
protected:
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
private Q_SLOTS:
void doUpdate();
diff --git a/src/quick/items/qquickrendercontrol.h b/src/quick/items/qquickrendercontrol.h
index 31ea176cc1..a626216f84 100644
--- a/src/quick/items/qquickrendercontrol.h
+++ b/src/quick/items/qquickrendercontrol.h
@@ -55,7 +55,7 @@ class Q_QUICK_EXPORT QQuickRenderControl : public QObject
Q_OBJECT
public:
- explicit QQuickRenderControl(QObject *parent = Q_NULLPTR);
+ explicit QQuickRenderControl(QObject *parent = nullptr);
~QQuickRenderControl();
void prepareThread(QThread *targetThread);
@@ -68,8 +68,8 @@ public:
QImage grab();
- static QWindow *renderWindowFor(QQuickWindow *win, QPoint *offset = Q_NULLPTR);
- virtual QWindow *renderWindow(QPoint *offset) { Q_UNUSED(offset); return Q_NULLPTR; }
+ static QWindow *renderWindowFor(QQuickWindow *win, QPoint *offset = nullptr);
+ virtual QWindow *renderWindow(QPoint *offset) { Q_UNUSED(offset); return nullptr; }
Q_SIGNALS:
void renderRequested();
diff --git a/src/quick/items/qquickrepeater_p.h b/src/quick/items/qquickrepeater_p.h
index c14c1fb8cb..b630999547 100644
--- a/src/quick/items/qquickrepeater_p.h
+++ b/src/quick/items/qquickrepeater_p.h
@@ -94,8 +94,8 @@ private:
void regenerate();
protected:
- void componentComplete() Q_DECL_OVERRIDE;
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
+ void componentComplete() override;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
private Q_SLOTS:
void createdItem(int index, QObject *item);
diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp
index 8f0866f417..592485d6fa 100644
--- a/src/quick/items/qquickshadereffect.cpp
+++ b/src/quick/items/qquickshadereffect.cpp
@@ -876,7 +876,7 @@ void QQuickShaderEffectPrivate::updatePolish()
#if QT_CONFIG(opengl)
bool QQuickShaderEffect::isOpenGLShaderEffect() const
{
- return m_glImpl != Q_NULLPTR;
+ return m_glImpl != nullptr;
}
#endif
diff --git a/src/quick/items/qquickshadereffectmesh_p.h b/src/quick/items/qquickshadereffectmesh_p.h
index aa3112b5a5..f3ac956f60 100644
--- a/src/quick/items/qquickshadereffectmesh_p.h
+++ b/src/quick/items/qquickshadereffectmesh_p.h
@@ -95,10 +95,10 @@ class QQuickGridMesh : public QQuickShaderEffectMesh
Q_PROPERTY(QSize resolution READ resolution WRITE setResolution NOTIFY resolutionChanged)
public:
QQuickGridMesh(QObject *parent = 0);
- bool validateAttributes(const QVector<QByteArray> &attributes, int *posIndex) Q_DECL_OVERRIDE;
+ bool validateAttributes(const QVector<QByteArray> &attributes, int *posIndex) override;
QSGGeometry *updateGeometry(QSGGeometry *geometry, int attrCount, int posIndex,
- const QRectF &srcRect, const QRectF &rect) Q_DECL_OVERRIDE;
- QString log() const Q_DECL_OVERRIDE { return m_log; }
+ const QRectF &srcRect, const QRectF &rect) override;
+ QString log() const override { return m_log; }
void setResolution(const QSize &res);
QSize resolution() const;
diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp
index f61bad1179..b4a45431c5 100644
--- a/src/quick/items/qquickshadereffectsource.cpp
+++ b/src/quick/items/qquickshadereffectsource.cpp
@@ -87,7 +87,7 @@ public:
: texture(t)
, provider(p)
{}
- void run() Q_DECL_OVERRIDE {
+ void run() override {
delete texture;
delete provider;
}
diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h
index d9f9079a3d..185c5179b6 100644
--- a/src/quick/items/qquickshadereffectsource_p.h
+++ b/src/quick/items/qquickshadereffectsource_p.h
@@ -146,8 +146,8 @@ public:
TextureMirroring textureMirroring() const;
void setTextureMirroring(TextureMirroring mirroring);
- bool isTextureProvider() const Q_DECL_OVERRIDE { return true; }
- QSGTextureProvider *textureProvider() const Q_DECL_OVERRIDE;
+ bool isTextureProvider() const override { return true; }
+ QSGTextureProvider *textureProvider() const override;
Q_INVOKABLE void scheduleUpdate();
@@ -174,11 +174,11 @@ private Q_SLOTS:
void invalidateSceneGraph();
protected:
- void releaseResources() Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ void releaseResources() override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
- void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) Q_DECL_OVERRIDE;
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
private:
void ensureTexture();
diff --git a/src/quick/items/qquicksprite_p.h b/src/quick/items/qquicksprite_p.h
index d68a45ecc0..2f7f6da5c0 100644
--- a/src/quick/items/qquicksprite_p.h
+++ b/src/quick/items/qquicksprite_p.h
@@ -161,7 +161,7 @@ public:
return m_frameDurationVariation;
}
- int variedDuration() const Q_DECL_OVERRIDE;
+ int variedDuration() const override;
bool frameSync() const
{
diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h
index 4e5458a938..a1c156fa94 100644
--- a/src/quick/items/qquickspriteengine_p.h
+++ b/src/quick/items/qquickspriteengine_p.h
@@ -290,8 +290,8 @@ public:
int spriteCount() const;//Like state count
int maxFrames() const;
- void restart(int index=0) Q_DECL_OVERRIDE;
- void advance(int index=0) Q_DECL_OVERRIDE;
+ void restart(int index=0) override;
+ void advance(int index=0) override;
//Similar API to QQuickPixmap for async loading convenience
bool isNull() const { return status() == QQuickPixmap::Null; }
diff --git a/src/quick/items/qquickspritesequence_p.h b/src/quick/items/qquickspritesequence_p.h
index b80a8348aa..ffcefecaec 100644
--- a/src/quick/items/qquickspritesequence_p.h
+++ b/src/quick/items/qquickspritesequence_p.h
@@ -105,7 +105,7 @@ private Q_SLOTS:
protected:
void reset();
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
private:
void prepareNextFrame(QSGSpriteNode *node);
QSGSpriteNode* initNode();
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp
index a4ce13a199..386bb058b5 100644
--- a/src/quick/items/qquickstateoperations.cpp
+++ b/src/quick/items/qquickstateoperations.cpp
@@ -510,7 +510,7 @@ QQuickStateActionEvent::EventType QQuickParentChange::type() const
return ParentChange;
}
-bool QQuickParentChange::override(QQuickStateActionEvent*other)
+bool QQuickParentChange::mayOverride(QQuickStateActionEvent*other)
{
Q_D(QQuickParentChange);
if (other->type() != ParentChange)
@@ -1302,7 +1302,7 @@ void QQuickAnchorChanges::clearBindings()
}
}
-bool QQuickAnchorChanges::override(QQuickStateActionEvent*other)
+bool QQuickAnchorChanges::mayOverride(QQuickStateActionEvent*other)
{
if (other->type() != AnchorChanges)
return false;
diff --git a/src/quick/items/qquickstateoperations_p.h b/src/quick/items/qquickstateoperations_p.h
index 48b4b23a76..d61ed294cb 100644
--- a/src/quick/items/qquickstateoperations_p.h
+++ b/src/quick/items/qquickstateoperations_p.h
@@ -110,17 +110,17 @@ public:
void setRotation(QQmlScriptString rotation);
bool rotationIsSet() const;
- ActionList actions() Q_DECL_OVERRIDE;
+ ActionList actions() override;
- void saveOriginals() Q_DECL_OVERRIDE;
+ void saveOriginals() override;
//virtual void copyOriginals(QQuickStateActionEvent*);
- void execute() Q_DECL_OVERRIDE;
- bool isReversable() Q_DECL_OVERRIDE;
- void reverse() Q_DECL_OVERRIDE;
- EventType type() const Q_DECL_OVERRIDE;
- bool override(QQuickStateActionEvent*other) Q_DECL_OVERRIDE;
- void rewind() Q_DECL_OVERRIDE;
- void saveCurrentValues() Q_DECL_OVERRIDE;
+ void execute() override;
+ bool isReversable() override;
+ void reverse() override;
+ EventType type() const override;
+ bool mayOverride(QQuickStateActionEvent*other) override;
+ void rewind() override;
+ void saveCurrentValues() override;
};
class QQuickAnchorChanges;
@@ -190,28 +190,28 @@ public:
QQuickAnchorChanges(QObject *parent=0);
~QQuickAnchorChanges();
- ActionList actions() Q_DECL_OVERRIDE;
+ ActionList actions() override;
QQuickAnchorSet *anchors() const;
QQuickItem *object() const;
void setObject(QQuickItem *);
- void execute() Q_DECL_OVERRIDE;
- bool isReversable() Q_DECL_OVERRIDE;
- void reverse() Q_DECL_OVERRIDE;
- EventType type() const Q_DECL_OVERRIDE;
- bool override(QQuickStateActionEvent*other) Q_DECL_OVERRIDE;
- bool changesBindings() Q_DECL_OVERRIDE;
- void saveOriginals() Q_DECL_OVERRIDE;
- bool needsCopy() Q_DECL_OVERRIDE { return true; }
- void copyOriginals(QQuickStateActionEvent*) Q_DECL_OVERRIDE;
- void clearBindings() Q_DECL_OVERRIDE;
- void rewind() Q_DECL_OVERRIDE;
- void saveCurrentValues() Q_DECL_OVERRIDE;
+ void execute() override;
+ bool isReversable() override;
+ void reverse() override;
+ EventType type() const override;
+ bool mayOverride(QQuickStateActionEvent*other) override;
+ bool changesBindings() override;
+ void saveOriginals() override;
+ bool needsCopy() override { return true; }
+ void copyOriginals(QQuickStateActionEvent*) override;
+ void clearBindings() override;
+ void rewind() override;
+ void saveCurrentValues() override;
QList<QQuickStateAction> additionalActions() const;
- void saveTargetValues() Q_DECL_OVERRIDE;
+ void saveTargetValues() override;
};
QT_END_NAMESPACE
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h
index a56bcdb87b..6c48dd86a9 100644
--- a/src/quick/items/qquicktext_p.h
+++ b/src/quick/items/qquicktext_p.h
@@ -212,15 +212,15 @@ public:
FontSizeMode fontSizeMode() const;
void setFontSizeMode(FontSizeMode mode);
- void componentComplete() Q_DECL_OVERRIDE;
+ void componentComplete() override;
int resourcesLoading() const; // mainly for testing
qreal contentWidth() const;
qreal contentHeight() const;
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QRectF clipRect() const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QRectF clipRect() const override;
Q_INVOKABLE void doLayout(); // ### Qt 6: remove
Q_REVISION(9) Q_INVOKABLE void forceLayout();
@@ -291,18 +291,18 @@ Q_SIGNALS:
protected:
QQuickText(QQuickTextPrivate &dd, QQuickItem *parent = 0);
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
void geometryChanged(const QRectF &newGeometry,
- const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ const QRectF &oldGeometry) override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
- void updatePolish() Q_DECL_OVERRIDE;
+ void updatePolish() override;
- void hoverEnterEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverMoveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
+ void hoverEnterEvent(QHoverEvent *event) override;
+ void hoverMoveEvent(QHoverEvent *event) override;
+ void hoverLeaveEvent(QHoverEvent *event) override;
void invalidateFontCaches();
private Q_SLOTS:
diff --git a/src/quick/items/qquicktext_p_p.h b/src/quick/items/qquicktext_p_p.h
index 87f5162384..6fd0876a5f 100644
--- a/src/quick/items/qquicktext_p_p.h
+++ b/src/quick/items/qquicktext_p_p.h
@@ -78,7 +78,7 @@ public:
void updateLayout();
bool determineHorizontalAlignment();
bool setHAlign(QQuickText::HAlignment, bool forceAlign = false);
- void mirrorChange() Q_DECL_OVERRIDE;
+ void mirrorChange() override;
bool isLineLaidOutConnected();
void setLineGeometry(QTextLine &line, qreal lineWidth, qreal &height);
@@ -177,8 +177,8 @@ public:
static const QChar elideChar;
- qreal getImplicitWidth() const Q_DECL_OVERRIDE;
- qreal getImplicitHeight() const Q_DECL_OVERRIDE;
+ qreal getImplicitWidth() const override;
+ qreal getImplicitHeight() const override;
qreal availableWidth() const;
qreal availableHeight() const;
diff --git a/src/quick/items/qquicktextcontrol_p.h b/src/quick/items/qquicktextcontrol_p.h
index 70104a97e0..862a81af28 100644
--- a/src/quick/items/qquicktextcontrol_p.h
+++ b/src/quick/items/qquicktextcontrol_p.h
@@ -177,9 +177,9 @@ public:
bool cursorOn() const;
protected:
- void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *e) override;
- bool event(QEvent *e) Q_DECL_OVERRIDE;
+ bool event(QEvent *e) override;
private:
Q_DISABLE_COPY(QQuickTextControl)
diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h
index 23033edb88..c883e39168 100644
--- a/src/quick/items/qquicktextedit_p.h
+++ b/src/quick/items/qquicktextedit_p.h
@@ -235,7 +235,7 @@ public:
bool canUndo() const;
bool canRedo() const;
- void componentComplete() Q_DECL_OVERRIDE;
+ void componentComplete() override;
/* FROM EDIT */
void setReadOnly(bool);
@@ -244,7 +244,7 @@ public:
QRectF cursorRectangle() const;
#if QT_CONFIG(im)
- QVariant inputMethodQuery(Qt::InputMethodQuery property) const Q_DECL_OVERRIDE;
+ QVariant inputMethodQuery(Qt::InputMethodQuery property) const override;
Q_REVISION(4) Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const;
#endif
@@ -260,8 +260,8 @@ public:
Q_INVOKABLE void moveCursorSelection(int pos);
Q_INVOKABLE void moveCursorSelection(int pos, SelectionMode mode);
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QRectF clipRect() const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QRectF clipRect() const override;
bool isInputMethodComposing() const;
@@ -387,28 +387,28 @@ protected:
QQuickTextEdit(QQuickTextEditPrivate &dd, QQuickItem *parent = 0);
void geometryChanged(const QRectF &newGeometry,
- const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ const QRectF &oldGeometry) override;
- bool event(QEvent *) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *) Q_DECL_OVERRIDE;
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *) override;
+ void keyPressEvent(QKeyEvent *) override;
+ void keyReleaseEvent(QKeyEvent *) override;
+ void focusInEvent(QFocusEvent *event) override;
+ void focusOutEvent(QFocusEvent *event) override;
- void hoverEnterEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverMoveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
+ void hoverEnterEvent(QHoverEvent *event) override;
+ void hoverMoveEvent(QHoverEvent *event) override;
+ void hoverLeaveEvent(QHoverEvent *event) override;
// mouse filter?
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
#if QT_CONFIG(im)
- void inputMethodEvent(QInputMethodEvent *e) Q_DECL_OVERRIDE;
+ void inputMethodEvent(QInputMethodEvent *e) override;
#endif
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) Q_DECL_OVERRIDE;
- void updatePolish() Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override;
+ void updatePolish() override;
friend class QQuickTextUtil;
friend class QQuickTextDocument;
diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h
index 455fffbcbc..09718cb49a 100644
--- a/src/quick/items/qquicktextedit_p_p.h
+++ b/src/quick/items/qquicktextedit_p_p.h
@@ -143,8 +143,8 @@ public:
void relayoutDocument();
bool determineHorizontalAlignment();
bool setHAlign(QQuickTextEdit::HAlignment, bool forceAlign = false);
- void mirrorChange() Q_DECL_OVERRIDE;
- qreal getImplicitWidth() const Q_DECL_OVERRIDE;
+ void mirrorChange() override;
+ qreal getImplicitWidth() const override;
Qt::LayoutDirection textDirection(const QString &text) const;
bool isLinkHoveredConnected();
diff --git a/src/quick/items/qquicktextinput_p.h b/src/quick/items/qquicktextinput_p.h
index c4da807471..b7d3fb00fa 100644
--- a/src/quick/items/qquicktextinput_p.h
+++ b/src/quick/items/qquicktextinput_p.h
@@ -118,7 +118,7 @@ public:
QQuickTextInput(QQuickItem * parent=0);
~QQuickTextInput();
- void componentComplete() Q_DECL_OVERRIDE;
+ void componentComplete() override;
enum EchoMode {//To match QLineEdit::EchoMode
Normal,
@@ -267,12 +267,12 @@ public:
bool hasAcceptableInput() const;
#if QT_CONFIG(im)
- QVariant inputMethodQuery(Qt::InputMethodQuery property) const Q_DECL_OVERRIDE;
+ QVariant inputMethodQuery(Qt::InputMethodQuery property) const override;
Q_REVISION(3) Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const;
#endif
- QRectF boundingRect() const Q_DECL_OVERRIDE;
- QRectF clipRect() const Q_DECL_OVERRIDE;
+ QRectF boundingRect() const override;
+ QRectF clipRect() const override;
bool canPaste() const;
@@ -366,23 +366,23 @@ protected:
QQuickTextInput(QQuickTextInputPrivate &dd, QQuickItem *parent = 0);
void geometryChanged(const QRectF &newGeometry,
- const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ const QRectF &oldGeometry) override;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent* ev) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void keyPressEvent(QKeyEvent* ev) override;
#if QT_CONFIG(im)
- void inputMethodEvent(QInputMethodEvent *) Q_DECL_OVERRIDE;
+ void inputMethodEvent(QInputMethodEvent *) override;
#endif
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- bool event(QEvent *e) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) Q_DECL_OVERRIDE;
- void updatePolish() Q_DECL_OVERRIDE;
+ void mouseUngrabEvent() override;
+ bool event(QEvent *e) override;
+ void focusOutEvent(QFocusEvent *event) override;
+ void focusInEvent(QFocusEvent *event) override;
+ void timerEvent(QTimerEvent *event) override;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override;
+ void updatePolish() override;
public Q_SLOTS:
void selectAll();
diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h
index c3218197a4..c795aebfa9 100644
--- a/src/quick/items/qquicktextinput_p_p.h
+++ b/src/quick/items/qquicktextinput_p_p.h
@@ -172,7 +172,7 @@ public:
void updateVerticalScroll();
bool determineHorizontalAlignment();
bool setHAlign(QQuickTextInput::HAlignment, bool forceAlign = false);
- void mirrorChange() Q_DECL_OVERRIDE;
+ void mirrorChange() override;
bool sendMouseEventToInputContext(QMouseEvent *event);
#if QT_CONFIG(im)
Qt::InputMethodHints effectiveInputMethodHints() const;
@@ -451,7 +451,7 @@ public:
void updateLayout();
void updateBaselineOffset();
- qreal getImplicitWidth() const Q_DECL_OVERRIDE;
+ qreal getImplicitWidth() const override;
inline qreal padding() const { return extra.isAllocated() ? extra->padding : 0.0; }
void setTopPadding(qreal value, bool reset = false);
diff --git a/src/quick/items/qquicktranslate_p.h b/src/quick/items/qquicktranslate_p.h
index 1bceba20cf..b0199cef40 100644
--- a/src/quick/items/qquicktranslate_p.h
+++ b/src/quick/items/qquicktranslate_p.h
@@ -75,7 +75,7 @@ public:
qreal y() const;
void setY(qreal);
- void applyTo(QMatrix4x4 *matrix) const Q_DECL_OVERRIDE;
+ void applyTo(QMatrix4x4 *matrix) const override;
Q_SIGNALS:
void xChanged();
@@ -111,7 +111,7 @@ public:
qreal zScale() const;
void setZScale(qreal);
- void applyTo(QMatrix4x4 *matrix) const Q_DECL_OVERRIDE;
+ void applyTo(QMatrix4x4 *matrix) const override;
Q_SIGNALS:
void originChanged();
@@ -146,7 +146,7 @@ public:
void setAxis(const QVector3D &axis);
void setAxis(Qt::Axis axis);
- void applyTo(QMatrix4x4 *matrix) const Q_DECL_OVERRIDE;
+ void applyTo(QMatrix4x4 *matrix) const override;
Q_SIGNALS:
void originChanged();
@@ -170,7 +170,7 @@ public:
QMatrix4x4 matrix() const;
void setMatrix(const QMatrix4x4& matrix);
- void applyTo(QMatrix4x4 *matrix) const Q_DECL_OVERRIDE;
+ void applyTo(QMatrix4x4 *matrix) const override;
Q_SIGNALS:
void matrixChanged();
diff --git a/src/quick/items/qquickview.h b/src/quick/items/qquickview.h
index 6d3b30e4c4..142607fa39 100644
--- a/src/quick/items/qquickview.h
+++ b/src/quick/items/qquickview.h
@@ -60,9 +60,9 @@ class Q_QUICK_EXPORT QQuickView : public QQuickWindow
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
Q_PROPERTY(QUrl source READ source WRITE setSource DESIGNABLE true)
public:
- explicit QQuickView(QWindow *parent = Q_NULLPTR);
+ explicit QQuickView(QWindow *parent = nullptr);
QQuickView(QQmlEngine* engine, QWindow *parent);
- explicit QQuickView(const QUrl &source, QWindow *parent = Q_NULLPTR);
+ explicit QQuickView(const QUrl &source, QWindow *parent = nullptr);
virtual ~QQuickView();
QUrl source() const;
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 45c14f10a1..caae188ed8 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -132,7 +132,7 @@ public:
}
protected:
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE
+ void timerEvent(QTimerEvent *) override
{
killTimer(m_timer);
m_timer = 0;
@@ -163,7 +163,7 @@ public slots:
void animationStopped() { incubate(); }
protected:
- void incubatingObjectCountChanged(int count) Q_DECL_OVERRIDE
+ void incubatingObjectCountChanged(int count) override
{
if (count && !m_renderLoop->interleaveIncubation())
incubateAgain();
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h
index 022c4738f2..58cfff5ace 100644
--- a/src/quick/items/qquickwindow.h
+++ b/src/quick/items/qquickwindow.h
@@ -106,7 +106,7 @@ public:
};
Q_ENUM(TextRenderType)
- explicit QQuickWindow(QWindow *parent = Q_NULLPTR);
+ explicit QQuickWindow(QWindow *parent = nullptr);
explicit QQuickWindow(QQuickRenderControl *renderControl);
virtual ~QQuickWindow();
@@ -114,7 +114,7 @@ public:
QQuickItem *contentItem() const;
QQuickItem *activeFocusItem() const;
- QObject *focusObject() const Q_DECL_OVERRIDE;
+ QObject *focusObject() const override;
QQuickItem *mouseGrabberItem() const;
@@ -136,7 +136,7 @@ public:
QQmlIncubationController *incubationController() const;
#if QT_CONFIG(accessibility)
- QAccessibleInterface *accessibleRoot() const Q_DECL_OVERRIDE;
+ QAccessibleInterface *accessibleRoot() const override;
#endif
// Scene graph specific functions
@@ -202,27 +202,27 @@ public Q_SLOTS:
void releaseResources();
protected:
- QQuickWindow(QQuickWindowPrivate &dd, QWindow *parent = Q_NULLPTR);
+ QQuickWindow(QQuickWindowPrivate &dd, QWindow *parent = nullptr);
- void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *) override;
+ void resizeEvent(QResizeEvent *) override;
- void showEvent(QShowEvent *) Q_DECL_OVERRIDE;
- void hideEvent(QHideEvent *) Q_DECL_OVERRIDE;
+ void showEvent(QShowEvent *) override;
+ void hideEvent(QHideEvent *) override;
// TODO Qt 6: reimplement QWindow::closeEvent to emit closing
- void focusInEvent(QFocusEvent *) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent *) override;
+ void focusOutEvent(QFocusEvent *) override;
- bool event(QEvent *) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ bool event(QEvent *) override;
+ void keyPressEvent(QKeyEvent *) override;
+ void keyReleaseEvent(QKeyEvent *) override;
+ void mousePressEvent(QMouseEvent *) override;
+ void mouseReleaseEvent(QMouseEvent *) override;
+ void mouseDoubleClickEvent(QMouseEvent *) override;
+ void mouseMoveEvent(QMouseEvent *) override;
#if QT_CONFIG(wheelevent)
- void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *) override;
#endif
private Q_SLOTS:
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index 2d7b81cec8..06891406ab 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -334,7 +334,7 @@ class QQuickWindowQObjectCleanupJob : public QRunnable
{
public:
QQuickWindowQObjectCleanupJob(QObject *o) : object(o) { }
- void run() Q_DECL_OVERRIDE { delete object; }
+ void run() override { delete object; }
QObject *object;
static void schedule(QQuickWindow *window, QObject *object) {
Q_ASSERT(window);
diff --git a/src/quick/items/qquickwindowattached.cpp b/src/quick/items/qquickwindowattached.cpp
index c8d71139ca..ae62a7a496 100644
--- a/src/quick/items/qquickwindowattached.cpp
+++ b/src/quick/items/qquickwindowattached.cpp
@@ -68,12 +68,12 @@ bool QQuickWindowAttached::isActive() const
QQuickItem *QQuickWindowAttached::activeFocusItem() const
{
- return (m_window ? m_window->activeFocusItem() : Q_NULLPTR);
+ return (m_window ? m_window->activeFocusItem() : nullptr);
}
QQuickItem *QQuickWindowAttached::contentItem() const
{
- return (m_window ? m_window->contentItem() : Q_NULLPTR);
+ return (m_window ? m_window->contentItem() : nullptr);
}
int QQuickWindowAttached::width() const
diff --git a/src/quick/items/qquickwindowmodule_p.h b/src/quick/items/qquickwindowmodule_p.h
index 869d5b9a8e..e7033e9b8d 100644
--- a/src/quick/items/qquickwindowmodule_p.h
+++ b/src/quick/items/qquickwindowmodule_p.h
@@ -70,7 +70,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickWindowQmlImpl : public QQuickWindow, public Q
Q_PROPERTY(QObject *screen READ screen WRITE setScreen NOTIFY screenChanged REVISION 2)
public:
- QQuickWindowQmlImpl(QWindow *parent = Q_NULLPTR);
+ QQuickWindowQmlImpl(QWindow *parent = nullptr);
void setVisible(bool visible);
void setVisibility(Visibility visibility);
@@ -86,8 +86,8 @@ Q_SIGNALS:
Q_REVISION(2) void screenChanged();
protected:
- void classBegin() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void classBegin() override;
+ void componentComplete() override;
private Q_SLOTS:
void setWindowVisibility();
diff --git a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
index eb9e7cea7c..304dc008d5 100644
--- a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
+++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
@@ -90,7 +90,7 @@ Q_SIGNALS:
void sceneGraphChanged();
protected:
- explicit QSGAbstractRenderer(QObject *parent = Q_NULLPTR);
+ explicit QSGAbstractRenderer(QObject *parent = nullptr);
virtual void nodeChanged(QSGNode *node, QSGNode::DirtyState state) = 0;
private:
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
index b0a14d23b9..5c39242029 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
@@ -627,9 +627,9 @@ public:
};
protected:
- void nodeChanged(QSGNode *node, QSGNode::DirtyState state) Q_DECL_OVERRIDE;
- void render() Q_DECL_OVERRIDE;
- void releaseCachedResources() Q_DECL_OVERRIDE;
+ void nodeChanged(QSGNode *node, QSGNode::DirtyState state) override;
+ void render() override;
+ void releaseCachedResources() override;
private:
enum ClipTypeBit
@@ -698,7 +698,7 @@ private:
void visualizeOverdraw();
void visualizeOverdraw_helper(Node *node);
void visualizeDrawGeometry(const QSGGeometry *g);
- void setCustomRenderMode(const QByteArray &mode) Q_DECL_OVERRIDE;
+ void setCustomRenderMode(const QByteArray &mode) override;
QSGDefaultRenderContext *m_context;
QSet<Node *> m_taggedRoots;
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h
index 1467f2233d..f2708b2b96 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.h
+++ b/src/quick/scenegraph/coreapi/qsgnode.h
@@ -151,7 +151,7 @@ public:
QT_DEPRECATED void clearDirty() { }
void markDirty(DirtyState bits);
- QT_DEPRECATED DirtyState dirtyState() const { return Q_NULLPTR; }
+ QT_DEPRECATED DirtyState dirtyState() const { return nullptr; }
virtual bool isSubtreeBlocked() const;
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer_p.h b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
index 1cb4c56316..b890728fd8 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
@@ -86,8 +86,8 @@ public:
bool isMirrored() const;
void renderScene(const QSGBindable &bindable);
- virtual void renderScene(uint fboId = 0) Q_DECL_OVERRIDE;
- virtual void nodeChanged(QSGNode *node, QSGNode::DirtyState state) Q_DECL_OVERRIDE;
+ void renderScene(uint fboId = 0) override;
+ void nodeChanged(QSGNode *node, QSGNode::DirtyState state) override;
QSGNodeUpdater *nodeUpdater() const;
void setNodeUpdater(QSGNodeUpdater *updater);
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index d460794573..fb66a6ebb1 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -143,7 +143,7 @@ public:
qCDebug(QSG_LOG_INFO, "Animation Driver: using walltime");
}
- void start() Q_DECL_OVERRIDE
+ void start() override
{
m_time = 0;
m_timer.start();
@@ -151,14 +151,14 @@ public:
QAnimationDriver::start();
}
- qint64 elapsed() const Q_DECL_OVERRIDE
+ qint64 elapsed() const override
{
return m_mode == VSyncMode
? qint64(m_time)
: qint64(m_time) + m_wallTime.elapsed();
}
- void advance() Q_DECL_OVERRIDE
+ void advance() override
{
qint64 delta = m_timer.restart();
diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h
index 5914b42809..02d4b79b76 100644
--- a/src/quick/scenegraph/qsgcontextplugin_p.h
+++ b/src/quick/scenegraph/qsgcontextplugin_p.h
@@ -90,7 +90,7 @@ public:
explicit QSGContextPlugin(QObject *parent = 0);
virtual ~QSGContextPlugin();
- virtual QStringList keys() const override = 0;
+ QStringList keys() const override = 0;
QQuickTextureFactory *createTextureFactoryFromImage(const QImage &) override { return 0; }
QSGRenderLoop *createWindowManager() override { return 0; }
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
index edb6e92a0d..0169f097bc 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
@@ -301,7 +301,7 @@ public:
setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/32bitcolortext.frag"));
}
- void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) Q_DECL_OVERRIDE;
+ void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override;
};
void QSG32BitColorTextShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect)
@@ -310,7 +310,7 @@ void QSG32BitColorTextShader::updateState(const RenderState &state, QSGMaterial
QSGTextMaskMaterial *material = static_cast<QSGTextMaskMaterial *>(newEffect);
QSGTextMaskMaterial *oldMaterial = static_cast<QSGTextMaskMaterial *>(oldEffect);
- if (oldMaterial == Q_NULLPTR || material->color() != oldMaterial->color() || state.isOpacityDirty()) {
+ if (oldMaterial == nullptr || material->color() != oldMaterial->color() || state.isOpacityDirty()) {
float opacity = material->color().w() * state.opacity();
program()->setUniformValue(m_color_id, opacity);
}
diff --git a/src/quick/scenegraph/qsgdefaultlayer.cpp b/src/quick/scenegraph/qsgdefaultlayer.cpp
index 86d74acf54..cd9c4a9a90 100644
--- a/src/quick/scenegraph/qsgdefaultlayer.cpp
+++ b/src/quick/scenegraph/qsgdefaultlayer.cpp
@@ -60,7 +60,7 @@ namespace
public:
BindableFbo(QOpenGLFramebufferObject *fbo, QSGDepthStencilBuffer *depthStencil);
virtual ~BindableFbo();
- void bind() const Q_DECL_OVERRIDE;
+ void bind() const override;
private:
QOpenGLFramebufferObject *m_fbo;
QSGDepthStencilBuffer *m_depthStencil;
diff --git a/src/quick/scenegraph/qsgdefaultlayer_p.h b/src/quick/scenegraph/qsgdefaultlayer_p.h
index 7b09293095..06355e0c21 100644
--- a/src/quick/scenegraph/qsgdefaultlayer_p.h
+++ b/src/quick/scenegraph/qsgdefaultlayer_p.h
@@ -69,56 +69,56 @@ public:
QSGDefaultLayer(QSGRenderContext *context);
~QSGDefaultLayer();
- bool updateTexture() Q_DECL_OVERRIDE;
+ bool updateTexture() override;
// The item's "paint node", not effect node.
QSGNode *item() const { return m_item; }
- void setItem(QSGNode *item) Q_DECL_OVERRIDE;
+ void setItem(QSGNode *item) override;
QRectF rect() const { return m_rect; }
- void setRect(const QRectF &rect) Q_DECL_OVERRIDE;
+ void setRect(const QRectF &rect) override;
QSize size() const { return m_size; }
- void setSize(const QSize &size) Q_DECL_OVERRIDE;
+ void setSize(const QSize &size) override;
- void setHasMipmaps(bool mipmap) Q_DECL_OVERRIDE;
+ void setHasMipmaps(bool mipmap) override;
- void bind() Q_DECL_OVERRIDE;
+ void bind() override;
- bool hasAlphaChannel() const Q_DECL_OVERRIDE;
- bool hasMipmaps() const Q_DECL_OVERRIDE;
- int textureId() const Q_DECL_OVERRIDE;
- QSize textureSize() const Q_DECL_OVERRIDE { return m_size; }
+ bool hasAlphaChannel() const override;
+ bool hasMipmaps() const override;
+ int textureId() const override;
+ QSize textureSize() const override { return m_size; }
GLenum format() const { return m_format; }
- void setFormat(GLenum format) Q_DECL_OVERRIDE;
+ void setFormat(GLenum format) override;
bool live() const { return bool(m_live); }
- void setLive(bool live) Q_DECL_OVERRIDE;
+ void setLive(bool live) override;
bool recursive() const { return bool(m_recursive); }
- void setRecursive(bool recursive) Q_DECL_OVERRIDE;
+ void setRecursive(bool recursive) override;
- void setDevicePixelRatio(qreal ratio) Q_DECL_OVERRIDE { m_device_pixel_ratio = ratio; }
+ void setDevicePixelRatio(qreal ratio) override { m_device_pixel_ratio = ratio; }
bool mirrorHorizontal() const { return bool(m_mirrorHorizontal); }
- void setMirrorHorizontal(bool mirror) Q_DECL_OVERRIDE;
+ void setMirrorHorizontal(bool mirror) override;
bool mirrorVertical() const { return bool(m_mirrorVertical); }
- void setMirrorVertical(bool mirror) Q_DECL_OVERRIDE;
+ void setMirrorVertical(bool mirror) override;
- void scheduleUpdate() Q_DECL_OVERRIDE;
+ void scheduleUpdate() override;
- QImage toImage() const Q_DECL_OVERRIDE;
+ QImage toImage() const override;
- QRectF normalizedTextureSubRect() const Q_DECL_OVERRIDE;
+ QRectF normalizedTextureSubRect() const override;
int samples() const { return m_samples; }
- void setSamples(int samples) Q_DECL_OVERRIDE { m_samples = samples; }
+ void setSamples(int samples) override { m_samples = samples; }
public Q_SLOTS:
- void markDirtyTexture() Q_DECL_OVERRIDE;
- void invalidated() Q_DECL_OVERRIDE;
+ void markDirtyTexture() override;
+ void invalidated() override;
private:
void grab();
diff --git a/src/quick/scenegraph/qsgdefaultspritenode.cpp b/src/quick/scenegraph/qsgdefaultspritenode.cpp
index 5eb8fb6e08..7fe6048d59 100644
--- a/src/quick/scenegraph/qsgdefaultspritenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultspritenode.cpp
@@ -109,7 +109,7 @@ public:
setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qt-project.org/scenegraph/shaders/sprite.frag"));
}
- void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *) Q_DECL_OVERRIDE
+ void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *) override
{
QQuickSpriteMaterial *m = static_cast<QQuickSpriteMaterial *>(newEffect);
m->texture->bind();
@@ -122,14 +122,14 @@ public:
program()->setUniformValue(m_matrix_id, state.combinedMatrix());
}
- void initialize() Q_DECL_OVERRIDE {
+ void initialize() override {
m_matrix_id = program()->uniformLocation("qt_Matrix");
m_opacity_id = program()->uniformLocation("qt_Opacity");
m_animData_id = program()->uniformLocation("animData");
m_animPos_id = program()->uniformLocation("animPos");
}
- char const *const *attributeNames() const Q_DECL_OVERRIDE {
+ char const *const *attributeNames() const override {
static const char *attr[] = {
"vPos",
"vTex",
diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h
index 3c8b61852e..514e6e8c2b 100644
--- a/src/quick/scenegraph/util/qsgengine.h
+++ b/src/quick/scenegraph/util/qsgengine.h
@@ -67,7 +67,7 @@ public:
};
Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption)
- explicit QSGEngine(QObject *parent = Q_NULLPTR);
+ explicit QSGEngine(QObject *parent = nullptr);
~QSGEngine();
void initialize(QOpenGLContext *context);
diff --git a/src/quick/util/qquickanimation_p_p.h b/src/quick/util/qquickanimation_p_p.h
index a7abc5a004..7a1bd8ff13 100644
--- a/src/quick/util/qquickanimation_p_p.h
+++ b/src/quick/util/qquickanimation_p_p.h
@@ -199,7 +199,7 @@ public:
QQuickAnimationGroup *group;
QAbstractAnimationJob* animationInstance;
- static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj, QString *errorMessage = Q_NULLPTR);
+ static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj, QString *errorMessage = nullptr);
};
class QQuickPauseAnimationPrivate : public QQuickAbstractAnimationPrivate
diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp
index 14ead56740..5f8d2b94d3 100644
--- a/src/quick/util/qquickglobal.cpp
+++ b/src/quick/util/qquickglobal.cpp
@@ -398,7 +398,7 @@ public:
return QMatrix4x4(matVals);
}
- const QMetaObject *getMetaObjectForMetaType(int type) Q_DECL_OVERRIDE
+ const QMetaObject *getMetaObjectForMetaType(int type) override
{
switch (type) {
case QMetaType::QColor:
@@ -422,7 +422,7 @@ public:
return 0;
}
- bool init(int type, QVariant& dst) Q_DECL_OVERRIDE
+ bool init(int type, QVariant& dst) override
{
switch (type) {
case QMetaType::QColor:
@@ -452,7 +452,7 @@ public:
return false;
}
- bool create(int type, int argc, const void *argv[], QVariant *v) Q_DECL_OVERRIDE
+ bool create(int type, int argc, const void *argv[], QVariant *v) override
{
switch (type) {
case QMetaType::QFont: // must specify via js-object.
@@ -519,7 +519,7 @@ public:
return true;
}
- bool createFromString(int type, const QString &s, void *data, size_t dataSize) Q_DECL_OVERRIDE
+ bool createFromString(int type, const QString &s, void *data, size_t dataSize) override
{
bool ok = false;
@@ -542,7 +542,7 @@ public:
return false;
}
- bool createStringFrom(int type, const void *data, QString *s) Q_DECL_OVERRIDE
+ bool createStringFrom(int type, const void *data, QString *s) override
{
if (type == QMetaType::QColor) {
const QColor *color = reinterpret_cast<const QColor *>(data);
@@ -553,7 +553,7 @@ public:
return false;
}
- bool variantFromString(const QString &s, QVariant *v) Q_DECL_OVERRIDE
+ bool variantFromString(const QString &s, QVariant *v) override
{
QColor c(s);
if (c.isValid()) {
@@ -596,7 +596,7 @@ public:
return false;
}
- bool variantFromString(int type, const QString &s, QVariant *v) Q_DECL_OVERRIDE
+ bool variantFromString(int type, const QString &s, QVariant *v) override
{
bool ok = false;
@@ -639,7 +639,7 @@ public:
return false;
}
- bool variantFromJsObject(int type, QQmlV4Handle object, QV4::ExecutionEngine *v4, QVariant *v) Q_DECL_OVERRIDE
+ bool variantFromJsObject(int type, QQmlV4Handle object, QV4::ExecutionEngine *v4, QVariant *v) override
{
QV4::Scope scope(v4);
#ifndef QT_NO_DEBUG
@@ -665,7 +665,7 @@ public:
return (*(reinterpret_cast<const T *>(lhs)) == rhs.value<T>());
}
- bool equal(int type, const void *lhs, const QVariant &rhs) Q_DECL_OVERRIDE
+ bool equal(int type, const void *lhs, const QVariant &rhs) override
{
switch (type) {
case QMetaType::QColor:
@@ -698,7 +698,7 @@ public:
return true;
}
- bool store(int type, const void *src, void *dst, size_t dstSize) Q_DECL_OVERRIDE
+ bool store(int type, const void *src, void *dst, size_t dstSize) override
{
Q_UNUSED(dstSize);
switch (type) {
@@ -728,7 +728,7 @@ public:
return true;
}
- bool read(const QVariant &src, void *dst, int dstType) Q_DECL_OVERRIDE
+ bool read(const QVariant &src, void *dst, int dstType) override
{
switch (dstType) {
case QMetaType::QColor:
@@ -762,7 +762,7 @@ public:
return false;
}
- bool write(int type, const void *src, QVariant& dst) Q_DECL_OVERRIDE
+ bool write(int type, const void *src, QVariant& dst) override
{
switch (type) {
case QMetaType::QColor:
diff --git a/src/quick/util/qquickpropertychanges.cpp b/src/quick/util/qquickpropertychanges.cpp
index 61380b3ea0..4a9b4a95c1 100644
--- a/src/quick/util/qquickpropertychanges.cpp
+++ b/src/quick/util/qquickpropertychanges.cpp
@@ -180,7 +180,7 @@ public:
rewindExpression = QQmlPropertyPrivate::signalExpression(property);
}
- bool override(QQuickStateActionEvent *other) override {
+ bool mayOverride(QQuickStateActionEvent *other) override {
if (other == this)
return true;
if (other->type() != type())
diff --git a/src/quick/util/qquickshortcut_p.h b/src/quick/util/qquickshortcut_p.h
index db918058b2..c5d5501cb7 100644
--- a/src/quick/util/qquickshortcut_p.h
+++ b/src/quick/util/qquickshortcut_p.h
@@ -74,7 +74,7 @@ class QQuickShortcut : public QObject, public QQmlParserStatus
Q_PROPERTY(Qt::ShortcutContext context READ context WRITE setContext NOTIFY contextChanged FINAL)
public:
- explicit QQuickShortcut(QObject *parent = Q_NULLPTR);
+ explicit QQuickShortcut(QObject *parent = nullptr);
~QQuickShortcut();
QVariant sequence() const;
@@ -106,9 +106,9 @@ Q_SIGNALS:
void activatedAmbiguously();
protected:
- void classBegin() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ void classBegin() override;
+ void componentComplete() override;
+ bool event(QEvent *event) override;
struct Shortcut {
Shortcut() : id(0) { }
diff --git a/src/quick/util/qquickstate.cpp b/src/quick/util/qquickstate.cpp
index 0a49d41491..65e51feb81 100644
--- a/src/quick/util/qquickstate.cpp
+++ b/src/quick/util/qquickstate.cpp
@@ -106,7 +106,7 @@ void QQuickStateActionEvent::clearBindings()
{
}
-bool QQuickStateActionEvent::override(QQuickStateActionEvent *other)
+bool QQuickStateActionEvent::mayOverride(QQuickStateActionEvent *other)
{
Q_UNUSED(other);
return false;
@@ -574,7 +574,7 @@ void QQuickState::apply(QQuickTransition *trans, QQuickState *revert)
for (int jj = 0; jj < d->revertList.count(); ++jj) {
QQuickStateActionEvent *event = d->revertList.at(jj).event();
if (event && event->type() == action.event->type()) {
- if (action.event->override(event)) {
+ if (action.event->mayOverride(event)) {
found = true;
if (action.event != d->revertList.at(jj).event() && action.event->needsCopy()) {
@@ -636,7 +636,7 @@ void QQuickState::apply(QQuickTransition *trans, QQuickState *revert)
for (int jj = 0; !found && jj < applyList.count(); ++jj) {
const QQuickStateAction &action = applyList.at(jj);
if (action.event && action.event->type() == event->type()) {
- if (action.event->override(event))
+ if (action.event->mayOverride(event))
found = true;
}
}
diff --git a/src/quick/util/qquickstate_p.h b/src/quick/util/qquickstate_p.h
index 7d22ca9f8c..ac720f4189 100644
--- a/src/quick/util/qquickstate_p.h
+++ b/src/quick/util/qquickstate_p.h
@@ -115,7 +115,7 @@ public:
virtual bool changesBindings();
virtual void clearBindings();
- virtual bool override(QQuickStateActionEvent*other);
+ virtual bool mayOverride(QQuickStateActionEvent*other);
};
//### rename to QQuickStateChange?
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index bbe0192eac..7c221850ab 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -80,7 +80,7 @@ class QQuickWidgetRenderControl : public QQuickRenderControl
{
public:
QQuickWidgetRenderControl(QQuickWidget *quickwidget) : m_quickWidget(quickwidget) {}
- QWindow *renderWindow(QPoint *offset) Q_DECL_OVERRIDE {
+ QWindow *renderWindow(QPoint *offset) override {
if (offset)
*offset = m_quickWidget->mapTo(m_quickWidget->window(), QPoint());
return m_quickWidget->window()->windowHandle();
diff --git a/src/quickwidgets/qquickwidget.h b/src/quickwidgets/qquickwidget.h
index 2d159778ed..e7fbc62967 100644
--- a/src/quickwidgets/qquickwidget.h
+++ b/src/quickwidgets/qquickwidget.h
@@ -64,9 +64,9 @@ class Q_QUICKWIDGETS_EXPORT QQuickWidget : public QWidget
Q_PROPERTY(QUrl source READ source WRITE setSource DESIGNABLE true)
public:
- explicit QQuickWidget(QWidget *parent = Q_NULLPTR);
+ explicit QQuickWidget(QWidget *parent = nullptr);
QQuickWidget(QQmlEngine* engine, QWidget *parent);
- explicit QQuickWidget(const QUrl &source, QWidget *parent = Q_NULLPTR);
+ explicit QQuickWidget(const QUrl &source, QWidget *parent = nullptr);
virtual ~QQuickWidget();
QUrl source() const;
diff --git a/src/quickwidgets/qquickwidget_p.h b/src/quickwidgets/qquickwidget_p.h
index 9747315577..03571e8dc7 100644
--- a/src/quickwidgets/qquickwidget_p.h
+++ b/src/quickwidgets/qquickwidget_p.h
@@ -87,7 +87,7 @@ public:
~QQuickWidgetPrivate();
void execute();
- void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override;
void initResize();
void updateSize();
void updatePosition();
@@ -100,8 +100,8 @@ public:
void handleContextCreationFailure(const QSurfaceFormat &format, bool isEs);
#if QT_CONFIG(opengl)
- GLuint textureId() const Q_DECL_OVERRIDE;
- QImage grabFramebuffer() Q_DECL_OVERRIDE;
+ GLuint textureId() const override;
+ QImage grabFramebuffer() override;
#else
QImage grabFramebuffer();
#endif
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index f9c1fcce91..1e80f1bf65 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -18,7 +18,4 @@ qtHaveModule(gui):qtConfig(opengl(es1|es2)?) {
# console applications not supported
uikit: SUBDIRS -= qmltest
-# Restricted sub-set for now
-boot2qt: SUBDIRS = qml
-
installed_cmake.depends = cmake
diff --git a/tests/auto/particles/qquickimageparticle/BLACKLIST b/tests/auto/particles/qquickimageparticle/BLACKLIST
new file mode 100644
index 0000000000..a615dcd6e6
--- /dev/null
+++ b/tests/auto/particles/qquickimageparticle/BLACKLIST
@@ -0,0 +1,16 @@
+# QTBUG-63055
+[test_colored]
+b2qt
+
+# QTBUG-63055
+[test_colorVariance]
+b2qt
+
+# QTBUG-63055
+[test_deformed]
+b2qt
+
+# QTBUG-63055
+[test_sprite]
+b2qt
+
diff --git a/tests/auto/particles/qquickspritegoal/BLACKLIST b/tests/auto/particles/qquickspritegoal/BLACKLIST
new file mode 100644
index 0000000000..bd64621f77
--- /dev/null
+++ b/tests/auto/particles/qquickspritegoal/BLACKLIST
@@ -0,0 +1,3 @@
+# QTBUG-63057
+[test_instantTransition]
+b2qt
diff --git a/tests/auto/qml/debugger/debugger.pro b/tests/auto/qml/debugger/debugger.pro
index a50411e18b..63721cc575 100644
--- a/tests/auto/qml/debugger/debugger.pro
+++ b/tests/auto/qml/debugger/debugger.pro
@@ -10,7 +10,8 @@ PUBLICTESTS += \
qqmlenginedebuginspectorintegrationtest \
qqmlenginecontrol \
qqmldebuggingenabler \
- qqmlnativeconnector
+ qqmlnativeconnector \
+ qqmldebugprocess
PRIVATETESTS += \
qqmldebugclient \
diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
index 134de44858..a76740a3f9 100644
--- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
+++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
@@ -27,6 +27,7 @@
****************************************************************************/
#include "debugutil_p.h"
+#include "qqmldebugprocess_p.h"
#include "../../../shared/util.h"
#include <private/qqmldebugclient_p.h>
diff --git a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
index 59483d75da..33b294593f 100644
--- a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
+++ b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
@@ -27,6 +27,7 @@
****************************************************************************/
#include "debugutil_p.h"
+#include "qqmldebugprocess_p.h"
#include "../../shared/qqmlenginedebugclient.h"
#include "../../../../shared/util.h"
diff --git a/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp b/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp
index 8d21a8a45a..4b28857fc0 100644
--- a/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp
+++ b/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp
@@ -32,6 +32,9 @@
#include <private/qqmldebugconnector_p.h>
#include <private/qqmldebugconnection_p.h>
+#include <QtQml/qqmldebug.h>
+#include <QtQml/qqmlengine.h>
+
#include <QtTest/qtest.h>
#include <QtTest/qsignalspy.h>
#include <QtNetwork/qhostaddress.h>
diff --git a/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess.pro b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess.pro
new file mode 100644
index 0000000000..331d87b9f1
--- /dev/null
+++ b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+SUBDIRS = qqmldebugprocess qqmldebugprocessprocess
+
+qqmldebugprocess.depends = qqmldebugprocessprocess
diff --git a/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/qqmldebugprocess.pro b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/qqmldebugprocess.pro
new file mode 100644
index 0000000000..9bea2d222c
--- /dev/null
+++ b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/qqmldebugprocess.pro
@@ -0,0 +1,14 @@
+CONFIG += testcase
+TARGET = tst_qqmldebugprocess
+QT = core testlib
+CONFIG -= debug_and_release_target
+macos:CONFIG -= app_bundle
+
+SOURCES += \
+ ../../shared/qqmldebugprocess.cpp \
+ tst_qqmldebugprocess.cpp
+
+HEADERS += \
+ ../../shared/qqmldebugprocess_p.h
+
+INCLUDEPATH += ../../shared
diff --git a/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/tst_qqmldebugprocess.cpp b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/tst_qqmldebugprocess.cpp
new file mode 100644
index 0000000000..993a1d5f63
--- /dev/null
+++ b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/tst_qqmldebugprocess.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qqmldebugprocess_p.h>
+#include <QtTest>
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qscopedpointer.h>
+
+class tst_QQmlDebugProcess : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void sessionStart_data();
+ void sessionStart();
+};
+
+void tst_QQmlDebugProcess::sessionStart_data()
+{
+ QTest::addColumn<int>("delay");
+ QTest::addColumn<QString>("arg");
+ QTest::addColumn<bool>("sessionExpected");
+ QTest::addColumn<bool>("outputExpected");
+
+ QTest::addRow("synchronous / waiting") << -1
+ << "QML Debugger: Waiting for connection on port 2423..."
+ << true << false;
+ QTest::addRow("synchronous / failed") << -1 << "QML Debugger: Unable to listen to port 242."
+ << false << false;
+ QTest::addRow("synchronous / unknown") << -1 << "QML Debugger: You don't know this string."
+ << false << true;
+ QTest::addRow("synchronous / appout") << -1 << "Output from app itself."
+ << false << true;
+
+ QTest::addRow("no delay / waiting") << 0
+ << "QML Debugger: Waiting for connection on port 2423..."
+ << true << false;
+ QTest::addRow("no delay / failed") << 0 << "QML Debugger: Unable to listen to port 242."
+ << false << false;
+ QTest::addRow("no delay / unknown") << 0 << "QML Debugger: You don't know this string."
+ << false << true;
+ QTest::addRow("no delay / appout") << 0 << "Output from app itself."
+ << false << true;
+
+ QTest::addRow("delay / waiting") << 1000
+ << "QML Debugger: Waiting for connection on port 2423..."
+ << true << false;
+ QTest::addRow("delay / failed") << 1000 << "QML Debugger: Unable to listen to port 242."
+ << false << false;
+ QTest::addRow("delay / unknown") << 1000 << "QML Debugger: You don't know this string."
+ << false << true;
+ QTest::addRow("delay / appout") << 1000 << "Output from app itself."
+ << false << true;
+}
+
+void tst_QQmlDebugProcess::sessionStart()
+{
+ QFETCH(int, delay);
+ QFETCH(QString, arg);
+ QFETCH(bool, sessionExpected);
+ QFETCH(bool, outputExpected);
+
+ QScopedPointer<QQmlDebugProcess> process(
+ new QQmlDebugProcess(QCoreApplication::applicationDirPath()
+ + QLatin1String("/qqmldebugprocessprocess"), this));
+ QVERIFY(process);
+
+ bool outputReceived = false;
+ connect(process.data(), &QQmlDebugProcess::readyReadStandardOutput, this, [&]() {
+ QVERIFY(outputExpected);
+ QVERIFY(!outputReceived);
+ QCOMPARE(process->output().trimmed(), arg);
+ outputReceived = true;
+ QTimer::singleShot(qMax(delay, 0), process.data(), &QQmlDebugProcess::stop);
+ });
+
+ if (!outputExpected && !sessionExpected)
+ QTest::ignoreMessage(QtWarningMsg, "App was unable to bind to port!");
+ process->start(QStringList({arg}));
+
+ bool done = false;
+ auto wait = [&](){
+ QCOMPARE(process->waitForSessionStart(), sessionExpected);
+ QCOMPARE(outputReceived, outputExpected);
+ process->stop();
+ done = true;
+ };
+
+ if (delay < 0)
+ wait();
+ else
+ QTimer::singleShot(delay, process.data(), wait);
+
+ QTRY_VERIFY(done);
+ QVERIFY(process->state().startsWith("not running"));
+}
+
+QTEST_MAIN(tst_QQmlDebugProcess)
+
+#include "tst_qqmldebugprocess.moc"
diff --git a/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocessprocess/qqmldebugprocessprocess.cpp b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocessprocess/qqmldebugprocessprocess.cpp
new file mode 100644
index 0000000000..21cce53fc3
--- /dev/null
+++ b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocessprocess/qqmldebugprocessprocess.cpp
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qcoreapplication.h>
+
+// Process that just outputs a fake "Waiting" message.
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+ if (argc > 1)
+ qDebug() << argv[1];
+ return app.exec();
+}
diff --git a/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocessprocess/qqmldebugprocessprocess.pro b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocessprocess/qqmldebugprocessprocess.pro
new file mode 100644
index 0000000000..55a77d830d
--- /dev/null
+++ b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocessprocess/qqmldebugprocessprocess.pro
@@ -0,0 +1,10 @@
+QT = core
+macos:CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+SOURCES += qqmldebugprocessprocess.cpp
+
+DESTDIR = ../qqmldebugprocess
+
+target.path = $$[QT_INSTALL_TESTS]/tst_qqmldebugprocess
+INSTALLS += target
+
diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
index 06e4a4bfcc..4e103e9a65 100644
--- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
+++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
@@ -29,6 +29,7 @@
#include "qqmldebugtestservice.h"
#include "debugutil_p.h"
+#include "qqmldebugprocess_p.h"
#include "../../../shared/util.h"
#include <private/qqmldebugclient_p.h>
diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/BLACKLIST b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/BLACKLIST
deleted file mode 100644
index 5fb1dc193b..0000000000
--- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-# QTQAINFRA-1334
-windows gcc
diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
index a4cf932ee1..5c9506eb21 100644
--- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
+++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
@@ -28,6 +28,7 @@
#include "qqmlinspectorclient.h"
#include "../shared/debugutil_p.h"
+#include "../shared/qqmldebugprocess_p.h"
#include "../../../shared/util.h"
#include <private/qqmldebugconnection_p.h>
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/BLACKLIST b/tests/auto/qml/debugger/qqmlprofilerservice/BLACKLIST
deleted file mode 100644
index 5fb1dc193b..0000000000
--- a/tests/auto/qml/debugger/qqmlprofilerservice/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-# QTQAINFRA-1334
-windows gcc
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index 45e4ad1207..cc6083cb98 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -27,6 +27,7 @@
****************************************************************************/
#include "debugutil_p.h"
+#include "qqmldebugprocess_p.h"
#include "../../../shared/util.h"
#include <private/qqmlprofilerclient_p.h>
@@ -35,6 +36,9 @@
#include <QtTest/qtest.h>
#include <QtCore/qlibraryinfo.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/qpa/qplatformintegration.h>
+
struct QQmlProfilerData
{
QQmlProfilerData(qint64 time = -2, int messageType = -1, int detailType = -1,
@@ -583,16 +587,18 @@ void tst_QQmlProfilerService::scenegraphData()
qint64 contextFrameTime = -1;
qint64 renderFrameTime = -1;
#if QT_CONFIG(opengl) //Software renderer doesn't have context frames
- foreach (const QQmlProfilerData &msg, m_client->asynchronousMessages) {
- if (msg.messageType == QQmlProfilerDefinitions::SceneGraphFrame) {
- if (msg.detailType == QQmlProfilerDefinitions::SceneGraphContextFrame) {
- contextFrameTime = msg.time;
- break;
+ if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) {
+ foreach (const QQmlProfilerData &msg, m_client->asynchronousMessages) {
+ if (msg.messageType == QQmlProfilerDefinitions::SceneGraphFrame) {
+ if (msg.detailType == QQmlProfilerDefinitions::SceneGraphContextFrame) {
+ contextFrameTime = msg.time;
+ break;
+ }
}
}
- }
- QVERIFY(contextFrameTime != -1);
+ QVERIFY(contextFrameTime != -1);
+ }
#endif
foreach (const QQmlProfilerData &msg, m_client->asynchronousMessages) {
if (msg.detailType == QQmlProfilerDefinitions::SceneGraphRendererFrame) {
diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp
index 40e51f3a05..8ecbe53822 100644
--- a/tests/auto/qml/debugger/shared/debugutil.cpp
+++ b/tests/auto/qml/debugger/shared/debugutil.cpp
@@ -27,13 +27,14 @@
****************************************************************************/
#include "debugutil_p.h"
+#include "qqmldebugprocess_p.h"
#include <private/qqmldebugconnection_p.h>
+#include <QtQml/qqmldebug.h>
+
#include <QtCore/qeventloop.h>
#include <QtCore/qtimer.h>
-#include <QtCore/qfileinfo.h>
-#include <QtCore/qdir.h>
bool QQmlDebugTest::waitForSignal(QObject *receiver, const char *member, int timeout) {
QEventLoop loop;
@@ -116,196 +117,6 @@ void QQmlDebugTestClient::messageReceived(const QByteArray &ba)
emit serverMessage(ba);
}
-QQmlDebugProcess::QQmlDebugProcess(const QString &executable, QObject *parent)
- : QObject(parent)
- , m_executable(executable)
- , m_started(false)
- , m_port(0)
- , m_maximumBindErrors(0)
- , m_receivedBindErrors(0)
-{
- m_process.setProcessChannelMode(QProcess::MergedChannels);
- m_timer.setSingleShot(true);
- m_timer.setInterval(15000);
- connect(&m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(processAppOutput()));
- connect(&m_process, SIGNAL(errorOccurred(QProcess::ProcessError)),
- this, SLOT(processError(QProcess::ProcessError)));
- connect(&m_timer, SIGNAL(timeout()), SLOT(timeout()));
-}
-
-QQmlDebugProcess::~QQmlDebugProcess()
-{
- stop();
-}
-
-QString QQmlDebugProcess::state()
-{
- QString stateStr;
- switch (m_process.state()) {
- case QProcess::NotRunning: {
- stateStr = "not running";
- if (m_process.exitStatus() == QProcess::CrashExit)
- stateStr += " (crashed!)";
- else
- stateStr += ", return value " + QString::number(m_process.exitCode());
- break;
- }
- case QProcess::Starting: stateStr = "starting"; break;
- case QProcess::Running: stateStr = "running"; break;
- }
- return stateStr;
-}
-
-void QQmlDebugProcess::start(const QStringList &arguments)
-{
-#ifdef Q_OS_MAC
- // make sure m_executable points to the actual binary even if it's inside an app bundle
- QFileInfo binFile(m_executable);
- if (!binFile.isExecutable()) {
- QDir bundleDir(m_executable + ".app");
- if (bundleDir.exists()) {
- m_executable = bundleDir.absoluteFilePath("Contents/MacOS/" + binFile.baseName());
- //qDebug() << Q_FUNC_INFO << "found bundled binary" << m_executable;
- }
- }
-#endif
- m_mutex.lock();
- m_port = 0;
- m_process.setEnvironment(QProcess::systemEnvironment() + m_environment);
- m_process.start(m_executable, arguments);
- if (!m_process.waitForStarted()) {
- qWarning() << "QML Debug Client: Could not launch app " << m_executable
- << ": " << m_process.errorString();
- m_eventLoop.quit();
- } else {
- m_timer.start();
- }
- m_mutex.unlock();
-}
-
-void QQmlDebugProcess::stop()
-{
- if (m_process.state() != QProcess::NotRunning) {
- m_process.kill();
- m_process.waitForFinished(5000);
- }
-}
-
-void QQmlDebugProcess::setMaximumBindErrors(int ignore)
-{
- m_maximumBindErrors = ignore;
-}
-
-void QQmlDebugProcess::timeout()
-{
- qWarning() << "Timeout while waiting for QML debugging messages "
- "in application output. Process is in state" << m_process.state() << ", Output:" << m_output << ".";
- m_eventLoop.quit();
-}
-
-bool QQmlDebugProcess::waitForSessionStart()
-{
- if (m_process.state() != QProcess::Running) {
- qWarning() << "Could not start up " << m_executable;
- return false;
- } else if (m_started) {
- return true;
- }
-
- m_eventLoop.exec();
-
- return m_started;
-}
-
-int QQmlDebugProcess::debugPort() const
-{
- return m_port;
-}
-
-bool QQmlDebugProcess::waitForFinished()
-{
- return m_process.waitForFinished();
-}
-
-QProcess::ExitStatus QQmlDebugProcess::exitStatus() const
-{
- return m_process.exitStatus();
-}
-
-void QQmlDebugProcess::addEnvironment(const QString &environment)
-{
- m_environment.append(environment);
-}
-
-QString QQmlDebugProcess::output() const
-{
- return m_output;
-}
-
-void QQmlDebugProcess::processAppOutput()
-{
- m_mutex.lock();
-
- bool outputFromAppItself = false;
-
- QString newOutput = m_process.readAll();
- m_output.append(newOutput);
- m_outputBuffer.append(newOutput);
-
- while (true) {
- const int nlIndex = m_outputBuffer.indexOf(QLatin1Char('\n'));
- if (nlIndex < 0) // no further complete lines
- break;
- const QString line = m_outputBuffer.left(nlIndex);
- m_outputBuffer = m_outputBuffer.right(m_outputBuffer.size() - nlIndex - 1);
-
- if (line.contains("QML Debugger:")) {
- const QRegExp portRx("Waiting for connection on port (\\d+)");
- if (portRx.indexIn(line) != -1) {
- m_port = portRx.cap(1).toInt();
- m_timer.stop();
- m_started = true;
- m_eventLoop.quit();
- continue;
- }
- if (line.contains("Unable to listen")) {
- if (++m_receivedBindErrors >= m_maximumBindErrors) {
- if (m_maximumBindErrors == 0)
- qWarning() << "App was unable to bind to port!";
- m_timer.stop();
- m_eventLoop.quit();
- }
- continue;
- }
- } else {
- // set to true if there is output not coming from the debugger
- outputFromAppItself = true;
- }
- }
- m_mutex.unlock();
-
- if (outputFromAppItself)
- emit readyReadStandardOutput();
-}
-
-void QQmlDebugProcess::processError(QProcess::ProcessError error)
-{
- if (!m_eventLoop.isRunning())
- return;
-
- qDebug() << "An error occurred while waiting for debug process to become available:";
- switch (error) {
- case QProcess::FailedToStart: qDebug() << "Process failed to start."; break;
- case QProcess::Crashed: qDebug() << "Process crashed."; break;
- case QProcess::Timedout: qDebug() << "Process timed out."; break;
- case QProcess::WriteError: qDebug() << "Error while writing to process."; break;
- case QProcess::ReadError: qDebug() << "Error while reading from process."; break;
- case QProcess::UnknownError: qDebug() << "Unknown process error."; break;
- }
-
- m_eventLoop.exit();
-}
-
template<typename F>
struct Finalizer {
F m_lambda;
diff --git a/tests/auto/qml/debugger/shared/debugutil.pri b/tests/auto/qml/debugger/shared/debugutil.pri
index 44e8e0f999..13dcdb91d8 100644
--- a/tests/auto/qml/debugger/shared/debugutil.pri
+++ b/tests/auto/qml/debugger/shared/debugutil.pri
@@ -3,5 +3,9 @@ QT += qmldebug-private
INCLUDEPATH += $$PWD
include($$PWD/../../../shared/util.pri)
-HEADERS += $$PWD/debugutil_p.h
-SOURCES += $$PWD/debugutil.cpp
+HEADERS += \
+ $$PWD/debugutil_p.h \
+ $$PWD/qqmldebugprocess_p.h
+SOURCES += \
+ $$PWD/debugutil.cpp \
+ $$PWD/qqmldebugprocess.cpp
diff --git a/tests/auto/qml/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h
index f1b25d5f6d..94ad83bfce 100644
--- a/tests/auto/qml/debugger/shared/debugutil_p.h
+++ b/tests/auto/qml/debugger/shared/debugutil_p.h
@@ -1,4 +1,3 @@
-
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
@@ -44,14 +43,6 @@
#include <../../../shared/util.h>
#include <private/qqmldebugclient_p.h>
-#include <QtCore/qeventloop.h>
-#include <QtCore/qtimer.h>
-#include <QtCore/qthread.h>
-#include <QtCore/qprocess.h>
-#include <QtCore/qmutex.h>
-#include <QtTest/qtest.h>
-#include <QtQml/qqmlengine.h>
-
class QQmlDebugProcess;
class QQmlDebugTest : public QQmlDataTest
{
@@ -108,51 +99,6 @@ private:
QByteArray lastMsg;
};
-class QQmlDebugProcess : public QObject
-{
- Q_OBJECT
-public:
- QQmlDebugProcess(const QString &executable, QObject *parent = 0);
- ~QQmlDebugProcess();
-
- QString state();
-
- void addEnvironment(const QString &environment);
-
- void start(const QStringList &arguments);
- bool waitForSessionStart();
- int debugPort() const;
-
- bool waitForFinished();
- QProcess::ExitStatus exitStatus() const;
-
- QString output() const;
- void stop();
- void setMaximumBindErrors(int numErrors);
-
-signals:
- void readyReadStandardOutput();
-
-private slots:
- void timeout();
- void processAppOutput();
- void processError(QProcess::ProcessError error);
-
-private:
- QString m_executable;
- QProcess m_process;
- QString m_outputBuffer;
- QString m_output;
- QTimer m_timer;
- QEventLoop m_eventLoop;
- QMutex m_mutex;
- bool m_started;
- QStringList m_environment;
- int m_port;
- int m_maximumBindErrors;
- int m_receivedBindErrors;
-};
-
class QQmlInspectorResultRecipient : public QObject
{
Q_OBJECT
diff --git a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
new file mode 100644
index 0000000000..816fec6a2f
--- /dev/null
+++ b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
@@ -0,0 +1,245 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qqmldebugprocess_p.h"
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qdir.h>
+
+QQmlDebugProcess::QQmlDebugProcess(const QString &executable, QObject *parent)
+ : QObject(parent)
+ , m_executable(executable)
+ , m_state(SessionUnknown)
+ , m_port(0)
+ , m_maximumBindErrors(0)
+ , m_receivedBindErrors(0)
+{
+ m_process.setProcessChannelMode(QProcess::MergedChannels);
+ m_timer.setSingleShot(true);
+ m_timer.setInterval(15000);
+ connect(&m_process, &QProcess::readyReadStandardOutput,
+ this, &QQmlDebugProcess::processAppOutput);
+ connect(&m_process, &QProcess::errorOccurred,
+ this, &QQmlDebugProcess::processError);
+ connect(&m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished),
+ this, [this]() {
+ m_timer.stop();
+ m_eventLoop.quit();
+ });
+ connect(&m_timer, &QTimer::timeout,
+ this, &QQmlDebugProcess::timeout);
+}
+
+QQmlDebugProcess::~QQmlDebugProcess()
+{
+ stop();
+}
+
+QString QQmlDebugProcess::state()
+{
+ QString stateStr;
+ switch (m_process.state()) {
+ case QProcess::NotRunning: {
+ stateStr = "not running";
+ if (m_process.exitStatus() == QProcess::CrashExit)
+ stateStr += " (crashed!)";
+ else
+ stateStr += ", return value " + QString::number(m_process.exitCode());
+ break;
+ }
+ case QProcess::Starting:
+ stateStr = "starting";
+ break;
+ case QProcess::Running:
+ stateStr = "running";
+ break;
+ }
+ return stateStr;
+}
+
+void QQmlDebugProcess::start(const QStringList &arguments)
+{
+#ifdef Q_OS_MAC
+ // make sure m_executable points to the actual binary even if it's inside an app bundle
+ QFileInfo binFile(m_executable);
+ if (!binFile.isExecutable()) {
+ QDir bundleDir(m_executable + ".app");
+ if (bundleDir.exists()) {
+ m_executable = bundleDir.absoluteFilePath("Contents/MacOS/" + binFile.baseName());
+ //qDebug() << Q_FUNC_INFO << "found bundled binary" << m_executable;
+ }
+ }
+#endif
+ m_mutex.lock();
+ m_port = 0;
+ m_process.setEnvironment(QProcess::systemEnvironment() + m_environment);
+ m_process.start(m_executable, arguments);
+ if (!m_process.waitForStarted()) {
+ qWarning() << "QML Debug Client: Could not launch app " << m_executable
+ << ": " << m_process.errorString();
+ m_eventLoop.quit();
+ }
+ m_mutex.unlock();
+}
+
+void QQmlDebugProcess::stop()
+{
+ if (m_process.state() != QProcess::NotRunning) {
+ disconnect(&m_process, &QProcess::errorOccurred, this, &QQmlDebugProcess::processError);
+ m_process.kill();
+ m_process.waitForFinished(5000);
+ }
+}
+
+void QQmlDebugProcess::setMaximumBindErrors(int ignore)
+{
+ m_maximumBindErrors = ignore;
+}
+
+void QQmlDebugProcess::timeout()
+{
+ qWarning() << "Timeout while waiting for QML debugging messages "
+ "in application output. Process is in state" << m_process.state()
+ << ", Output:" << m_output << ".";
+ m_eventLoop.quit();
+}
+
+bool QQmlDebugProcess::waitForSessionStart()
+{
+ if (m_process.state() != QProcess::Running) {
+ qWarning() << "Could not start up " << m_executable;
+ return false;
+ } else if (m_state == SessionStarted) {
+ return true;
+ } else if (m_state == SessionFailed) {
+ return false;
+ }
+
+ m_timer.start();
+ m_eventLoop.exec();
+
+ return m_state == SessionStarted;
+}
+
+int QQmlDebugProcess::debugPort() const
+{
+ return m_port;
+}
+
+bool QQmlDebugProcess::waitForFinished()
+{
+ return m_process.waitForFinished();
+}
+
+QProcess::ExitStatus QQmlDebugProcess::exitStatus() const
+{
+ return m_process.exitStatus();
+}
+
+void QQmlDebugProcess::addEnvironment(const QString &environment)
+{
+ m_environment.append(environment);
+}
+
+QString QQmlDebugProcess::output() const
+{
+ return m_output;
+}
+
+void QQmlDebugProcess::processAppOutput()
+{
+ m_mutex.lock();
+
+ bool outputFromAppItself = false;
+
+ QString newOutput = m_process.readAll();
+ m_output.append(newOutput);
+ m_outputBuffer.append(newOutput);
+
+ while (true) {
+ const int nlIndex = m_outputBuffer.indexOf(QLatin1Char('\n'));
+ if (nlIndex < 0) // no further complete lines
+ break;
+ const QString line = m_outputBuffer.left(nlIndex);
+ m_outputBuffer = m_outputBuffer.right(m_outputBuffer.size() - nlIndex - 1);
+
+ if (line.contains("QML Debugger:")) {
+ const QRegExp portRx("Waiting for connection on port (\\d+)");
+ if (portRx.indexIn(line) != -1) {
+ m_port = portRx.cap(1).toInt();
+ m_timer.stop();
+ m_state = SessionStarted;
+ m_eventLoop.quit();
+ continue;
+ }
+ if (line.contains("Unable to listen")) {
+ if (++m_receivedBindErrors >= m_maximumBindErrors) {
+ if (m_maximumBindErrors == 0)
+ qWarning() << "App was unable to bind to port!";
+ m_timer.stop();
+ m_state = SessionFailed;
+ m_eventLoop.quit();
+ }
+ continue;
+ }
+ }
+
+ // set to true if there is output not coming from the debugger or we don't understand it
+ outputFromAppItself = true;
+ }
+ m_mutex.unlock();
+
+ if (outputFromAppItself)
+ emit readyReadStandardOutput();
+}
+
+void QQmlDebugProcess::processError(QProcess::ProcessError error)
+{
+ qDebug() << "An error occurred while waiting for debug process to become available:";
+ switch (error) {
+ case QProcess::FailedToStart:
+ qDebug() << "Process failed to start.";
+ break;
+ case QProcess::Crashed:
+ qDebug() << "Process crashed.";
+ break;
+ case QProcess::Timedout:
+ qDebug() << "Process timed out.";
+ break;
+ case QProcess::WriteError:
+ qDebug() << "Error while writing to process.";
+ break;
+ case QProcess::ReadError:
+ qDebug() << "Error while reading from process.";
+ break;
+ case QProcess::UnknownError:
+ qDebug() << "Unknown process error.";
+ break;
+ }
+}
diff --git a/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h b/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h
new file mode 100644
index 0000000000..fd2c89bb41
--- /dev/null
+++ b/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQMLDEBUGPROCESS_P_H
+#define QQMLDEBUGPROCESS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qprocess.h>
+#include <QtCore/qtimer.h>
+#include <QtCore/qeventloop.h>
+#include <QtCore/qmutex.h>
+
+class QQmlDebugProcess : public QObject
+{
+ Q_OBJECT
+public:
+ QQmlDebugProcess(const QString &executable, QObject *parent = 0);
+ ~QQmlDebugProcess();
+
+ QString state();
+
+ void addEnvironment(const QString &environment);
+
+ void start(const QStringList &arguments);
+ bool waitForSessionStart();
+ int debugPort() const;
+
+ bool waitForFinished();
+ QProcess::ExitStatus exitStatus() const;
+
+ QString output() const;
+ void stop();
+ void setMaximumBindErrors(int numErrors);
+
+signals:
+ void readyReadStandardOutput();
+
+private slots:
+ void timeout();
+ void processAppOutput();
+ void processError(QProcess::ProcessError error);
+
+private:
+ enum SessionState {
+ SessionUnknown,
+ SessionStarted,
+ SessionFailed
+ };
+
+ QString m_executable;
+ QProcess m_process;
+ QString m_outputBuffer;
+ QString m_output;
+ QTimer m_timer;
+ QEventLoop m_eventLoop;
+ QMutex m_mutex;
+ SessionState m_state;
+ QStringList m_environment;
+ int m_port;
+ int m_maximumBindErrors;
+ int m_receivedBindErrors;
+};
+
+#endif // QQMLDEBUGPROCESS_P_H
diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro
index 69af3cd13b..9eb500f537 100644
--- a/tests/auto/qml/qml.pro
+++ b/tests/auto/qml/qml.pro
@@ -9,7 +9,6 @@ PUBLICTESTS += \
qjsonbinding \
qqmlfile \
-!boot2qt {
PUBLICTESTS += \
qmlmin \
qqmlcomponent \
@@ -31,7 +30,6 @@ PUBLICTESTS += \
qqmlsettings \
qqmlstatemachine \
qmldiskcache
-}
PRIVATETESTS += \
qqmlcpputils \
@@ -39,7 +37,6 @@ PRIVATETESTS += \
v4misc \
qmlcachegen
-!boot2qt {
PRIVATETESTS += \
animation \
qqmlecmascript \
@@ -74,19 +71,21 @@ PRIVATETESTS += \
qv4mm \
ecmascripttests \
bindingdependencyapi
-}
qtHaveModule(widgets) {
PUBLICTESTS += \
qjsengine \
- qjsvalue
+ qjsvalue \
+ qwidgetsinqml
}
SUBDIRS += $$PUBLICTESTS
SUBDIRS += $$METATYPETESTS
-qtConfig(process):!boot2qt {
+qtConfig(process) {
!contains(QT_CONFIG, no-qml-debug): SUBDIRS += debugger
- SUBDIRS += qmllint qmlplugindump
+ !boot2qt {
+ SUBDIRS += qmllint qmlplugindump
+ }
}
qtConfig(library) {
diff --git a/tests/auto/qml/qmlmin/qmlmin.pro b/tests/auto/qml/qmlmin/qmlmin.pro
index 6af6653270..93e5caabcf 100644
--- a/tests/auto/qml/qmlmin/qmlmin.pro
+++ b/tests/auto/qml/qmlmin/qmlmin.pro
@@ -6,5 +6,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qmlmin.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-cross_compile: DEFINES += QTEST_CROSS_COMPILED
+# Boot2qt is cross compiled but it has sources available
+!boot2qt {
+ cross_compile: DEFINES += QTEST_CROSS_COMPILED
+}
diff --git a/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml b/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/Singleton.qml
index b47d2e98f4..b47d2e98f4 100644
--- a/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml
+++ b/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/Singleton.qml
diff --git a/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir b/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/qmldir
index 8df57f6d47..8df57f6d47 100644
--- a/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir
+++ b/tests/auto/qml/qmlplugindump/data/dumper/CompositeSingleton/qmldir
diff --git a/tests/auto/qml/qmlplugindump/qmlplugindump.pro b/tests/auto/qml/qmlplugindump/qmlplugindump.pro
index c713edc541..76f3fe2299 100644
--- a/tests/auto/qml/qmlplugindump/qmlplugindump.pro
+++ b/tests/auto/qml/qmlplugindump/qmlplugindump.pro
@@ -1,6 +1,8 @@
CONFIG += testcase
TARGET = tst_qmlplugindump
-QT += testlib gui-private
+QT += testlib gui-private qml
macx:CONFIG -= app_bundle
+include(../../shared/util.pri)
+
SOURCES += tst_qmlplugindump.cpp
diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
index 68e11e3551..6915e789c6 100644
--- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
+++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
@@ -26,6 +26,8 @@
**
****************************************************************************/
+#include "util.h"
+
#include <qtest.h>
#include <QLibraryInfo>
#include <QDir>
@@ -33,7 +35,7 @@
#include <QDebug>
#include <cstdlib>
-class tst_qmlplugindump : public QObject
+class tst_qmlplugindump : public QQmlDataTest
{
Q_OBJECT
public:
@@ -54,6 +56,7 @@ tst_qmlplugindump::tst_qmlplugindump()
void tst_qmlplugindump::initTestCase()
{
+ QQmlDataTest::initTestCase();
qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
#if defined(Q_OS_WIN)
@@ -102,8 +105,8 @@ void tst_qmlplugindump::singleton()
{
QProcess dumper;
QStringList args;
- args << QLatin1String("tests.dumper.CompositeSingleton") << QLatin1String("1.0")
- << QLatin1String(".");
+ args << QLatin1String("dumper.CompositeSingleton") << QLatin1String("1.0")
+ << testFile(".");
dumper.start(qmlplugindumpPath, args);
QVERIFY2(dumper.waitForStarted(), qPrintable(dumper.errorString()));
QVERIFY2(dumper.waitForFinished(), qPrintable(dumper.errorString()));
diff --git a/tests/auto/qml/qqmlengine/qqmlengine.pro b/tests/auto/qml/qqmlengine/qqmlengine.pro
index e7952d8e3a..8d1e149d62 100644
--- a/tests/auto/qml/qqmlengine/qqmlengine.pro
+++ b/tests/auto/qml/qqmlengine/qqmlengine.pro
@@ -7,3 +7,8 @@ include (../../shared/util.pri)
SOURCES += tst_qqmlengine.cpp
QT += core-private gui-private qml-private network testlib
+
+boot2qt: {
+ # GC corruption test is too heavy for qemu-arm
+ DEFINES += SKIP_GCCORRUPTION_TEST
+}
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
index 7aca830297..b332ab2194 100644
--- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
+++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
@@ -862,6 +862,10 @@ void tst_qqmlengine::qmlContextProperties()
void tst_qqmlengine::testGCCorruption()
{
+#ifdef SKIP_GCCORRUPTION_TEST
+ QSKIP("Test too heavy for qemu");
+#endif
+
QQmlEngine e;
QQmlComponent c(&e, testFileUrl("testGCCorruption.qml"));
diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
index 68739886c4..70aaa9678e 100644
--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
@@ -54,7 +54,7 @@ void tst_QQmlImport::cleanup()
void tst_QQmlImport::testDesignerSupported()
{
QQuickView *window = new QQuickView();
- window->engine()->addImportPath(QT_TESTCASE_BUILDDIR);
+ window->engine()->addImportPath(directory());
window->setSource(testFileUrl("testfile_supported.qml"));
QVERIFY(window->errors().isEmpty());
@@ -68,7 +68,7 @@ void tst_QQmlImport::testDesignerSupported()
delete window;
window = new QQuickView();
- window->engine()->addImportPath(QT_TESTCASE_BUILDDIR);
+ window->engine()->addImportPath(directory());
window->engine()->clearComponentCache();
window->setSource(testFileUrl("testfile_supported.qml"));
@@ -91,7 +91,7 @@ void tst_QQmlImport::uiFormatLoading()
int size = 0;
QQmlApplicationEngine *test = new QQmlApplicationEngine(testFileUrl("TestForm.ui.qml"));
- test->addImportPath(QT_TESTCASE_BUILDDIR);
+ test->addImportPath(directory());
QCOMPARE(test->rootObjects().size(), ++size);
QVERIFY(test->rootObjects()[size -1]);
QVERIFY(test->rootObjects()[size -1]->property("success").toBool());
diff --git a/tests/auto/qml/qqmlinstantiator/stringmodel.h b/tests/auto/qml/qqmlinstantiator/stringmodel.h
index 0bd4ada55e..b01817375a 100644
--- a/tests/auto/qml/qqmlinstantiator/stringmodel.h
+++ b/tests/auto/qml/qqmlinstantiator/stringmodel.h
@@ -65,7 +65,7 @@ public:
return items.count();
}
- virtual QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE
+ QHash<int, QByteArray> roleNames() const override
{
return roles;
}
@@ -75,7 +75,7 @@ public:
return 1;
}
- virtual bool hasChildren(const QModelIndex &) const Q_DECL_OVERRIDE
+ bool hasChildren(const QModelIndex &) const override
{
return rowCount(QModelIndex()) > 0;
}
diff --git a/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp b/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
index beb60925bb..88a5d41975 100644
--- a/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
+++ b/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp
@@ -98,7 +98,7 @@ public:
}
protected:
- void connectNotify(const QMetaMethod &signal) Q_DECL_OVERRIDE {
+ void connectNotify(const QMetaMethod &signal) override {
if (signal.name() == "qmlObjectPropChanged") qmlObjectPropConnections++;
if (signal.name() == "cppObjectPropChanged") cppObjectPropConnections++;
if (signal.name() == "unboundPropChanged") unboundPropConnections++;
@@ -112,7 +112,7 @@ protected:
//qDebug() << Q_FUNC_INFO << this << signal.name();
}
- void disconnectNotify(const QMetaMethod &signal) Q_DECL_OVERRIDE {
+ void disconnectNotify(const QMetaMethod &signal) override {
if (signal.name() == "qmlObjectPropChanged") qmlObjectPropConnections--;
if (signal.name() == "cppObjectPropChanged") cppObjectPropConnections--;
if (signal.name() == "unboundPropChanged") unboundPropConnections--;
@@ -146,7 +146,7 @@ public:
{}
private slots:
- void initTestCase() Q_DECL_OVERRIDE;
+ void initTestCase() override;
void cleanupTestCase();
void testConnectNotify();
diff --git a/tests/auto/qml/qwidgetsinqml/qwidgetsinqml.pro b/tests/auto/qml/qwidgetsinqml/qwidgetsinqml.pro
new file mode 100644
index 0000000000..c86365d5ea
--- /dev/null
+++ b/tests/auto/qml/qwidgetsinqml/qwidgetsinqml.pro
@@ -0,0 +1,7 @@
+CONFIG += testcase
+CONFIG += parallel_test
+TARGET = tst_qwidgetsinqml
+macos:CONFIG -= app_bundle
+QT += qml widgets testlib gui-private
+SOURCES += tst_qwidgetsinqml.cpp
+DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/qml/qwidgetsinqml/tst_qwidgetsinqml.cpp b/tests/auto/qml/qwidgetsinqml/tst_qwidgetsinqml.cpp
new file mode 100644
index 0000000000..bbe717859b
--- /dev/null
+++ b/tests/auto/qml/qwidgetsinqml/tst_qwidgetsinqml.cpp
@@ -0,0 +1,288 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QQmlEngine>
+#include <QtQml>
+#include <QWidget>
+
+class tst_QWidgetsInQml : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QWidgetsInQml();
+
+private slots:
+ void instantiateWidget();
+ void instantiateWidgetWithoutParentWidget();
+ void widgetAsDefaultPropertyCollected();
+ void widgetAsDefaultPropertyKept();
+ void widgetAsDefaultPropertyKeptDuringCreation();
+};
+
+static void gc(QQmlEngine &engine)
+{
+ engine.collectGarbage();
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QCoreApplication::processEvents();
+}
+
+// Like QtObject, but with default property
+class QObjectContainer : public QObject
+{
+ Q_OBJECT
+ Q_CLASSINFO("DefaultProperty", "data");
+ Q_PROPERTY(QQmlListProperty<QObject> data READ data DESIGNABLE false);
+public:
+ QObjectContainer()
+ : widgetParent(0)
+ , gcOnAppend(false)
+ {}
+
+ QQmlListProperty<QObject> data() {
+ return QQmlListProperty<QObject>(this, 0, children_append, children_count, children_at, children_clear);
+ }
+
+ static void children_append(QQmlListProperty<QObject> *prop, QObject *o)
+ {
+ QObjectContainer *that = static_cast<QObjectContainer*>(prop->object);
+ that->dataChildren.append(o);
+ QObject::connect(o, SIGNAL(destroyed(QObject*)), prop->object, SLOT(childDestroyed(QObject*)));
+ QWidget *widget = qobject_cast<QWidget*>(o);
+ if (widget && that->widgetParent)
+ widget->setParent(that->widgetParent);
+
+ if (that->gcOnAppend) {
+ QQmlEngine *engine = qmlEngine(that);
+ gc(*engine);
+ }
+ }
+
+ static int children_count(QQmlListProperty<QObject> *prop)
+ {
+ return static_cast<QObjectContainer*>(prop->object)->dataChildren.count();
+ }
+
+ static QObject *children_at(QQmlListProperty<QObject> *prop, int index)
+ {
+ return static_cast<QObjectContainer*>(prop->object)->dataChildren.at(index);
+ }
+
+ static void children_clear(QQmlListProperty<QObject> *prop)
+ {
+ QObjectContainer *that = static_cast<QObjectContainer*>(prop->object);
+ foreach (QObject *c, that->dataChildren)
+ QObject::disconnect(c, SIGNAL(destroyed(QObject*)), that, SLOT(childDestroyed(QObject*)));
+ that->dataChildren.clear();
+ }
+
+ QList<QObject*> dataChildren;
+ QWidget *widgetParent;
+ bool gcOnAppend;
+
+protected slots:
+ void childDestroyed(QObject *child) {
+ dataChildren.removeAll(child);
+ }
+};
+
+class QWidgetContainer : public QObjectContainer
+{
+ Q_OBJECT
+public:
+ QWidgetContainer()
+ {
+ widgetParent = new QWidget;
+ QQmlEngine::setObjectOwnership(widgetParent, QQmlEngine::CppOwnership);
+ }
+ virtual ~QWidgetContainer()
+ {
+ delete widgetParent;
+ widgetParent = 0;
+ }
+};
+
+class QObjectContainerWithGCOnAppend : public QObjectContainer
+{
+ Q_OBJECT
+public:
+ QObjectContainerWithGCOnAppend()
+ {
+ gcOnAppend = true;
+ }
+};
+
+tst_QWidgetsInQml::tst_QWidgetsInQml()
+{
+ qmlRegisterType<QWidget>("Qt.Widgets", 1, 0, "QWidget");
+ qmlRegisterType<QObjectContainer>("Qt.Widgets", 1, 0, "QObjectContainer");
+ qmlRegisterType<QWidgetContainer>("Qt.Widgets", 1, 0, "QWidgetContainer");
+ qmlRegisterType<QObjectContainerWithGCOnAppend>("Qt.Widgets", 1, 0, "QObjectContainerWithGCOnAppend");
+}
+
+void tst_QWidgetsInQml::instantiateWidget()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import Qt.Widgets 1.0;\nQWidget { property QWidget child: QWidget { objectName: 'child' } }", QUrl());
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+ QWidget *rootWidget = qobject_cast<QWidget*>(object.data());
+ QVERIFY(rootWidget != 0);
+ QCOMPARE(rootWidget->children().count(), 1);
+ QWidget *firstChildWidget = qobject_cast<QWidget*>(rootWidget->children().first());
+ QVERIFY(firstChildWidget != 0);
+
+ QWidget *widgetProperty = qvariant_cast<QWidget*>(object->property("child"));
+ QVERIFY(widgetProperty != 0);
+ QCOMPARE(firstChildWidget, widgetProperty);
+ QCOMPARE(firstChildWidget->objectName(), QString("child"));
+}
+
+void tst_QWidgetsInQml::instantiateWidgetWithoutParentWidget()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import Qt.Widgets 1.0;\n"
+ "import QtQml 2.0;\n"
+ "QtObject { property QtObject child: QWidget { objectName: 'child' } }", QUrl());
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+
+ QPointer<QWidget> widgetProperty = qvariant_cast<QWidget*>(object->property("child"));
+ QVERIFY(!widgetProperty.isNull());
+ QCOMPARE(widgetProperty->objectName(), QString("child"));
+
+ QVERIFY(!widgetProperty->parent());
+ gc(engine);
+ // Don't collect, the property reference should keep it alive
+ QVERIFY(!widgetProperty.isNull());
+}
+
+void tst_QWidgetsInQml::widgetAsDefaultPropertyCollected()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import Qt.Widgets 1.0;\n"
+ "import QtQml 2.0;\n"
+ "QObjectContainer {\n"
+ " QWidget {\n"
+ " id: parentLessChild;\n"
+ " objectName: 'child'\n"
+ " }\n"
+ " property var widgetHolder;\n"
+ " Component.onCompleted: {\n"
+ " widgetHolder = parentLessChild;\n"
+ " }\n"
+ "}", QUrl());
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+
+ QObjectContainer *container = qobject_cast<QObjectContainer*>(object.data());
+ QCOMPARE(container->dataChildren.count(), 1);
+
+ QJSValue holder = qvariant_cast<QJSValue>(object->property("widgetHolder"));
+ QVERIFY(!holder.isNull());
+ gc(engine);
+ QCOMPARE(container->dataChildren.count(), 1);
+
+ holder = QJSValue();
+ object->setProperty("widgetHolder", QVariant::fromValue(holder));
+
+ gc(engine);
+ // The QWidget is without a parent and nobody is referencing it anymore (the children
+ // list in QObjectContainer is weak!), so it should get collected.
+ QCOMPARE(container->dataChildren.count(), 0);
+}
+
+void tst_QWidgetsInQml::widgetAsDefaultPropertyKept()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import Qt.Widgets 1.0;\n"
+ "import QtQml 2.0;\n"
+ "QWidgetContainer {\n"
+ " QWidget {\n"
+ " id: parentLessChild;\n"
+ " objectName: 'child'\n"
+ " }\n"
+ " property var widgetHolder;\n"
+ " Component.onCompleted: {\n"
+ " widgetHolder = parentLessChild;\n"
+ " }\n"
+ "}", QUrl());
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+
+ QWidgetContainer *container = qobject_cast<QWidgetContainer*>(object.data());
+ QCOMPARE(container->dataChildren.count(), 1);
+
+ QJSValue holder = qvariant_cast<QJSValue>(object->property("widgetHolder"));
+ QVERIFY(!holder.isNull());
+ gc(engine);
+ QCOMPARE(container->dataChildren.count(), 1);
+
+ holder = QJSValue();
+ object->setProperty("widgetHolder", QVariant::fromValue(holder));
+
+ gc(engine);
+ QCOMPARE(container->dataChildren.count(), 1);
+}
+
+void tst_QWidgetsInQml::widgetAsDefaultPropertyKeptDuringCreation()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import Qt.Widgets 1.0;\n"
+ "import QtQml 2.0;\n"
+ "QObjectContainerWithGCOnAppend {\n"
+ " QWidget {\n"
+ " id: parentLessChild;\n"
+ " objectName: 'child'\n"
+ " property var blah;\n" // Ensures that we have a JS wrapper
+ " }\n"
+ "}", QUrl());
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+
+ QObjectContainer *container = qobject_cast<QObjectContainer*>(object.data());
+ QCOMPARE(container->dataChildren.count(), 1);
+
+ gc(engine);
+ QCOMPARE(container->dataChildren.count(), 0);
+
+}
+
+QTEST_MAIN(tst_QWidgetsInQml)
+
+#include "tst_qwidgetsinqml.moc"
diff --git a/tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml b/tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml
index 53ed3658c2..af1b4db0e0 100644
--- a/tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml
+++ b/tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml
@@ -40,6 +40,10 @@ Item {
when: imageOnDisk.ready && imageOnDiskSmall.ready
function test_endresult_disk() {
+ if ((Qt.platform.pluginName === "offscreen")
+ || (Qt.platform.pluginName === "minimal"))
+ skip("grabImage does not work on offscreen/minimal platforms");
+
var image = grabImage(root);
// imageOnDisk at (0, 0) - (100x100)
@@ -73,6 +77,10 @@ Item {
}
function test_endresult_cache(data) {
+ if ((Qt.platform.pluginName === "offscreen")
+ || (Qt.platform.pluginName === "minimal"))
+ skip("grabImage does not work on offscreen/minimal platforms");
+
imageInCache.cache = data.cache;
imageInCache.sourceSize = data.sourceSize;
imageInCache.fillMode = data.fillMode;
diff --git a/tests/auto/qmltest/listmodel/tst_listmodel.qml b/tests/auto/qmltest/listmodel/tst_listmodel.qml
index 11f2019e08..2867897b0c 100644
--- a/tests/auto/qmltest/listmodel/tst_listmodel.qml
+++ b/tests/auto/qmltest/listmodel/tst_listmodel.qml
@@ -61,6 +61,16 @@ Item {
ListModel { id: secondmodel; ListElement { name: "SecondModelElement0" } ListElement { name: "SecondModelElement1" } }
ListModel { id: altermodel; ListElement { name: "AlterModelElement0" } ListElement { name: "AlterModelElement1" } }
+ property string funcResult
+ ListModel {
+ id: funcModel
+ property string modelProp
+ ListElement { friendlyText: "one"; action: function(obj) { funcResult = obj.friendlyText } }
+ ListElement { friendlyText: "two"; action: function() {} }
+ ListElement { friendlyText: "three"; action: function() { modelProp = "fail" } }
+ ListElement { friendlyText: "four"; action: function() { funcResult = friendlyText } }
+ }
+
TestCase {
name: "ListModel"
@@ -138,5 +148,51 @@ Item {
tryCompare(altermodel, 'count', 0)
compare(altermodel.get(0), undefined)
}
+
+ function test_functions() {
+ // test different ways of calling
+ funcModel.get(0).action(funcModel.get(0))
+ compare(funcResult, "one")
+ funcModel.get(0).action.call(this, { friendlyText: "seven" })
+ compare(funcResult, "seven")
+
+ // test different ways of setting
+ funcResult = ""
+ funcModel.get(1).action()
+ compare(funcResult, "")
+
+ funcModel.set(1, { friendlyText: "two", action: function() { funcResult = "set" } })
+ funcModel.get(1).action()
+ compare(funcResult, "set")
+
+ funcModel.setProperty(1, "action", function() { top.funcResult = "setProperty" })
+ funcModel.get(1).action()
+ compare(funcResult, "setProperty")
+
+ funcModel.get(1).action = function() { funcResult = "jsSet" }
+ funcModel.get(1).action()
+ compare(funcResult, "jsSet")
+
+ // test unsupported features
+ var didThrow = false
+ try {
+ funcModel.get(2).action()
+ } catch(ex) {
+ verify(ex.toString().includes("Error: Invalid write to global property"))
+ didThrow = true
+ }
+ verify(didThrow)
+
+ didThrow = false
+ try {
+ funcModel.get(3).action()
+ } catch(ex) {
+ verify(ex.toString().includes("ReferenceError: friendlyText is not defined"))
+ didThrow = true
+ }
+ verify(didThrow)
+
+
+ }
}
}
diff --git a/tests/auto/qmltest/listview/tst_listview.qml b/tests/auto/qmltest/listview/tst_listview.qml
index 2b5246b116..f7a34cbce2 100644
--- a/tests/auto/qmltest/listview/tst_listview.qml
+++ b/tests/auto/qmltest/listview/tst_listview.qml
@@ -161,6 +161,15 @@ Item {
}
}
+ ListView {
+ id: viewWithActionModel
+ property string funcResult
+ model: ListModel { ListElement { friendlyText: "one"; action: function(text) { viewWithActionModel.funcResult = text } } }
+ delegate: Item {
+ Component.onCompleted: action(model.friendlyText)
+ }
+ }
+
Component {
id: delegateModelAfterCreateComponent
Rectangle {
@@ -350,5 +359,9 @@ Item {
singleElementList.heightForDelegate = 200;
compare(singleElementList.contentHeightOnDelegateResize, 200);
}
+
+ function test_viewWithAction() {
+ compare(viewWithActionModel.funcResult, "one")
+ }
}
}
diff --git a/tests/auto/qmltest/shadersource/tst_DynamicallyCreatedSource.qml b/tests/auto/qmltest/shadersource/tst_DynamicallyCreatedSource.qml
index 2c6d4cc28f..74dc63a972 100644
--- a/tests/auto/qmltest/shadersource/tst_DynamicallyCreatedSource.qml
+++ b/tests/auto/qmltest/shadersource/tst_DynamicallyCreatedSource.qml
@@ -67,6 +67,10 @@ Item {
when: root.source != undefined
function test_endresult() {
+ if ((Qt.platform.pluginName === "offscreen")
+ || (Qt.platform.pluginName === "minimal"))
+ skip("grabImage does not work on offscreen/minimal platforms");
+
var image = grabImage(root);
compare(image.red(0,0), 255);
compare(image.green(0,0), 0);
diff --git a/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp b/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp
index d4065e3d38..fe794cf952 100644
--- a/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp
+++ b/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp
@@ -149,6 +149,10 @@ void tst_drawingmodes::points()
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
#ifdef Q_OS_WIN
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
QSKIP("ANGLE cannot draw GL_POINTS.");
@@ -187,6 +191,11 @@ void tst_drawingmodes::lines()
DrawingModeItem::drawingMode = GL_LINES;
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("DrawingModes.qml");
QCOMPARE(fb.width(), 200);
@@ -213,6 +222,11 @@ void tst_drawingmodes::lineStrip()
DrawingModeItem::drawingMode = GL_LINE_STRIP;
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("DrawingModes.qml");
QCOMPARE(fb.width(), 200);
@@ -241,6 +255,11 @@ void tst_drawingmodes::lineLoop()
DrawingModeItem::drawingMode = GL_LINE_LOOP;
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("DrawingModes.qml");
QCOMPARE(fb.width(), 200);
@@ -269,6 +288,11 @@ void tst_drawingmodes::triangles()
DrawingModeItem::drawingMode = GL_TRIANGLES;
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("DrawingModes.qml");
QCOMPARE(fb.width(), 200);
@@ -293,6 +317,11 @@ void tst_drawingmodes::triangleStrip()
DrawingModeItem::drawingMode = GL_TRIANGLE_STRIP;
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("DrawingModes.qml");
QCOMPARE(fb.width(), 200);
@@ -316,6 +345,11 @@ void tst_drawingmodes::triangleFan()
DrawingModeItem::drawingMode = GL_TRIANGLE_FAN;
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("DrawingModes.qml");
QCOMPARE(fb.width(), 200);
diff --git a/tests/auto/quick/nodes/tst_nodestest.cpp b/tests/auto/quick/nodes/tst_nodestest.cpp
index 63e0aeb324..140a3b583e 100644
--- a/tests/auto/quick/nodes/tst_nodestest.cpp
+++ b/tests/auto/quick/nodes/tst_nodestest.cpp
@@ -41,6 +41,9 @@
#include <QtQuick/qsgsimpletexturenode.h>
#include <QtQuick/private/qsgtexture_p.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/qpa/qplatformintegration.h>
+
QT_BEGIN_NAMESPACE
inline bool operator==(const QSGGeometry::TexturedPoint2D& l, const QSGGeometry::TexturedPoint2D& r)
{
@@ -80,6 +83,9 @@ private:
void NodesTest::initTestCase()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
+ QSKIP("OpenGL not supported by the platform");
+
QSGRenderLoop *renderLoop = QSGRenderLoop::instance();
surface = new QOffscreenSurface;
diff --git a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
index 820c804065..dcb0e01b5d 100644
--- a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
+++ b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
@@ -292,7 +292,7 @@ class KillerThread : public QThread
{
Q_OBJECT
protected:
- void run() Q_DECL_OVERRIDE {
+ void run() override {
sleep(3);
qFatal("Either the GUI or the render thread is stuck in an infinite loop.");
}
diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_imagedata.qml b/tests/auto/quick/qquickcanvasitem/data/tst_imagedata.qml
index 7095602ea2..76b99a765e 100644
--- a/tests/auto/quick/qquickcanvasitem/data/tst_imagedata.qml
+++ b/tests/auto/quick/qquickcanvasitem/data/tst_imagedata.qml
@@ -6,6 +6,10 @@ CanvasTestCase {
name: "imagedata"
function init_data() { return testData("2d"); }
function test_rounding(row) {
+ if ((Qt.platform.pluginName === "offscreen")
+ || (Qt.platform.pluginName === "minimal"))
+ skip("ctx.getImageData crashes on offscreen/minimal platforms");
+
var canvas = createCanvasObject(row);
var ctx = canvas.getContext('2d');
var size = 17
diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
index a2a65aa803..256e667980 100644
--- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp
+++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
@@ -301,6 +301,10 @@ void tst_qquickimage::smooth()
void tst_qquickimage::mirror()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QMap<QQuickImage::FillMode, QImage> screenshots;
QList<QQuickImage::FillMode> fillModes;
fillModes << QQuickImage::Stretch << QQuickImage::PreserveAspectFit << QQuickImage::PreserveAspectCrop
@@ -501,6 +505,10 @@ void tst_qquickimage::big()
void tst_qquickimage::tiling_QTBUG_6716()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QFETCH(QString, source);
QQuickView view(testFileUrl(source));
@@ -1034,6 +1042,10 @@ void tst_qquickimage::highDpiFillModesAndSizes()
void tst_qquickimage::hugeImages()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QQuickView view;
view.setSource(testFileUrl("hugeImages.qml"));
view.setGeometry(0, 0, 200, 200);
diff --git a/tests/auto/quick/qquickitem/BLACKLIST b/tests/auto/quick/qquickitem/BLACKLIST
index d94a3ef102..f00b061356 100644
--- a/tests/auto/quick/qquickitem/BLACKLIST
+++ b/tests/auto/quick/qquickitem/BLACKLIST
@@ -1,2 +1,4 @@
[contains:hollow square: testing points inside]
xcb
+[ignoreButtonPressNotInAcceptedMouseButtons]
+*
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index 09e89ff85f..00aa5ef726 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -3305,6 +3305,10 @@ void tst_QQuickItem::childAt()
void tst_QQuickItem::grab()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabToImage not functional on offscreen/minimimal platforms");
+
QQuickView view;
view.setSource(testFileUrl("grabToImage.qml"));
view.show();
diff --git a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
index 5419778cfc..a8a00b51e9 100644
--- a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
+++ b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
@@ -36,6 +36,9 @@
#include "../../shared/util.h"
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/qpa/qplatformintegration.h>
+
class tst_QQuickItemLayer: public QQmlDataTest
{
Q_OBJECT
@@ -54,7 +57,7 @@ public:
}
private slots:
- void initTestCase() Q_DECL_OVERRIDE;
+ void initTestCase() override;
void layerEnabled();
void layerSmooth();
#if QT_CONFIG(opengl)
@@ -102,35 +105,37 @@ void tst_QQuickItemLayer::initTestCase()
{
QQmlDataTest::initTestCase();
#if QT_CONFIG(opengl)
- QWindow window;
- QOpenGLContext context;
- window.setSurfaceType(QWindow::OpenGLSurface);
- window.create();
- QVERIFY(context.create());
- QVERIFY(context.makeCurrent(&window));
- const char *vendor = (const char *)context.functions()->glGetString(GL_VENDOR);
- const char *renderer = (const char *)context.functions()->glGetString(GL_RENDERER);
- m_isMesaSoftwareRasterizer = strcmp(vendor, "Mesa Project") == 0
- && strcmp(renderer, "Software Rasterizer") == 0;
- if (m_isMesaSoftwareRasterizer) {
- // Expects format: <OpenGL version> Mesa <Mesa version>[-devel] [...]
- const char *version = (const char *)context.functions()->glGetString(GL_VERSION);
- QList<QByteArray> list = QByteArray(version).split(' ');
- if (list.size() >= 3) {
- list = list.at(2).split('-').at(0).split('.');
- int major = 0;
- int minor = 0;
- int patch = 0;
- if (list.size() >= 1)
- major = list.at(0).toInt();
- if (list.size() >= 2)
- minor = list.at(1).toInt();
- if (list.size() >= 3)
- patch = list.at(2).toInt();
- m_mesaVersion = QT_VERSION_CHECK(major, minor, patch);
+ if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) {
+ QWindow window;
+ QOpenGLContext context;
+ window.setSurfaceType(QWindow::OpenGLSurface);
+ window.create();
+ QVERIFY(context.create());
+ QVERIFY(context.makeCurrent(&window));
+ const char *vendor = (const char *)context.functions()->glGetString(GL_VENDOR);
+ const char *renderer = (const char *)context.functions()->glGetString(GL_RENDERER);
+ m_isMesaSoftwareRasterizer = strcmp(vendor, "Mesa Project") == 0
+ && strcmp(renderer, "Software Rasterizer") == 0;
+ if (m_isMesaSoftwareRasterizer) {
+ // Expects format: <OpenGL version> Mesa <Mesa version>[-devel] [...]
+ const char *version = (const char *)context.functions()->glGetString(GL_VERSION);
+ QList<QByteArray> list = QByteArray(version).split(' ');
+ if (list.size() >= 3) {
+ list = list.at(2).split('-').at(0).split('.');
+ int major = 0;
+ int minor = 0;
+ int patch = 0;
+ if (list.size() >= 1)
+ major = list.at(0).toInt();
+ if (list.size() >= 2)
+ minor = list.at(1).toInt();
+ if (list.size() >= 3)
+ patch = list.at(2).toInt();
+ m_mesaVersion = QT_VERSION_CHECK(major, minor, patch);
+ }
}
+ window.create();
}
- window.create();
#endif
QQuickView view;
view.showNormal();
@@ -147,6 +152,11 @@ void tst_QQuickItemLayer::layerSmooth()
{
if (m_isMesaSoftwareRasterizer && m_mesaVersion < QT_VERSION_CHECK(7, 11, 0))
QSKIP("Mesa Software Rasterizer below version 7.11 does not render this test correctly.");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("Smooth.qml");
QCOMPARE(fb.pixel(0, 0), qRgb(0xff, 0, 0));
QCOMPARE(fb.pixel(fb.width() - 1, 0), qRgb(0, 0, 0xff));
@@ -166,6 +176,11 @@ void tst_QQuickItemLayer::layerEnabled()
{
if (m_isMesaSoftwareRasterizer && m_mesaVersion < QT_VERSION_CHECK(7, 11, 0))
QSKIP("Mesa Software Rasterizer below version 7.11 does not render this test correctly.");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("Enabled.qml");
// Verify the banding
QCOMPARE(fb.pixel(0, 0), fb.pixel(0, 1));
@@ -181,6 +196,7 @@ void tst_QQuickItemLayer::layerMipmap()
{
if (m_isMesaSoftwareRasterizer)
QSKIP("Mipmapping does not work with the Mesa Software Rasterizer.");
+
QImage fb = runTest("Mipmap.qml");
QVERIFY(fb.pixel(0, 0) != 0xff000000);
QVERIFY(fb.pixel(0, 0) != 0xffffffff);
@@ -195,6 +211,11 @@ void tst_QQuickItemLayer::layerEffect()
{
if (m_isMesaSoftwareRasterizer && m_mesaVersion < QT_VERSION_CHECK(7, 11, 0))
QSKIP("Mesa Software Rasterizer below version 7.11 does not render this test correctly.");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("Effect.qml");
QCOMPARE(fb.pixel(0, 0), qRgb(0xff, 0, 0));
QCOMPARE(fb.pixel(fb.width() - 1, 0), qRgb(0, 0xff, 0));
@@ -451,6 +472,10 @@ void tst_QQuickItemLayer::itemEffect()
void tst_QQuickItemLayer::rectangleEffect()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("RectangleEffect.qml");
QCOMPARE(fb.pixel(0, 0), qRgb(0, 0xff, 0));
QCOMPARE(fb.pixel(199, 0), qRgb(0, 0xff, 0));
diff --git a/tests/auto/quick/qquicklistview/data/flickBothDirections.qml b/tests/auto/quick/qquicklistview/data/flickBothDirections.qml
index 754e91a732..b491981edb 100644
--- a/tests/auto/quick/qquicklistview/data/flickBothDirections.qml
+++ b/tests/auto/quick/qquicklistview/data/flickBothDirections.qml
@@ -63,6 +63,7 @@ Rectangle {
contentWidth: initialContentWidth
contentHeight: initialContentHeight
flickableDirection: initialFlickableDirection
+ pixelAligned: true
delegate: Rectangle {
width: list.orientation == ListView.Vertical ? 120 : 10
height: list.orientation == ListView.Vertical ? 20 : 110
diff --git a/tests/auto/quick/qquickloader/BLACKLIST b/tests/auto/quick/qquickloader/BLACKLIST
new file mode 100644
index 0000000000..a45a300607
--- /dev/null
+++ b/tests/auto/quick/qquickloader/BLACKLIST
@@ -0,0 +1,4 @@
+# Test fails on qemu when bound to one core, passes on real ARM
+# QTBUG-63049
+[asyncToSync1]
+b2qt
diff --git a/tests/auto/quick/qquickmousearea/BLACKLIST b/tests/auto/quick/qquickmousearea/BLACKLIST
new file mode 100644
index 0000000000..817eb472a4
--- /dev/null
+++ b/tests/auto/quick/qquickmousearea/BLACKLIST
@@ -0,0 +1,3 @@
+# QTBUG-63786
+[pressedMultipleButtons]
+*
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
index 01bce46ccb..dada49cfc2 100644
--- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
+++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
@@ -77,7 +77,7 @@ public:
{}
private slots:
- void initTestCase() Q_DECL_OVERRIDE;
+ void initTestCase() override;
void dragProperties();
void resetDrag();
void dragging_data() { acceptedButton_data(); }
@@ -1293,6 +1293,10 @@ void tst_QQuickMouseArea::hoverPropagation()
void tst_QQuickMouseArea::hoverVisible()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QQuickView window;
QByteArray errorMessage;
QVERIFY2(initView(window, testFileUrl("hoverVisible.qml"), true, &errorMessage), errorMessage.constData());
diff --git a/tests/auto/quick/qquickpainteditem/BLACKLIST b/tests/auto/quick/qquickpainteditem/BLACKLIST
new file mode 100644
index 0000000000..9b58325f6c
--- /dev/null
+++ b/tests/auto/quick/qquickpainteditem/BLACKLIST
@@ -0,0 +1,27 @@
+# QTBUG-63053
+[opaquePainting]
+b2qt
+
+# QTBUG-63053
+[antialiasing]
+b2qt
+
+# QTBUG-63053
+[mipmap]
+b2qt
+
+# QTBUG-63053
+[performanceHints]
+b2qt
+
+# QTBUG-63053
+[contentScale]
+b2qt
+
+# QTBUG-63053
+[contentsBoundingRect]
+b2qt
+
+# QTBUG-63053
+[fillColor]
+b2qt
diff --git a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
index 0d79592e37..2aaad867bf 100644
--- a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
+++ b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
@@ -70,6 +70,10 @@ void tst_qquickrectangle::color()
QVERIFY(QTest::qWaitForWindowExposed(&view));
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+
QImage image = view.grabWindow();
QVERIFY(image.pixel(0,0) == QColor("#020202").rgba());
}
diff --git a/tests/auto/quick/qquickshape/tst_qquickshape.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
index 1b5b345d19..2a349d2013 100644
--- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp
+++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
@@ -223,6 +223,10 @@ void tst_QQuickShape::render()
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -240,6 +244,10 @@ void tst_QQuickShape::renderWithMultipleSp()
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -257,6 +265,10 @@ void tst_QQuickShape::radialGrad()
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -274,6 +286,10 @@ void tst_QQuickShape::conicalGrad()
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index 4e643bb9d9..51c04a109d 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -984,6 +984,10 @@ void tst_qquicktext::hAlignImplicitWidth()
const int centeredSection3End = centeredSection3 + sectionWidth;
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+
// Left Align
QImage image = view.grabWindow();
const int left = numberOfNonWhitePixels(centeredSection1, centeredSection2, image);
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index f4fef1f946..d0031e397b 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -905,6 +905,10 @@ void tst_qquicktextedit::hAlignVisual()
const int centeredSection3End = centeredSection3 + sectionWidth;
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+
// Left Align
QImage image = view.grabWindow();
const int left = numberOfNonWhitePixels(centeredSection1, centeredSection2, image);
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index c95d9b311e..2e4d1a9b2d 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -1270,6 +1270,10 @@ void tst_qquickwindow::grab_data()
void tst_qquickwindow::grab()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QFETCH(bool, visible);
QFETCH(bool, alpha);
@@ -2354,6 +2358,9 @@ void tst_qquickwindow::testRenderJob()
window.scheduleRenderJob(new RenderJob(QQuickWindow::NoStage, &completedJobs),
QQuickWindow::NoStage);
QTRY_COMPARE(RenderJob::deleted, 1);
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QEXPECT_FAIL("", "NoStage job fails on offscreen/minimimal platforms", Continue);
QCOMPARE(completedJobs.size(), 1);
#if QT_CONFIG(opengl)
@@ -2422,13 +2429,13 @@ public:
m_childMouseEventFilterEventCount.clear();
}
protected:
- bool childMouseEventFilter(QQuickItem *, QEvent *event) Q_DECL_OVERRIDE
+ bool childMouseEventFilter(QQuickItem *, QEvent *event) override
{
m_childMouseEventFilterEventCount[event->type()]++;
return m_returnTrueForType.contains(event->type());
}
- bool event(QEvent *event) Q_DECL_OVERRIDE
+ bool event(QEvent *event) override
{
m_eventCount[event->type()]++;
return QQuickRectangle::event(event);
@@ -2609,7 +2616,7 @@ public:
return false;
}
- virtual bool contains(const QPointF &pos) const override {
+ bool contains(const QPointF &pos) const override {
// returns true if the point is inside the the embedded circle inside the (square) rect
const float radius = (float)width()/2;
const QVector2D center(radius, radius);
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index 9b7740646a..65333e166e 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -92,6 +92,9 @@ QUICKTESTS = \
SUBDIRS += $$PUBLICTESTS
+# Following tests are too slow on qemu + software backend
+boot2qt: QUICKTESTS -= qquickgridview qquicklistview qquickpositioners
+
!qtConfig(accessibility):QUICKTESTS -= qquickaccessible
qtConfig(private_tests) {
diff --git a/tests/auto/quick/rendernode/tst_rendernode.cpp b/tests/auto/quick/rendernode/tst_rendernode.cpp
index e0fe2c42fc..d6e1982b1e 100644
--- a/tests/auto/quick/rendernode/tst_rendernode.cpp
+++ b/tests/auto/quick/rendernode/tst_rendernode.cpp
@@ -213,6 +213,11 @@ void tst_rendernode::renderOrder()
{
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("RenderOrder.qml");
const qreal scaleFactor = QGuiApplication::primaryScreen()->devicePixelRatio();
@@ -237,6 +242,11 @@ void tst_rendernode::messUpState()
{
if (QGuiApplication::primaryScreen()->depth() < 24)
QSKIP("This test does not work at display depths < 24");
+
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QImage fb = runTest("MessUpState.qml");
int x1 = 0;
int x2 = fb.width() / 2;
@@ -290,6 +300,10 @@ public:
void tst_rendernode::matrix()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
qmlRegisterType<StateRecordingRenderNodeItem>("RenderNode", 1, 0, "StateRecorder");
StateRecordingRenderNode::matrices.clear();
runTest("matrix.qml");
diff --git a/tests/auto/quick/scenegraph/tst_scenegraph.cpp b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
index 2cd3a041c8..d8d9cd26e0 100644
--- a/tests/auto/quick/scenegraph/tst_scenegraph.cpp
+++ b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
@@ -47,6 +47,9 @@
#include "../../shared/util.h"
#include "../shared/visualtestutil.h"
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/qpa/qplatformintegration.h>
+
using namespace QQuickVisualTestUtil;
class PerPixelRect : public QQuickItem
@@ -114,6 +117,7 @@ private slots:
private:
bool m_brokenMipmapSupport;
QQuickView *createView(const QString &file, QWindow *parent = 0, int x = -1, int y = -1, int w = -1, int h = -1);
+ bool isRunningOnOpenGL();
};
template <typename T> class ScopedList : public QList<T> {
@@ -131,38 +135,40 @@ void tst_SceneGraph::initTestCase()
qDebug() << "RenderLoop: " << loop;
#if QT_CONFIG(opengl)
- QOpenGLContext context;
- context.setFormat(loop->sceneGraphContext()->defaultSurfaceFormat());
- context.create();
- QSurfaceFormat format = context.format();
-
- QOffscreenSurface surface;
- surface.setFormat(format);
- surface.create();
- if (!context.makeCurrent(&surface))
- qFatal("Failed to create a GL context...");
-
- QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
- qDebug() << "R/G/B/A Buffers: " << format.redBufferSize() << format.greenBufferSize() << format.blueBufferSize() << format.alphaBufferSize();
- qDebug() << "Depth Buffer: " << format.depthBufferSize();
- qDebug() << "Stencil Buffer: " << format.stencilBufferSize();
- qDebug() << "Samples: " << format.samples();
- int textureSize;
- funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &textureSize);
- qDebug() << "Max Texture Size: " << textureSize;
- qDebug() << "GL_VENDOR: " << (const char *) funcs->glGetString(GL_VENDOR);
- qDebug() << "GL_RENDERER: " << (const char *) funcs->glGetString(GL_RENDERER);
- QByteArray version = (const char *) funcs->glGetString(GL_VERSION);
- qDebug() << "GL_VERSION: " << version.constData();
- QSet<QByteArray> exts = context.extensions();
- QByteArray all;
- foreach (const QByteArray &e, exts) all += ' ' + e;
- qDebug() << "GL_EXTENSIONS: " << all.constData();
-
- m_brokenMipmapSupport = version.contains("Mesa 10.1") || version.contains("Mesa 9.");
- qDebug() << "Broken Mipmap: " << m_brokenMipmapSupport;
-
- context.doneCurrent();
+ if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) {
+ QOpenGLContext context;
+ context.setFormat(loop->sceneGraphContext()->defaultSurfaceFormat());
+ context.create();
+ QSurfaceFormat format = context.format();
+
+ QOffscreenSurface surface;
+ surface.setFormat(format);
+ surface.create();
+ if (!context.makeCurrent(&surface))
+ qFatal("Failed to create a GL context...");
+
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
+ qDebug() << "R/G/B/A Buffers: " << format.redBufferSize() << format.greenBufferSize() << format.blueBufferSize() << format.alphaBufferSize();
+ qDebug() << "Depth Buffer: " << format.depthBufferSize();
+ qDebug() << "Stencil Buffer: " << format.stencilBufferSize();
+ qDebug() << "Samples: " << format.samples();
+ int textureSize;
+ funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &textureSize);
+ qDebug() << "Max Texture Size: " << textureSize;
+ qDebug() << "GL_VENDOR: " << (const char *) funcs->glGetString(GL_VENDOR);
+ qDebug() << "GL_RENDERER: " << (const char *) funcs->glGetString(GL_RENDERER);
+ QByteArray version = (const char *) funcs->glGetString(GL_VERSION);
+ qDebug() << "GL_VERSION: " << version.constData();
+ QSet<QByteArray> exts = context.extensions();
+ QByteArray all;
+ foreach (const QByteArray &e, exts) all += ' ' + e;
+ qDebug() << "GL_EXTENSIONS: " << all.constData();
+
+ m_brokenMipmapSupport = version.contains("Mesa 10.1") || version.contains("Mesa 9.");
+ qDebug() << "Broken Mipmap: " << m_brokenMipmapSupport;
+
+ context.doneCurrent();
+ }
#endif
}
@@ -231,6 +237,10 @@ public:
void tst_SceneGraph::manyWindows()
{
+ if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
+ || (QGuiApplication::platformName() == QLatin1String("minimal")))
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+
QFETCH(QString, file);
QFETCH(bool, toplevel);
QFETCH(bool, shared);
@@ -430,12 +440,8 @@ void tst_SceneGraph::render_data()
void tst_SceneGraph::render()
{
- QQuickView dummy;
- dummy.show();
- QTest::qWaitForWindowExposed(&dummy);
- if (dummy.rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
+ if (!isRunningOnOpenGL())
QSKIP("Skipping complex rendering tests due to not running with OpenGL");
- dummy.hide();
QFETCH(QString, file);
QFETCH(QList<Sample>, baseStage);
@@ -485,6 +491,9 @@ void tst_SceneGraph::render()
// current on the other window.
void tst_SceneGraph::hideWithOtherContext()
{
+ if (!isRunningOnOpenGL())
+ QSKIP("Skipping OpenGL context test due to not running with OpenGL");
+
QWindow window;
window.setSurfaceType(QWindow::OpenGLSurface);
window.resize(100, 100);
@@ -500,9 +509,6 @@ void tst_SceneGraph::hideWithOtherContext()
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
- if (view.rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
- QSKIP("Skipping OpenGL context test due to not running with OpenGL");
-
renderingOnMainThread = view.openglContext()->thread() == QGuiApplication::instance()->thread();
// Make the local context current on the local window...
@@ -549,6 +555,17 @@ void tst_SceneGraph::createTextureFromImage()
QCOMPARE(texture->hasAlphaChannel(), expectedAlpha);
}
+bool tst_SceneGraph::isRunningOnOpenGL()
+{
+ bool retval = false;
+ QQuickView dummy;
+ dummy.show();
+ QTest::qWaitForWindowExposed(&dummy);
+ if (dummy.rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL)
+ retval = true;
+ dummy.hide();
+ return retval;
+}
#include "tst_scenegraph.moc"
diff --git a/tests/auto/quick/shared/viewtestutil.cpp b/tests/auto/quick/shared/viewtestutil.cpp
index a33c5eae96..32842a9fde 100644
--- a/tests/auto/quick/shared/viewtestutil.cpp
+++ b/tests/auto/quick/shared/viewtestutil.cpp
@@ -398,7 +398,7 @@ bool QQuickViewTestUtil::testVisibleItems(const QQuickItemViewPrivate *priv, boo
for (int i = 0; i < priv->visibleItems.count(); ++i) {
FxViewItem *item = priv->visibleItems.at(i);
if (!item) {
- *failItem = Q_NULLPTR;
+ *failItem = nullptr;
return false;
}
#if 0
diff --git a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
index 537fe99012..c0db9c733d 100644
--- a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
+++ b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
@@ -368,6 +368,10 @@ void tst_qquickwidget::reparentToNewWindow()
QSignalSpy afterRenderingSpy(qqw->quickWindow(), &QQuickWindow::afterRendering);
qqw->setParent(&window2);
qqw->show();
+
+ if (QGuiApplication::platformName() == QLatin1String("offscreen"))
+ QEXPECT_FAIL("", "afterRendering not emitted after reparenting on offscreen", Continue);
+
QTRY_VERIFY(afterRenderingSpy.size() > 0);
QImage img = qqw->grabFramebuffer();