summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-03-19 10:02:02 +0100
committerSergio Ahumada <sergio.ahumada@digia.com>2013-03-19 10:02:32 +0100
commit3c5cef4fdec28ab4adfb24f75f2fd7f3fca7b3b0 (patch)
tree7dfd894311ad904b50c35470f24479c5f5fa43ec
parentb35d793648a24b229aac75ea43d5a175967304ca (diff)
parent14166395053bf93a561d87846d172515e5325882 (diff)
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle Change-Id: Ic10a8c118053323004cafe1b4bffd990a16aaf7f
-rw-r--r--src/declarative/debugger/qdeclarativedebug.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebugclient_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebuggerstatus_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebugserver_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebugserverconnection_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice_p_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebug_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebugservice.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorinterface_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorservice_p.h4
-rw-r--r--src/declarative/debugger/qjsdebuggeragent_p.h4
-rw-r--r--src/declarative/debugger/qjsdebugservice_p.h4
-rw-r--r--src/declarative/debugger/qpacketprotocol_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocuspanel_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocusscope_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativelayoutitem_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepincharea_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextlayout_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetranslate_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h4
-rw-r--r--src/declarative/qml/qdeclarative.h18
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings_p.h4
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp9
-rw-r--r--src/declarative/qml/qdeclarativecomponent.h4
-rw-r--r--src/declarative/qml/qdeclarativecontext.h4
-rw-r--r--src/declarative/qml/qdeclarativecontextscriptclass_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecustomparser_p.h4
-rw-r--r--src/declarative/qml/qdeclarativedom_p.h4
-rw-r--r--src/declarative/qml/qdeclarativeengine.h4
-rw-r--r--src/declarative/qml/qdeclarativeerror.h4
-rw-r--r--src/declarative/qml/qdeclarativeexpression.h4
-rw-r--r--src/declarative/qml/qdeclarativeextensioninterface.h4
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.h4
-rw-r--r--src/declarative/qml/qdeclarativefastproperties_p.h4
-rw-r--r--src/declarative/qml/qdeclarativeglobal_p.h4
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.h4
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp31
-rw-r--r--src/declarative/qml/qdeclarativeinfo.h4
-rw-r--r--src/declarative/qml/qdeclarativelist.h4
-rw-r--r--src/declarative/qml/qdeclarativemetatype.cpp75
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h4
-rw-r--r--src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h4
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h4
-rw-r--r--src/declarative/qml/qdeclarativeparserstatus.h4
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h15
-rw-r--r--src/declarative/qml/qdeclarativeproperty.h4
-rw-r--r--src/declarative/qml/qdeclarativepropertyvalueinterceptor.h4
-rw-r--r--src/declarative/qml/qdeclarativepropertyvaluesource.h4
-rw-r--r--src/declarative/qml/qdeclarativeproxymetaobject_p.h4
-rw-r--r--src/declarative/qml/qdeclarativerefcount_p.h4
-rw-r--r--src/declarative/qml/qdeclarativescriptparser_p.h6
-rw-r--r--src/declarative/qml/qdeclarativescriptstring.h4
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp72
-rw-r--r--src/declarative/qml/qdeclarativetypenotavailable_p.h4
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp13
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript_p.h4
-rw-r--r--src/declarative/qml/rewriter/textwriter_p.h2
-rw-r--r--src/declarative/qtdeclarativeglobal.h4
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h4
-rw-r--r--src/declarative/util/qdeclarativeapplication_p.h4
-rw-r--r--src/declarative/util/qdeclarativebehavior_p.h4
-rw-r--r--src/declarative/util/qdeclarativebind_p.h4
-rw-r--r--src/declarative/util/qdeclarativeconnections_p.h4
-rw-r--r--src/declarative/util/qdeclarativefontloader_p.h4
-rw-r--r--src/declarative/util/qdeclarativelistaccessor_p.h4
-rw-r--r--src/declarative/util/qdeclarativelistmodel_p.h4
-rw-r--r--src/declarative/util/qdeclarativelistmodel_p_p.h4
-rw-r--r--src/declarative/util/qdeclarativelistmodelworkeragent_p.h4
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject_p.h4
-rw-r--r--src/declarative/util/qdeclarativepackage_p.h4
-rw-r--r--src/declarative/util/qdeclarativepixmapcache_p.h4
-rw-r--r--src/declarative/util/qdeclarativepropertychanges_p.h4
-rw-r--r--src/declarative/util/qdeclarativepropertymap.h4
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation_p.h4
-rw-r--r--src/declarative/util/qdeclarativespringanimation_p.h4
-rw-r--r--src/declarative/util/qdeclarativestate_p.h4
-rw-r--r--src/declarative/util/qdeclarativestategroup_p.h4
-rw-r--r--src/declarative/util/qdeclarativestateoperations_p.h4
-rw-r--r--src/declarative/util/qdeclarativesystempalette_p.h4
-rw-r--r--src/declarative/util/qdeclarativetimer_p.h4
-rw-r--r--src/declarative/util/qdeclarativetransition_p.h4
-rw-r--r--src/declarative/util/qdeclarativeutilmodule_p.h4
-rw-r--r--src/declarative/util/qdeclarativeview.h4
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel_p.h4
-rw-r--r--src/declarative/util/qlistmodelinterface_p.h3
-rw-r--r--src/doc/src/declarative/qtdeclarative.qdoc15
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.h4
-rw-r--r--src/imports/gestures/qdeclarativegesturearea_p.h4
-rw-r--r--src/imports/particles/qdeclarativeparticles_p.h4
-rw-r--r--src/imports/shaders/scenegraph/qsggeometry.h4
-rw-r--r--src/imports/shaders/shadereffect.h4
-rw-r--r--src/imports/shaders/shadereffectbuffer.h4
-rw-r--r--src/imports/shaders/shadereffectitem.h4
-rw-r--r--src/imports/shaders/shadereffectsource.h4
-rw-r--r--src/imports/webview/qdeclarativewebview_p.h4
-rw-r--r--tests/auto/bic/data/QtDeclarative.5.0.0.linux-gcc-ia32.txt151
-rw-r--r--tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/LocalLast2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/localOrderTest.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp38
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp31
-rw-r--r--tools/qml/qdeclarativetester.cpp2
-rw-r--r--tools/qml/qdeclarativetester.h2
135 files changed, 292 insertions, 656 deletions
diff --git a/src/declarative/debugger/qdeclarativedebug.h b/src/declarative/debugger/qdeclarativedebug.h
index ff021850..b4250604 100644
--- a/src/declarative/debugger/qdeclarativedebug.h
+++ b/src/declarative/debugger/qdeclarativedebug.h
@@ -44,8 +44,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -62,6 +60,4 @@ static QDeclarativeDebuggingEnabler qmlEnableDebuggingHelper;
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUG_H
diff --git a/src/declarative/debugger/qdeclarativedebugclient_p.h b/src/declarative/debugger/qdeclarativedebugclient_p.h
index 5332d5df..79046749 100644
--- a/src/declarative/debugger/qdeclarativedebugclient_p.h
+++ b/src/declarative/debugger/qdeclarativedebugclient_p.h
@@ -46,8 +46,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -98,6 +96,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUGCLIENT_H
diff --git a/src/declarative/debugger/qdeclarativedebuggerstatus_p.h b/src/declarative/debugger/qdeclarativedebuggerstatus_p.h
index 3a9b2108..f9670608 100644
--- a/src/declarative/debugger/qdeclarativedebuggerstatus_p.h
+++ b/src/declarative/debugger/qdeclarativedebuggerstatus_p.h
@@ -46,8 +46,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -66,6 +64,4 @@ Q_DECLARE_INTERFACE(QDeclarativeDebuggerStatus, QDeclarativeDebuggerStatus_iid)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QLMDEBUGGERSTATUS_P_H
diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/declarative/debugger/qdeclarativedebughelper_p.h
index e72501ee..f05666ca 100644
--- a/src/declarative/debugger/qdeclarativedebughelper_p.h
+++ b/src/declarative/debugger/qdeclarativedebughelper_p.h
@@ -44,8 +44,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class QScriptEngine;
@@ -66,6 +64,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUGHELPER_P_H
diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/declarative/debugger/qdeclarativedebugserver_p.h
index 533d3d36..3adfc560 100644
--- a/src/declarative/debugger/qdeclarativedebugserver_p.h
+++ b/src/declarative/debugger/qdeclarativedebugserver_p.h
@@ -45,8 +45,6 @@
#include <private/qdeclarativeglobal_p.h>
#include <private/qdeclarativedebugserverconnection_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -86,6 +84,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUGSERVICE_H
diff --git a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h
index 87ea9a8e..403ee520 100644
--- a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h
+++ b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h
@@ -56,8 +56,6 @@
// We mean it.
//
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -83,6 +81,4 @@ Q_DECLARE_INTERFACE(QDeclarativeDebugServerConnection, QDeclarativeDebugServerCo
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUGSERVERCONNECTION_H
diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/declarative/debugger/qdeclarativedebugservice_p.h
index 98ac7ea9..8961f0f6 100644
--- a/src/declarative/debugger/qdeclarativedebugservice_p.h
+++ b/src/declarative/debugger/qdeclarativedebugservice_p.h
@@ -46,8 +46,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -90,7 +88,5 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUGSERVICE_H
diff --git a/src/declarative/debugger/qdeclarativedebugservice_p_p.h b/src/declarative/debugger/qdeclarativedebugservice_p_p.h
index 35b83f0e..56e3b851 100644
--- a/src/declarative/debugger/qdeclarativedebugservice_p_p.h
+++ b/src/declarative/debugger/qdeclarativedebugservice_p_p.h
@@ -45,8 +45,6 @@
#include <QtCore/qglobal.h>
#include <private/qobject_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -66,6 +64,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUGSERVICE_P_H
diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h
index f968f46d..ba210a7f 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace_p.h
+++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h
@@ -47,8 +47,6 @@
#include <private/qdeclarativedebugservice_p.h>
#include <qelapsedtimer.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
struct QDeclarativeDebugData
@@ -144,7 +142,5 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUGTRACE_P_H
diff --git a/src/declarative/debugger/qdeclarativeenginedebug_p.h b/src/declarative/debugger/qdeclarativeenginedebug_p.h
index b802d36f..c16dddf5 100644
--- a/src/declarative/debugger/qdeclarativeenginedebug_p.h
+++ b/src/declarative/debugger/qdeclarativeenginedebug_p.h
@@ -47,8 +47,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -389,6 +387,4 @@ Q_DECLARE_METATYPE(QDeclarativeDebugObjectReference)
Q_DECLARE_METATYPE(QDeclarativeDebugContextReference)
Q_DECLARE_METATYPE(QDeclarativeDebugPropertyReference)
-QT_END_HEADER
-
#endif // QDECLARATIVEENGINEDEBUG_H
diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
index d97349ed..5ee064a2 100644
--- a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
@@ -518,7 +518,7 @@ void QDeclarativeEngineDebugService::messageReceived(const QByteArray &message)
QVariant expr;
bool isLiteralValue;
QString filename;
- int line;
+ int line = 0;
ds >> objectId >> propertyName >> expr >> isLiteralValue;
if (!ds.atEnd()) { // backward compatibility from 2.1, 2.2
ds >> filename >> line;
diff --git a/src/declarative/debugger/qdeclarativeinspectorinterface_p.h b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h
index 3596460b..685d7097 100644
--- a/src/declarative/debugger/qdeclarativeinspectorinterface_p.h
+++ b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h
@@ -44,8 +44,6 @@
#include <QtDeclarative/private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -66,6 +64,4 @@ Q_DECLARE_INTERFACE(QDeclarativeInspectorInterface, QDeclarativeInspectorInterfa
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEOBSERVERINTERFACE_H
diff --git a/src/declarative/debugger/qdeclarativeinspectorservice_p.h b/src/declarative/debugger/qdeclarativeinspectorservice_p.h
index 2aabf3c7..4c39968e 100644
--- a/src/declarative/debugger/qdeclarativeinspectorservice_p.h
+++ b/src/declarative/debugger/qdeclarativeinspectorservice_p.h
@@ -47,8 +47,6 @@
#include <QtCore/QList>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -88,6 +86,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEOBSERVERSERVICE_H
diff --git a/src/declarative/debugger/qjsdebuggeragent_p.h b/src/declarative/debugger/qjsdebuggeragent_p.h
index decc7010..5a2ed140 100644
--- a/src/declarative/debugger/qjsdebuggeragent_p.h
+++ b/src/declarative/debugger/qjsdebuggeragent_p.h
@@ -62,8 +62,6 @@ class QScriptValue;
class QDeclarativeEngine;
QT_END_NAMESPACE
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -225,6 +223,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QJSDEBUGGERAGENT_P_H
diff --git a/src/declarative/debugger/qjsdebugservice_p.h b/src/declarative/debugger/qjsdebugservice_p.h
index 8f89f592..b7240e31 100644
--- a/src/declarative/debugger/qjsdebugservice_p.h
+++ b/src/declarative/debugger/qjsdebugservice_p.h
@@ -58,8 +58,6 @@
#include "private/qdeclarativedebugservice_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -118,6 +116,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QJSDEBUGSERVICE_P_H
diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h
index 1a1e1464..ba8d200e 100644
--- a/src/declarative/debugger/qpacketprotocol_p.h
+++ b/src/declarative/debugger/qpacketprotocol_p.h
@@ -47,8 +47,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -122,6 +120,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
index fe23bfd3..0ced6746 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
@@ -50,8 +50,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -199,6 +197,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeAnchors)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
index 5f70491c..9ab6456c 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
@@ -46,8 +46,6 @@
#ifndef QT_NO_MOVIE
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -109,8 +107,6 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeAnimatedImage)
-QT_END_HEADER
-
#endif // QT_NO_MOVIE
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
index 9cdb73cc..c73e0c19 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
@@ -46,7 +46,6 @@
#include <QtNetwork/qnetworkreply.h>
-QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -104,6 +103,5 @@ private:
QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeBorderImage)
-QT_END_HEADER
#endif // QDECLARATIVEBORDERIMAGE_H
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
index d1f45539..fbe809be 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeitem.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -224,6 +222,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeFlickable)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable_p.h b/src/declarative/graphicsitems/qdeclarativeflipable_p.h
index 9bd65986..eebfa57e 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflipable_p.h
@@ -48,8 +48,6 @@
#include <QtGui/QTransform>
#include <QtGui/qvector3d.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -95,6 +93,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeFlipable)
-QT_END_HEADER
-
#endif // QDECLARATIVEFLIPABLE_H
diff --git a/src/declarative/graphicsitems/qdeclarativefocuspanel_p.h b/src/declarative/graphicsitems/qdeclarativefocuspanel_p.h
index c65f30b4..1b0fed65 100644
--- a/src/declarative/graphicsitems/qdeclarativefocuspanel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativefocuspanel_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeitem.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -73,6 +71,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeFocusPanel)
-QT_END_HEADER
-
#endif // QDECLARATIVEFOCUSPANEL_H
diff --git a/src/declarative/graphicsitems/qdeclarativefocusscope_p.h b/src/declarative/graphicsitems/qdeclarativefocusscope_p.h
index d12f9e97..fe152118 100644
--- a/src/declarative/graphicsitems/qdeclarativefocusscope_p.h
+++ b/src/declarative/graphicsitems/qdeclarativefocusscope_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeitem.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -64,6 +62,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeFocusScope)
-QT_END_HEADER
-
#endif // QDECLARATIVEFOCUSSCOPE_H
diff --git a/src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h b/src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h
index 30c634c4..987399b5 100644
--- a/src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h
+++ b/src/declarative/graphicsitems/qdeclarativegraphicswidget_p.h
@@ -45,8 +45,6 @@
#include <QObject>
#include <QtDeclarative/qdeclarativecomponent.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -85,6 +83,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEGRAPHICSWIDGET_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h
index 4e882b40..9bdfcfa7 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h
@@ -45,8 +45,6 @@
#include "private/qdeclarativeflickable_p.h"
#include "private/qdeclarativeguard_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -281,6 +279,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeGridView)
QML_DECLARE_TYPEINFO(QDeclarativeGridView, QML_HAS_ATTACHED_PROPERTIES)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeimage_p.h b/src/declarative/graphicsitems/qdeclarativeimage_p.h
index 5568561b..dee98c7d 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeimage_p.h
@@ -46,7 +46,6 @@
#include <QtNetwork/qnetworkreply.h>
-QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -95,6 +94,5 @@ private:
QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeImage)
-QT_END_HEADER
#endif // QDECLARATIVEIMAGE_H
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
index 7d56a027..ff771d93 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeimplicitsizeitem_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class QDeclarativeImageBasePrivate;
@@ -111,6 +109,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEIMAGEBASE_H
diff --git a/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h b/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h
index 3a261a10..629bbf7a 100644
--- a/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativepainteditem_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class QDeclarativeImplicitSizeItemPrivate;
@@ -95,6 +93,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEIMPLICITSIZEITEM_H
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index 6d5cd8be..47647d08 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -52,8 +52,6 @@
#include <QtGui/qfont.h>
#include <QtWidgets/qaction.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -231,6 +229,4 @@ QML_DECLARE_TYPE(QGraphicsWidget)
QML_DECLARE_TYPE(QAction)
#endif
-QT_END_HEADER
-
#endif // QDECLARATIVEITEM_H
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h b/src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h
index 8a37e020..f7750c1e 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h
@@ -44,8 +44,6 @@
#include <qdeclarative.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -59,6 +57,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEITEMMODULE_H
diff --git a/src/declarative/graphicsitems/qdeclarativelayoutitem_p.h b/src/declarative/graphicsitems/qdeclarativelayoutitem_p.h
index 35e02e52..cc84830f 100644
--- a/src/declarative/graphicsitems/qdeclarativelayoutitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativelayoutitem_p.h
@@ -46,8 +46,6 @@
#include <QGraphicsLayoutItem>
#include <QSizeF>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -90,5 +88,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeLayoutItem)
-QT_END_HEADER
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 33d3db35..08e76363 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -896,6 +896,8 @@ void QDeclarativeListViewPrivate::layout()
fixupPosition();
q->refill();
}
+ if (sectionCriteria)
+ updateCurrentSection();
if (header)
updateHeader();
if (footer)
diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h
index dc5949cd..339c4960 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h
@@ -45,8 +45,6 @@
#include "private/qdeclarativeflickable_p.h"
#include "private/qdeclarativeguard_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -365,6 +363,4 @@ QML_DECLARE_TYPEINFO(QDeclarativeListView, QML_HAS_ATTACHED_PROPERTIES)
QML_DECLARE_TYPE(QDeclarativeListView)
QML_DECLARE_TYPE(QDeclarativeViewSection)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p.h
index 894c4563..623ed757 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeloader_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeimplicitsizeitem_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -103,6 +101,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeLoader)
-QT_END_HEADER
-
#endif // QDECLARATIVELOADER_H
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
index af3e23e7..75ca8c95 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeitem.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -213,6 +211,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeDrag)
QML_DECLARE_TYPE(QDeclarativeMouseArea)
-QT_END_HEADER
-
#endif // QDECLARATIVEMOUSEAREA_H
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem_p.h b/src/declarative/graphicsitems/qdeclarativepainteditem_p.h
index 0a23b38f..fa3a3b4f 100644
--- a/src/declarative/graphicsitems/qdeclarativepainteditem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeitem.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -113,6 +111,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativePaintedItem)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h
index aab0da4e..429224a7 100644
--- a/src/declarative/graphicsitems/qdeclarativepath_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepath_p.h
@@ -49,8 +49,6 @@
#include <QtCore/QObject>
#include <QtGui/QPainterPath>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -281,6 +279,4 @@ QML_DECLARE_TYPE(QDeclarativePathCubic)
QML_DECLARE_TYPE(QDeclarativePathPercent)
QML_DECLARE_TYPE(QDeclarativePath)
-QT_END_HEADER
-
#endif // QDECLARATIVEPATH_H
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h
index 00835d8f..6a5a8443 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h
@@ -45,8 +45,6 @@
#include "qdeclarativeitem.h"
#include "private/qdeclarativepath_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -247,6 +245,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativePathView)
QML_DECLARE_TYPEINFO(QDeclarativePathView, QML_HAS_ATTACHED_PROPERTIES)
-QT_END_HEADER
-
#endif // QDECLARATIVEPATHVIEW_H
diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p.h
index c601a4ae..eff6bfc9 100644
--- a/src/declarative/graphicsitems/qdeclarativepincharea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepincharea_p.h
@@ -44,8 +44,6 @@
#include <qdeclarativeitem.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -308,6 +306,4 @@ QML_DECLARE_TYPE(QDeclarativePinch)
QML_DECLARE_TYPE(QDeclarativePinchEvent)
QML_DECLARE_TYPE(QDeclarativePinchArea)
-QT_END_HEADER
-
#endif // QDECLARATIVEPINCHAREA_H
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
index 3a78a0bb..4fe658ef 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
@@ -50,8 +50,6 @@
#include <QtCore/QObject>
#include <QtCore/QString>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -228,6 +226,4 @@ QML_DECLARE_TYPE(QDeclarativeRow)
QML_DECLARE_TYPE(QDeclarativeGrid)
QML_DECLARE_TYPE(QDeclarativeFlow)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle_p.h b/src/declarative/graphicsitems/qdeclarativerectangle_p.h
index ccb01cfb..8d9d6e3b 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle_p.h
+++ b/src/declarative/graphicsitems/qdeclarativerectangle_p.h
@@ -48,8 +48,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -183,6 +181,4 @@ QML_DECLARE_TYPE(QDeclarativeGradientStop)
QML_DECLARE_TYPE(QDeclarativeGradient)
QML_DECLARE_TYPE(QDeclarativeRectangle)
-QT_END_HEADER
-
#endif // QDECLARATIVERECT_H
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater_p.h b/src/declarative/graphicsitems/qdeclarativerepeater_p.h
index d8772f3e..c9b8ad2b 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater_p.h
+++ b/src/declarative/graphicsitems/qdeclarativerepeater_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeitem.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -105,6 +103,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeRepeater)
-QT_END_HEADER
-
#endif // QDECLARATIVEREPEATER_H
diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h b/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h
index 4a42f4ed..7e408915 100644
--- a/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h
@@ -51,8 +51,6 @@
#include <private/qdeclarativepixmapcache_p.h>
#include <private/qdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -129,6 +127,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeScaleGrid)
-QT_END_HEADER
-
#endif // QDECLARATIVESCALEGRID_H
diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h
index 3bd97a85..5a299ade 100644
--- a/src/declarative/graphicsitems/qdeclarativetext_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetext_p.h
@@ -47,8 +47,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -206,6 +204,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeText)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
index 46818723..a1d5a19b 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
@@ -50,8 +50,6 @@
#include <QtGui/qtextcursor.h>
#include <QtGui/qtextformat.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -300,6 +298,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeTextEdit)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
index 8e782e4a..119a08d7 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
@@ -50,8 +50,6 @@
#ifndef QT_NO_LINEEDIT
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -297,8 +295,6 @@ QML_DECLARE_TYPE(QDoubleValidator)
QML_DECLARE_TYPE(QRegExpValidator)
#endif
-QT_END_HEADER
-
#endif // QT_NO_LINEEDIT
#endif // QDECLARATIVETEXTINPUT_H
diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout_p.h b/src/declarative/graphicsitems/qdeclarativetextlayout_p.h
index 2918d39c..51436aee 100644
--- a/src/declarative/graphicsitems/qdeclarativetextlayout_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextlayout_p.h
@@ -44,8 +44,6 @@
#include <QtGui/qtextlayout.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -70,6 +68,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVETEXTLAYOUT_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativetranslate_p.h b/src/declarative/graphicsitems/qdeclarativetranslate_p.h
index 797c2623..e82e85fb 100644
--- a/src/declarative/graphicsitems/qdeclarativetranslate_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetranslate_p.h
@@ -44,8 +44,6 @@
#include "qdeclarativeitem.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -84,6 +82,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeTranslate)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
index 8bc34635..1b91360e 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -47,8 +47,6 @@
#include <QtCore/qobject.h>
#include <QtCore/qabstractitemmodel.h>
-QT_BEGIN_HEADER
-
Q_DECLARE_METATYPE(QModelIndex)
QT_BEGIN_NAMESPACE
@@ -252,6 +250,4 @@ QML_DECLARE_TYPE(QDeclarativeVisualItemModel)
QML_DECLARE_TYPEINFO(QDeclarativeVisualItemModel, QML_HAS_ATTACHED_PROPERTIES)
QML_DECLARE_TYPE(QDeclarativeVisualDataModel)
-QT_END_HEADER
-
#endif // QDECLARATIVEVISUALDATAMODEL_H
diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h
index 7168d4e4..dd08105e 100644
--- a/src/declarative/qml/qdeclarative.h
+++ b/src/declarative/qml/qdeclarative.h
@@ -49,10 +49,9 @@
#include <QtDeclarative/qdeclarativelist.h>
#include <QtCore/qbytearray.h>
+#include <QtCore/qurl.h>
#include <QtCore/qmetaobject.h>
-QT_BEGIN_HEADER
-
#define QML_DECLARE_TYPE(TYPE) \
Q_DECLARE_METATYPE(TYPE *) \
Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>)
@@ -390,6 +389,19 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor,
return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
+inline int qmlRegisterType(const QUrl &url, const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+{
+ QDeclarativePrivate::RegisterComponent type = {
+ url,
+ uri,
+ qmlName,
+ versionMajor,
+ versionMinor
+ };
+
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::ComponentRegistration, &type);
+}
+
class QDeclarativeContext;
class QDeclarativeEngine;
Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *);
@@ -410,6 +422,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QObject)
Q_DECLARE_METATYPE(QVariant)
-QT_END_HEADER
-
#endif // QDECLARATIVE_H
diff --git a/src/declarative/qml/qdeclarativecompiledbindings_p.h b/src/declarative/qml/qdeclarativecompiledbindings_p.h
index 23249a79..1419742a 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings_p.h
+++ b/src/declarative/qml/qdeclarativecompiledbindings_p.h
@@ -56,8 +56,6 @@
#include "private/qdeclarativeexpression_p.h"
#include "private/qdeclarativebinding_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
struct QDeclarativeBindingCompilerPrivate;
@@ -110,7 +108,5 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEBINDINGOPTIMIZATIONS_P_H
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 69109d12..85ae3ebc 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -438,15 +438,14 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
case QVariant::DateTime:
{
QDateTime dateTime = QDeclarativeStringConverters::dateTimeFromString(string);
-#ifdef Q_CC_GNU
-# warning "QDateTime range has extended in Qt 5, please fix me"
-#endif
- int data[] = { int(dateTime.date().toJulianDay()),
+ // Stuff the qint64 julianDay into an array of int.
+ const qint64 julianDay = dateTime.date().toJulianDay();
+ int data[] = { int(julianDay & 0xFFFFFFFF), int(julianDay >> 32),
dateTime.time().hour(),
dateTime.time().minute(),
dateTime.time().second(),
dateTime.time().msec() };
- int index = output->indexForInt(data, 5);
+ const int index = output->indexForInt(data, 6);
instr.type = QDeclarativeInstruction::StoreDateTime;
instr.storeDateTime.propertyIndex = prop.propertyIndex();
instr.storeDateTime.valueIndex = index;
diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/declarative/qml/qdeclarativecomponent.h
index 9687cd8e..b75da2a1 100644
--- a/src/declarative/qml/qdeclarativecomponent.h
+++ b/src/declarative/qml/qdeclarativecomponent.h
@@ -49,8 +49,6 @@
#include <QtCore/qstring.h>
#include <QtScript/qscriptvalue.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -127,6 +125,4 @@ Q_DECLARE_METATYPE(QDeclarativeComponent::Status)
QML_DECLARE_TYPE(QDeclarativeComponent)
QML_DECLARE_TYPEINFO(QDeclarativeComponent, QML_HAS_ATTACHED_PROPERTIES)
-QT_END_HEADER
-
#endif // QDECLARATIVECOMPONENT_H
diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h
index 3b3cb577..9ed71456 100644
--- a/src/declarative/qml/qdeclarativecontext.h
+++ b/src/declarative/qml/qdeclarativecontext.h
@@ -49,8 +49,6 @@
#include <QtCore/qmetatype.h>
#include <QtCore/qvariant.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -110,6 +108,4 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QList<QObject*>)
-QT_END_HEADER
-
#endif // QDECLARATIVECONTEXT_H
diff --git a/src/declarative/qml/qdeclarativecontextscriptclass_p.h b/src/declarative/qml/qdeclarativecontextscriptclass_p.h
index 1e4ffbf3..0e2d7cf5 100644
--- a/src/declarative/qml/qdeclarativecontextscriptclass_p.h
+++ b/src/declarative/qml/qdeclarativecontextscriptclass_p.h
@@ -96,8 +96,6 @@ private:
QDeclarativeTypeNameCache::Data *lastData;
int lastPropertyIndex;
QScriptValue lastFunction;
-
- uint m_id;
};
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h
index 85f6cc48..415f7889 100644
--- a/src/declarative/qml/qdeclarativecustomparser_p.h
+++ b/src/declarative/qml/qdeclarativecustomparser_p.h
@@ -61,8 +61,6 @@
#include <QtCore/qbytearray.h>
#include <QtCore/qxmlstream.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -162,6 +160,4 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDeclarativeCustomParserProperty)
Q_DECLARE_METATYPE(QDeclarativeCustomParserNode)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/qml/qdeclarativedom_p.h b/src/declarative/qml/qdeclarativedom_p.h
index 5ad35dc7..df1cfdc2 100644
--- a/src/declarative/qml/qdeclarativedom_p.h
+++ b/src/declarative/qml/qdeclarativedom_p.h
@@ -60,8 +60,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -357,6 +355,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDOM_P_H
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index 8302ce5d..e0ec33ec 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -49,8 +49,6 @@
#include <QtDeclarative/qdeclarativeerror.h>
#include <QtDeclarative/qdeclarativedebug.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -125,6 +123,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEENGINE_H
diff --git a/src/declarative/qml/qdeclarativeerror.h b/src/declarative/qml/qdeclarativeerror.h
index ac4fba24..3967f503 100644
--- a/src/declarative/qml/qdeclarativeerror.h
+++ b/src/declarative/qml/qdeclarativeerror.h
@@ -46,8 +46,6 @@
#include <QtCore/qurl.h>
#include <QtCore/qstring.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -82,6 +80,4 @@ QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, const QDeclarativeError &er
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEERROR_H
diff --git a/src/declarative/qml/qdeclarativeexpression.h b/src/declarative/qml/qdeclarativeexpression.h
index 68b67315..728a4ac2 100644
--- a/src/declarative/qml/qdeclarativeexpression.h
+++ b/src/declarative/qml/qdeclarativeexpression.h
@@ -47,8 +47,6 @@
#include <QtCore/qobject.h>
#include <QtCore/qvariant.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -113,7 +111,5 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEEXPRESSION_H
diff --git a/src/declarative/qml/qdeclarativeextensioninterface.h b/src/declarative/qml/qdeclarativeextensioninterface.h
index 0e705f92..8e7f3f0f 100644
--- a/src/declarative/qml/qdeclarativeextensioninterface.h
+++ b/src/declarative/qml/qdeclarativeextensioninterface.h
@@ -45,8 +45,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -66,6 +64,4 @@ Q_DECLARE_INTERFACE(QDeclarativeExtensionInterface, QDeclarativeExtensionInterfa
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEEXTENSIONINTERFACE_H
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.h b/src/declarative/qml/qdeclarativeextensionplugin.h
index 745b2cd4..7ff9c787 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.h
+++ b/src/declarative/qml/qdeclarativeextensionplugin.h
@@ -46,8 +46,6 @@
#include <QtDeclarative/qdeclarativeextensioninterface.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -71,6 +69,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEEXTENSIONPLUGIN_H
diff --git a/src/declarative/qml/qdeclarativefastproperties_p.h b/src/declarative/qml/qdeclarativefastproperties_p.h
index 268dd474..9d3ead0a 100644
--- a/src/declarative/qml/qdeclarativefastproperties_p.h
+++ b/src/declarative/qml/qdeclarativefastproperties_p.h
@@ -45,8 +45,6 @@
#include <QtCore/qvector.h>
#include <QtCore/qhash.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class QObject;
@@ -71,6 +69,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEFASTPROPERTIES_P_H
diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h
index 52b14ffe..11ebd3fd 100644
--- a/src/declarative/qml/qdeclarativeglobal_p.h
+++ b/src/declarative/qml/qdeclarativeglobal_p.h
@@ -45,8 +45,6 @@
#include <QtCore/qglobal.h>
#include <QtCore/QObject>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -105,6 +103,4 @@ inline void QDeclarative_setParent_noEvent(QObject *object, QObject *parent)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEGLOBAL_H
diff --git a/src/declarative/qml/qdeclarativeimageprovider.h b/src/declarative/qml/qdeclarativeimageprovider.h
index eb5b032e..1b6cc333 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.h
+++ b/src/declarative/qml/qdeclarativeimageprovider.h
@@ -46,8 +46,6 @@
#include <QtGui/qimage.h>
#include <QtGui/qpixmap.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -76,6 +74,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEIMAGEPROVIDER
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index 94883abd..caf97b25 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -441,6 +441,13 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
set.insert(prefix,(s=new QDeclarativeImportedNamespace));
}
+ bool appendInstead = false;
+ if (importType == QDeclarativeScriptParser::Import::Implicit) {
+ //Treat same as a File import, but lower precedence
+ appendInstead = true;
+ importType = QDeclarativeScriptParser::Import::File;
+ }
+
QString url = uri;
bool versionFound = false;
if (importType == QDeclarativeScriptParser::Import::Library) {
@@ -511,6 +518,9 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
if (QDeclarativeMetaType::isModule(uri.toUtf8(), vmaj, vmin))
versionFound = true;
+ //Load any type->file mappings registered for this uri
+ qmldircomponents << QDeclarativeMetaType::qmlComponents(uri.toUtf8(), vmaj, vmin);
+
if (!versionFound && qmldircomponents.isEmpty()) {
if (errorString) {
bool anyversion = QDeclarativeMetaType::isModule(uri.toUtf8(), -1, -1);
@@ -588,12 +598,21 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
}
}
- s->uris.prepend(uri);
- s->urls.prepend(url);
- s->majversions.prepend(vmaj);
- s->minversions.prepend(vmin);
- s->isLibrary.prepend(importType == QDeclarativeScriptParser::Import::Library);
- s->qmlDirComponents.prepend(qmldircomponents);
+ if (appendInstead) {
+ s->uris.append(uri);
+ s->urls.append(url);
+ s->majversions.append(vmaj);
+ s->minversions.append(vmin);
+ s->isLibrary.append(importType == QDeclarativeScriptParser::Import::Library);
+ s->qmlDirComponents.append(qmldircomponents);
+ } else {
+ s->uris.prepend(uri);
+ s->urls.prepend(url);
+ s->majversions.prepend(vmaj);
+ s->minversions.prepend(vmin);
+ s->isLibrary.prepend(importType == QDeclarativeScriptParser::Import::Library);
+ s->qmlDirComponents.prepend(qmldircomponents);
+ }
return true;
}
diff --git a/src/declarative/qml/qdeclarativeinfo.h b/src/declarative/qml/qdeclarativeinfo.h
index 8b9622d8..7b23a341 100644
--- a/src/declarative/qml/qdeclarativeinfo.h
+++ b/src/declarative/qml/qdeclarativeinfo.h
@@ -46,8 +46,6 @@
#include <QtCore/qurl.h>
#include <QtDeclarative/qdeclarativeerror.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -99,6 +97,4 @@ Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QList<QDe
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEINFO_H
diff --git a/src/declarative/qml/qdeclarativelist.h b/src/declarative/qml/qdeclarativelist.h
index 9722cefb..9b367dd1 100644
--- a/src/declarative/qml/qdeclarativelist.h
+++ b/src/declarative/qml/qdeclarativelist.h
@@ -46,8 +46,6 @@
#include <QtCore/qlist.h>
#include <QtCore/qvariant.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -147,6 +145,4 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDeclarativeListReference)
-QT_END_HEADER
-
#endif // QDECLARATIVELIST_H
diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp
index 1d143963..d90ccad8 100644
--- a/src/declarative/qml/qdeclarativemetatype.cpp
+++ b/src/declarative/qml/qdeclarativemetatype.cpp
@@ -54,6 +54,8 @@
#include <QtCore/qmetaobject.h>
#include <QtCore/qbitarray.h>
#include <QtCore/qreadwritelock.h>
+#include <qfileinfo.h>
+#include <qdir.h>
#include <qmetatype.h>
#include <qobjectdefs.h>
#include <qdatetime.h>
@@ -122,6 +124,15 @@ struct QDeclarativeMetaTypeData
Q_GLOBAL_STATIC(QDeclarativeMetaTypeData, metaTypeData)
Q_GLOBAL_STATIC(QReadWriteLock, metaTypeDataLock)
+struct QDeclarativeRegisteredComponentData
+{
+ ~QDeclarativeRegisteredComponentData() {} ;
+ QMap<QByteArray, QDeclarativeDirComponents*> registeredComponents;
+};
+
+Q_GLOBAL_STATIC(QDeclarativeRegisteredComponentData, registeredComponentData)
+Q_GLOBAL_STATIC(QReadWriteLock, registeredComponentDataLock)
+
QDeclarativeMetaTypeData::~QDeclarativeMetaTypeData()
{
for (int i = 0; i < types.count(); ++i)
@@ -667,6 +678,45 @@ int registerType(const QDeclarativePrivate::RegisterType &type)
return index;
}
+int registerComponent(const QDeclarativePrivate::RegisterComponent& data)
+{
+ if (data.typeName) {
+ for (int ii = 0; data.typeName[ii]; ++ii) {
+ if (!isalnum(data.typeName[ii])) {
+ qWarning("qmlRegisterType(): Invalid QML type name \"%s\"", data.typeName);
+ return 0;
+ }
+ }
+ } else {
+ qWarning("qmlRegisterType(): No QML type name for \"%s\"", data.url.toString().toLatin1().constData());
+ return 0;
+ }
+
+ QWriteLocker lock(registeredComponentDataLock());
+ QString path;
+ // Relative paths are relative to application working directory
+ if (data.url.isRelative() || data.url.scheme() == QLatin1String("file")) // Workaround QTBUG-11929
+ path = QUrl::fromLocalFile(QDir::currentPath()+QLatin1String("/")).resolved(data.url).toString();
+ else
+ path = data.url.toString();
+ QDeclarativeRegisteredComponentData *d = registeredComponentData();
+ QDeclarativeDirParser::Component comp(
+ QString::fromUtf8(data.typeName),
+ path,
+ data.majorVersion,
+ data.minorVersion
+ );
+
+ QDeclarativeDirComponents* comps = d->registeredComponents.value(QByteArray(data.uri), 0);
+ if (!comps)
+ d->registeredComponents.insert(QByteArray(data.uri), comps = new QDeclarativeDirComponents);
+
+ // Types added later should take precedence, like registerType
+ comps->prepend(comp);
+
+ return 1;
+}
+
/*
This method is "over generalized" to allow us to (potentially) register more types of things in
the future without adding exported symbols.
@@ -679,6 +729,8 @@ int QDeclarativePrivate::qmlregister(RegistrationType type, void *data)
return registerInterface(*reinterpret_cast<RegisterInterface *>(data));
} else if (type == AutoParentRegistration) {
return registerAutoParentFunction(*reinterpret_cast<RegisterAutoParent *>(data));
+ } else if (type == ComponentRegistration) {
+ return registerComponent(*reinterpret_cast<RegisterComponent *>(data));
}
return -1;
}
@@ -984,6 +1036,29 @@ QDeclarativeType *QDeclarativeMetaType::qmlType(int userType)
}
/*!
+ Returns the component(s) that have been registered for the module specified by \a uri and the version specified
+ by \a version_major and \a version_minor. Returns an empty list if no such components were registered.
+*/
+QDeclarativeDirComponents QDeclarativeMetaType::qmlComponents(const QByteArray &module, int version_major, int version_minor)
+{
+ QReadLocker lock(registeredComponentDataLock());
+ QDeclarativeRegisteredComponentData *data = registeredComponentData();
+
+ QDeclarativeDirComponents* comps = data->registeredComponents.value(module, 0);
+ if (!comps)
+ return QDeclarativeDirComponents();
+ QDeclarativeDirComponents ret = *comps;
+ for (int i = ret.count() - 1; i >= 0; i--) {
+ QDeclarativeDirParser::Component &c = ret[i];
+ if (version_major >= 0 && (c.majorVersion != version_major || c.minorVersion > version_minor))
+ ret.removeAt(i);
+ }
+
+ return ret;
+}
+
+
+/*!
Returns the list of registered QML type names.
*/
QList<QByteArray> QDeclarativeMetaType::qmlTypeNames()
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
index b8c958c3..2ba391a0 100644
--- a/src/declarative/qml/qdeclarativemetatype_p.h
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -59,6 +59,7 @@
#include <QtCore/qvariant.h>
#include <QtCore/qbitarray.h>
#include <private/qtdeclarativeglobal_p.h>
+#include <private/qdeclarativedirparser_p.h>
QT_BEGIN_NAMESPACE
@@ -80,6 +81,8 @@ public:
static QDeclarativeType *qmlType(const QMetaObject *metaObject, const QByteArray &module, int version_major, int version_minor);
static QDeclarativeType *qmlType(int);
+ static QDeclarativeDirComponents qmlComponents(const QByteArray& module, int version_major, int version_minor); //### Is this the right place?
+
static QMetaProperty defaultProperty(const QMetaObject *);
static QMetaProperty defaultProperty(QObject *);
static QMetaMethod defaultMethod(const QMetaObject *);
@@ -161,6 +164,7 @@ private:
friend struct QDeclarativeMetaTypeData;
friend int registerType(const QDeclarativePrivate::RegisterType &);
friend int registerInterface(const QDeclarativePrivate::RegisterInterface &);
+ friend int registerComponent(const QDeclarativePrivate::RegisterComponent &);
QDeclarativeType(int, const QDeclarativePrivate::RegisterInterface &);
QDeclarativeType(int, const QDeclarativePrivate::RegisterType &);
~QDeclarativeType();
diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h
index 22824b23..e791825c 100644
--- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h
+++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h
@@ -45,8 +45,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -62,6 +60,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVENETWORKACCESSMANAGERFACTORY_H
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
index 42c45210..7a968f1c 100644
--- a/src/declarative/qml/qdeclarativeparser_p.h
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -65,8 +65,6 @@
#include <private/qdeclarativerefcount_p.h>
#include <private/qdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -376,6 +374,4 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDeclarativeParser::Variant)
-QT_END_HEADER
-
#endif // QDECLARATIVEPARSER_P_H
diff --git a/src/declarative/qml/qdeclarativeparserstatus.h b/src/declarative/qml/qdeclarativeparserstatus.h
index d2c809db..68a526fb 100644
--- a/src/declarative/qml/qdeclarativeparserstatus.h
+++ b/src/declarative/qml/qdeclarativeparserstatus.h
@@ -45,8 +45,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -74,6 +72,4 @@ Q_DECLARE_INTERFACE(QDeclarativeParserStatus, QDeclarativeParserStatus_iid)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEPARSERSTATUS_H
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
index ab9fe415..05a457c3 100644
--- a/src/declarative/qml/qdeclarativeprivate.h
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -56,8 +56,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
#include <QtCore/qvariant.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -233,10 +231,19 @@ namespace QDeclarativePrivate
AutoParentFunction function;
};
+ struct RegisterComponent {
+ const QUrl &url;
+ const char *uri;
+ const char *typeName;
+ int majorVersion;
+ int minorVersion;
+ };
+
enum RegistrationType {
TypeRegistration = 0,
InterfaceRegistration = 1,
- AutoParentRegistration = 2
+ AutoParentRegistration = 2,
+ ComponentRegistration = 3
};
int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *);
@@ -244,6 +251,4 @@ namespace QDeclarativePrivate
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEPRIVATE_H
diff --git a/src/declarative/qml/qdeclarativeproperty.h b/src/declarative/qml/qdeclarativeproperty.h
index 7e8cbcf8..a6ae48d5 100644
--- a/src/declarative/qml/qdeclarativeproperty.h
+++ b/src/declarative/qml/qdeclarativeproperty.h
@@ -45,8 +45,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
#include <QtCore/qmetaobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -139,6 +137,4 @@ inline uint qHash (const QDeclarativeProperty &key)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEPROPERTY_H
diff --git a/src/declarative/qml/qdeclarativepropertyvalueinterceptor.h b/src/declarative/qml/qdeclarativepropertyvalueinterceptor.h
index 71050211..f0a0a717 100644
--- a/src/declarative/qml/qdeclarativepropertyvalueinterceptor.h
+++ b/src/declarative/qml/qdeclarativepropertyvalueinterceptor.h
@@ -45,8 +45,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -67,6 +65,4 @@ Q_DECLARE_INTERFACE(QDeclarativePropertyValueInterceptor, QDeclarativePropertyVa
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEPROPERTYVALUEINTERCEPTOR_H
diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.h b/src/declarative/qml/qdeclarativepropertyvaluesource.h
index fced27ec..e072fbd0 100644
--- a/src/declarative/qml/qdeclarativepropertyvaluesource.h
+++ b/src/declarative/qml/qdeclarativepropertyvaluesource.h
@@ -45,8 +45,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -66,6 +64,4 @@ Q_DECLARE_INTERFACE(QDeclarativePropertyValueSource, QDeclarativePropertyValueSo
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEPROPERTYVALUESOURCE_H
diff --git a/src/declarative/qml/qdeclarativeproxymetaobject_p.h b/src/declarative/qml/qdeclarativeproxymetaobject_p.h
index 2178a939..6bfe1991 100644
--- a/src/declarative/qml/qdeclarativeproxymetaobject_p.h
+++ b/src/declarative/qml/qdeclarativeproxymetaobject_p.h
@@ -61,8 +61,6 @@
#include <private/qobject_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -94,7 +92,5 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEPROXYMETAOBJECT_P_H
diff --git a/src/declarative/qml/qdeclarativerefcount_p.h b/src/declarative/qml/qdeclarativerefcount_p.h
index 3c2780ee..ac847c6e 100644
--- a/src/declarative/qml/qdeclarativerefcount_p.h
+++ b/src/declarative/qml/qdeclarativerefcount_p.h
@@ -55,8 +55,6 @@
#include <QtDeclarative/qtdeclarativeglobal.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -75,6 +73,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEREFCOUNT_P_H
diff --git a/src/declarative/qml/qdeclarativescriptparser_p.h b/src/declarative/qml/qdeclarativescriptparser_p.h
index 831e1a40..42a29752 100644
--- a/src/declarative/qml/qdeclarativescriptparser_p.h
+++ b/src/declarative/qml/qdeclarativescriptparser_p.h
@@ -58,8 +58,6 @@
#include <QtCore/QList>
#include <QtCore/QUrl>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -75,7 +73,7 @@ public:
public:
Import() : type(Library) {}
- enum Type { Library, File, Script };
+ enum Type { Library, File, Script, Implicit }; //Implicit is only used internally
Type type;
QString uri;
@@ -143,6 +141,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVESCRIPTPARSER_P_H
diff --git a/src/declarative/qml/qdeclarativescriptstring.h b/src/declarative/qml/qdeclarativescriptstring.h
index f84bb980..0bb58093 100644
--- a/src/declarative/qml/qdeclarativescriptstring.h
+++ b/src/declarative/qml/qdeclarativescriptstring.h
@@ -47,8 +47,6 @@
#include <QtCore/qshareddata.h>
#include <QtCore/qmetatype.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -82,7 +80,5 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDeclarativeScriptString)
-QT_END_HEADER
-
#endif // QDECLARATIVESCRIPTSTRING_H
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index ee73b738..42847ea9 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -1055,19 +1055,6 @@ void QDeclarativeTypeData::resolveTypes()
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(m_typeLoader->engine());
QDeclarativeImportDatabase *importDatabase = &ep->importDatabase;
- // For local urls, add an implicit import "." as first (most overridden) lookup.
- // This will also trigger the loading of the qmldir and the import of any native
- // types from available plugins.
- if (QDeclarativeQmldirData *qmldir = qmldirForUrl(finalUrl().resolved(QUrl(QLatin1String("./qmldir"))))) {
- m_imports.addImport(importDatabase, QLatin1String("."),
- QString(), -1, -1, QDeclarativeScriptParser::Import::File,
- qmldir->dirComponents(), 0);
- } else {
- m_imports.addImport(importDatabase, QLatin1String("."),
- QString(), -1, -1, QDeclarativeScriptParser::Import::File,
- QDeclarativeDirComponents(), 0);
- }
-
foreach (const QDeclarativeScriptParser::Import &import, scriptParser.imports()) {
QDeclarativeDirComponents qmldircomponentsnetwork;
if (import.type == QDeclarativeScriptParser::Import::Script)
@@ -1107,6 +1094,7 @@ void QDeclarativeTypeData::resolveTypes()
}
}
+ bool implicitImportLoaded = false;
foreach (QDeclarativeScriptParser::TypeReference *parserRef, scriptParser.referencedTypes()) {
QByteArray typeName = parserRef->name.toUtf8();
@@ -1123,23 +1111,49 @@ void QDeclarativeTypeData::resolveTypes()
// Known to not be a type:
// - known to be a namespace (Namespace {})
// - type with unknown namespace (UnknownNamespace.SomeType {})
- QDeclarativeError error;
- error.setUrl(m_imports.baseUrl());
- QString userTypeName = parserRef->name;
- userTypeName.replace(QLatin1Char('/'),QLatin1Char('.'));
- if (typeNamespace)
- error.setDescription(QDeclarativeTypeLoader::tr("Namespace %1 cannot be used as a type").arg(userTypeName));
- else
- error.setDescription(QDeclarativeTypeLoader::tr("%1 %2").arg(userTypeName).arg(errorString));
-
- if (!parserRef->refObjects.isEmpty()) {
- QDeclarativeParser::Object *obj = parserRef->refObjects.first();
- error.setLine(obj->location.start.line);
- error.setColumn(obj->location.start.column);
+ bool typeFound = false;
+
+ if (!typeNamespace && !implicitImportLoaded) {
+ implicitImportLoaded = true;
+ // For local urls, add an implicit import "." as most overridden lookup.
+ // This will also trigger the loading of the qmldir and the import of any native
+ // types from available plugins.
+ // This is only done if the type is not otherwise found, side effects of plugin loading may be avoided
+ // ### This should be an acceptable variation because A) It's only side effects (and img providers) B) You shouldn't be doing that in "." anyways!
+ if (QDeclarativeQmldirData *qmldir = qmldirForUrl(finalUrl().resolved(QUrl(QLatin1String("./qmldir"))))) {
+ m_imports.addImport(importDatabase, QLatin1String("."),
+ QString(), -1, -1, QDeclarativeScriptParser::Import::Implicit,
+ qmldir->dirComponents(), 0);
+ } else {
+ m_imports.addImport(importDatabase, QLatin1String("."),
+ QString(), -1, -1, QDeclarativeScriptParser::Import::Implicit,
+ QDeclarativeDirComponents(), 0);
+ }
+ if (m_imports.resolveType(typeName, &ref.type, &url, &majorVersion, &minorVersion,
+ &typeNamespace, &errorString) || typeNamespace) {
+ typeFound = true;
+ }
+ }
+
+ if (!typeFound) {
+ QDeclarativeError error;
+ error.setUrl(m_imports.baseUrl());
+ QString userTypeName = parserRef->name;
+ userTypeName.replace(QLatin1Char('/'),QLatin1Char('.'));
+ if (typeNamespace)
+ error.setDescription(QDeclarativeTypeLoader::tr("Namespace %1 cannot be used as a type").arg(userTypeName));
+ else
+ error.setDescription(QDeclarativeTypeLoader::tr("%1 %2").arg(userTypeName).arg(errorString));
+
+ if (!parserRef->refObjects.isEmpty()) {
+ QDeclarativeParser::Object *obj = parserRef->refObjects.first();
+ error.setLine(obj->location.start.line);
+ error.setColumn(obj->location.start.column);
+ }
+
+ setError(error);
+ return;
}
-
- setError(error);
- return;
}
if (ref.type) {
diff --git a/src/declarative/qml/qdeclarativetypenotavailable_p.h b/src/declarative/qml/qdeclarativetypenotavailable_p.h
index 7a6b46fc..c16231cb 100644
--- a/src/declarative/qml/qdeclarativetypenotavailable_p.h
+++ b/src/declarative/qml/qdeclarativetypenotavailable_p.h
@@ -44,8 +44,6 @@
#include <qdeclarative.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -60,6 +58,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeTypeNotAvailable)
-QT_END_HEADER
-
#endif // QDECLARATIVETYPENOTAVAILABLE_H
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index f3adbe76..c4be742c 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -534,12 +534,13 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEObjectStack &stack,
QObject *target = stack.top();
CLEAN_PROPERTY(target, instr.storeDateTime.propertyIndex);
- QTime t;
- t.setHMS(intData.at(instr.storeDateTime.valueIndex+1),
- intData.at(instr.storeDateTime.valueIndex+2),
- intData.at(instr.storeDateTime.valueIndex+3),
- intData.at(instr.storeDateTime.valueIndex+4));
- QDateTime dt(QDate::fromJulianDay(intData.at(instr.storeDateTime.valueIndex)), t);
+ const qint64 julianDay = qint64((quint64)(uint)(intData.at(instr.storeDateTime.valueIndex)))
+ + (qint64(intData.at(instr.storeDateTime.valueIndex + 1)) << 32);
+ QDateTime dt(QDate::fromJulianDay(julianDay),
+ QTime(intData.at(instr.storeDateTime.valueIndex + 2),
+ intData.at(instr.storeDateTime.valueIndex + 3),
+ intData.at(instr.storeDateTime.valueIndex + 4),
+ intData.at(instr.storeDateTime.valueIndex + 5)));
void *a[] = { &dt, 0, &status, &flags };
QMetaObject::metacall(target, QMetaObject::WriteProperty,
instr.storeDateTime.propertyIndex, a);
diff --git a/src/declarative/qml/qdeclarativeworkerscript_p.h b/src/declarative/qml/qdeclarativeworkerscript_p.h
index 1581fe57..ee271279 100644
--- a/src/declarative/qml/qdeclarativeworkerscript_p.h
+++ b/src/declarative/qml/qdeclarativeworkerscript_p.h
@@ -60,8 +60,6 @@
#include <QtScript/qscriptvalue.h>
#include <QtCore/qurl.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -124,6 +122,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeWorkerScript)
-QT_END_HEADER
-
#endif // QDECLARATIVEWORKERSCRIPT_P_H
diff --git a/src/declarative/qml/rewriter/textwriter_p.h b/src/declarative/qml/rewriter/textwriter_p.h
index 8a1dfdc8..38b81f6a 100644
--- a/src/declarative/qml/rewriter/textwriter_p.h
+++ b/src/declarative/qml/rewriter/textwriter_p.h
@@ -48,7 +48,6 @@
#include <QtCore/QList>
#include <QtGui/QTextCursor>
-QT_BEGIN_HEADER
QT_QML_BEGIN_NAMESPACE
namespace QDeclarativeJS {
@@ -96,6 +95,5 @@ public:
} // end of namespace QDeclarativeJS
QT_QML_END_NAMESPACE
-QT_END_HEADER
#endif // TEXTWRITER_H
diff --git a/src/declarative/qtdeclarativeglobal.h b/src/declarative/qtdeclarativeglobal.h
index dcfe3bea..e3237ba4 100644
--- a/src/declarative/qtdeclarativeglobal.h
+++ b/src/declarative/qtdeclarativeglobal.h
@@ -44,8 +44,6 @@
#include <QtCore/qglobal.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
// This definition is in the process of being removed from qtbase - once it
@@ -66,6 +64,4 @@ QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QTDECLARATIVEGLOBAL_H
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index 478e30b3..ee301c74 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -55,8 +55,6 @@
#include <QtCore/QAbstractAnimation>
#include <QtGui/qcolor.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -534,6 +532,4 @@ QML_DECLARE_TYPE(QDeclarativeRotationAnimation)
QML_DECLARE_TYPE(QDeclarativeParentAnimation)
QML_DECLARE_TYPE(QDeclarativeAnchorAnimation)
-QT_END_HEADER
-
#endif // QDECLARATIVEANIMATION_H
diff --git a/src/declarative/util/qdeclarativeapplication_p.h b/src/declarative/util/qdeclarativeapplication_p.h
index f8fdc95e..115413e2 100644
--- a/src/declarative/util/qdeclarativeapplication_p.h
+++ b/src/declarative/util/qdeclarativeapplication_p.h
@@ -46,8 +46,6 @@
#include <qdeclarative.h>
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -81,6 +79,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeApplication)
-QT_END_HEADER
-
#endif // QDECLARATIVEAPPLICATION_P_H
diff --git a/src/declarative/util/qdeclarativebehavior_p.h b/src/declarative/util/qdeclarativebehavior_p.h
index 06c09603..7a26d4a9 100644
--- a/src/declarative/util/qdeclarativebehavior_p.h
+++ b/src/declarative/util/qdeclarativebehavior_p.h
@@ -49,8 +49,6 @@
#include <qdeclarative.h>
#include <QtCore/QAbstractAnimation>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -93,6 +91,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeBehavior)
-QT_END_HEADER
-
#endif // QDECLARATIVEBEHAVIOR_H
diff --git a/src/declarative/util/qdeclarativebind_p.h b/src/declarative/util/qdeclarativebind_p.h
index d0ef54eb..0e4350ec 100644
--- a/src/declarative/util/qdeclarativebind_p.h
+++ b/src/declarative/util/qdeclarativebind_p.h
@@ -46,8 +46,6 @@
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -91,6 +89,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeBind)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/util/qdeclarativeconnections_p.h b/src/declarative/util/qdeclarativeconnections_p.h
index 60be24a4..7c06d4a5 100644
--- a/src/declarative/util/qdeclarativeconnections_p.h
+++ b/src/declarative/util/qdeclarativeconnections_p.h
@@ -49,8 +49,6 @@
#include <QtCore/qobject.h>
#include <QtCore/qstring.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -98,6 +96,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeConnections)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/util/qdeclarativefontloader_p.h b/src/declarative/util/qdeclarativefontloader_p.h
index aa7dcabb..06860980 100644
--- a/src/declarative/util/qdeclarativefontloader_p.h
+++ b/src/declarative/util/qdeclarativefontloader_p.h
@@ -47,8 +47,6 @@
#include <QtCore/qobject.h>
#include <QtCore/qurl.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -91,7 +89,5 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeFontLoader)
-QT_END_HEADER
-
#endif // QDECLARATIVEFONTLOADER_H
diff --git a/src/declarative/util/qdeclarativelistaccessor_p.h b/src/declarative/util/qdeclarativelistaccessor_p.h
index 94f49150..cb7bbf3f 100644
--- a/src/declarative/util/qdeclarativelistaccessor_p.h
+++ b/src/declarative/util/qdeclarativelistaccessor_p.h
@@ -44,8 +44,6 @@
#include <QtCore/QVariant>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -75,6 +73,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVELISTACCESSOR_H
diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h
index 567ac1fc..e4fa2eea 100644
--- a/src/declarative/util/qdeclarativelistmodel_p.h
+++ b/src/declarative/util/qdeclarativelistmodel_p.h
@@ -53,8 +53,6 @@
#include <private/qlistmodelinterface_p.h>
#include <QtScript/qscriptvalue.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -153,6 +151,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeListModel)
QML_DECLARE_TYPE(QDeclarativeListElement)
-QT_END_HEADER
-
#endif // QDECLARATIVELISTMODEL_H
diff --git a/src/declarative/util/qdeclarativelistmodel_p_p.h b/src/declarative/util/qdeclarativelistmodel_p_p.h
index 8beb5fa8..5b204a9a 100644
--- a/src/declarative/util/qdeclarativelistmodel_p_p.h
+++ b/src/declarative/util/qdeclarativelistmodel_p_p.h
@@ -60,8 +60,6 @@
#include <private/qscriptdeclarativeclass_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -275,7 +273,5 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(ModelNode *)
-QT_END_HEADER
-
#endif // QDECLARATIVELISTMODEL_P_P_H
diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h
index a12897c9..b076a855 100644
--- a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h
+++ b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h
@@ -60,8 +60,6 @@
#include <QMutex>
#include <QWaitCondition>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -157,7 +155,5 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDeclarativeListModelWorkerAgent::VariantRef)
-QT_END_HEADER
-
#endif // QDECLARATIVEWORKERSCRIPT_P_H
diff --git a/src/declarative/util/qdeclarativeopenmetaobject_p.h b/src/declarative/util/qdeclarativeopenmetaobject_p.h
index 9ff064b2..e637e53c 100644
--- a/src/declarative/util/qdeclarativeopenmetaobject_p.h
+++ b/src/declarative/util/qdeclarativeopenmetaobject_p.h
@@ -49,8 +49,6 @@
#include <private/qdeclarativerefcount_p.h>
#include <private/qobject_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -124,6 +122,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEOPENMETAOBJECT_H
diff --git a/src/declarative/util/qdeclarativepackage_p.h b/src/declarative/util/qdeclarativepackage_p.h
index 4a418799..fad2ed08 100644
--- a/src/declarative/util/qdeclarativepackage_p.h
+++ b/src/declarative/util/qdeclarativepackage_p.h
@@ -44,8 +44,6 @@
#include <qdeclarative.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -93,6 +91,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativePackage)
QML_DECLARE_TYPEINFO(QDeclarativePackage, QML_HAS_ATTACHED_PROPERTIES)
-QT_END_HEADER
-
#endif // QDECLARATIVEPACKAGE_H
diff --git a/src/declarative/util/qdeclarativepixmapcache_p.h b/src/declarative/util/qdeclarativepixmapcache_p.h
index 0d1ca5f7..e2f99fbf 100644
--- a/src/declarative/util/qdeclarativepixmapcache_p.h
+++ b/src/declarative/util/qdeclarativepixmapcache_p.h
@@ -49,8 +49,6 @@
#include <QtGui/qpixmap.h>
#include <QtCore/qurl.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -121,6 +119,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePixmap::Options)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEPIXMAPCACHE_H
diff --git a/src/declarative/util/qdeclarativepropertychanges_p.h b/src/declarative/util/qdeclarativepropertychanges_p.h
index f6e36f41..fc7295bd 100644
--- a/src/declarative/util/qdeclarativepropertychanges_p.h
+++ b/src/declarative/util/qdeclarativepropertychanges_p.h
@@ -45,8 +45,6 @@
#include "private/qdeclarativestateoperations_p.h"
#include <private/qdeclarativecustomparser_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -107,6 +105,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativePropertyChanges)
-QT_END_HEADER
-
#endif // QDECLARATIVEPROPERTYCHANGES_H
diff --git a/src/declarative/util/qdeclarativepropertymap.h b/src/declarative/util/qdeclarativepropertymap.h
index e817e278..aaf38295 100644
--- a/src/declarative/util/qdeclarativepropertymap.h
+++ b/src/declarative/util/qdeclarativepropertymap.h
@@ -48,8 +48,6 @@
#include <QtCore/QStringList>
#include <QtCore/QVariant>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -86,6 +84,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/util/qdeclarativesmoothedanimation_p.h b/src/declarative/util/qdeclarativesmoothedanimation_p.h
index ae272c0b..173df791 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation_p.h
+++ b/src/declarative/util/qdeclarativesmoothedanimation_p.h
@@ -47,8 +47,6 @@
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -98,6 +96,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeSmoothedAnimation)
-QT_END_HEADER
-
#endif // QDECLARATIVESMOOTHEDANIMATION_H
diff --git a/src/declarative/util/qdeclarativespringanimation_p.h b/src/declarative/util/qdeclarativespringanimation_p.h
index 423d5322..b55d8dca 100644
--- a/src/declarative/util/qdeclarativespringanimation_p.h
+++ b/src/declarative/util/qdeclarativespringanimation_p.h
@@ -47,8 +47,6 @@
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -106,6 +104,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeSpringAnimation)
-QT_END_HEADER
-
#endif // QDECLARATIVESPRINGANIMATION_H
diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h
index 049397e5..ee3c8bf8 100644
--- a/src/declarative/util/qdeclarativestate_p.h
+++ b/src/declarative/util/qdeclarativestate_p.h
@@ -48,8 +48,6 @@
#include <QtCore/qsharedpointer.h>
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -205,6 +203,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeStateOperation)
QML_DECLARE_TYPE(QDeclarativeState)
-QT_END_HEADER
-
#endif // QDECLARATIVESTATE_H
diff --git a/src/declarative/util/qdeclarativestategroup_p.h b/src/declarative/util/qdeclarativestategroup_p.h
index 2a0fa87c..c5a1a75f 100644
--- a/src/declarative/util/qdeclarativestategroup_p.h
+++ b/src/declarative/util/qdeclarativestategroup_p.h
@@ -44,8 +44,6 @@
#include "private/qdeclarativestate_p.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -90,6 +88,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeStateGroup)
-QT_END_HEADER
-
#endif // QDECLARATIVESTATEGROUP_H
diff --git a/src/declarative/util/qdeclarativestateoperations_p.h b/src/declarative/util/qdeclarativestateoperations_p.h
index 6cf28416..01b3e1d8 100644
--- a/src/declarative/util/qdeclarativestateoperations_p.h
+++ b/src/declarative/util/qdeclarativestateoperations_p.h
@@ -48,8 +48,6 @@
#include <private/qdeclarativeanchors_p.h>
#include <qdeclarativescriptstring.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -294,6 +292,4 @@ QML_DECLARE_TYPE(QDeclarativeStateChangeScript)
QML_DECLARE_TYPE(QDeclarativeAnchorSet)
QML_DECLARE_TYPE(QDeclarativeAnchorChanges)
-QT_END_HEADER
-
#endif // QDECLARATIVESTATEOPERATIONS_H
diff --git a/src/declarative/util/qdeclarativesystempalette_p.h b/src/declarative/util/qdeclarativesystempalette_p.h
index 5a8561ed..306cadab 100644
--- a/src/declarative/util/qdeclarativesystempalette_p.h
+++ b/src/declarative/util/qdeclarativesystempalette_p.h
@@ -47,8 +47,6 @@
#include <QtCore/qobject.h>
#include <QPalette>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -117,6 +115,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeSystemPalette)
-QT_END_HEADER
-
#endif // QDECLARATIVESYSTEMPALETTE_H
diff --git a/src/declarative/util/qdeclarativetimer_p.h b/src/declarative/util/qdeclarativetimer_p.h
index 805ac348..a6730bcc 100644
--- a/src/declarative/util/qdeclarativetimer_p.h
+++ b/src/declarative/util/qdeclarativetimer_p.h
@@ -49,8 +49,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -110,6 +108,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeTimer)
-QT_END_HEADER
-
#endif
diff --git a/src/declarative/util/qdeclarativetransition_p.h b/src/declarative/util/qdeclarativetransition_p.h
index 961790e5..b704e654 100644
--- a/src/declarative/util/qdeclarativetransition_p.h
+++ b/src/declarative/util/qdeclarativetransition_p.h
@@ -48,8 +48,6 @@
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -101,6 +99,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeTransition)
-QT_END_HEADER
-
#endif // QDECLARATIVETRANSITION_H
diff --git a/src/declarative/util/qdeclarativeutilmodule_p.h b/src/declarative/util/qdeclarativeutilmodule_p.h
index 6ba28400..05fae76e 100644
--- a/src/declarative/util/qdeclarativeutilmodule_p.h
+++ b/src/declarative/util/qdeclarativeutilmodule_p.h
@@ -44,8 +44,6 @@
#include <qdeclarative.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -59,6 +57,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEUTILMODULE_H
diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h
index 7345f2d9..fd72b850 100644
--- a/src/declarative/util/qdeclarativeview.h
+++ b/src/declarative/util/qdeclarativeview.h
@@ -49,8 +49,6 @@
#include <QtWidgets/qwidget.h>
#include <QtDeclarative/qdeclarativedebug.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -114,6 +112,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEVIEW_H
diff --git a/src/declarative/util/qdeclarativexmllistmodel_p.h b/src/declarative/util/qdeclarativexmllistmodel_p.h
index 5f839ac6..2bcc4a79 100644
--- a/src/declarative/util/qdeclarativexmllistmodel_p.h
+++ b/src/declarative/util/qdeclarativexmllistmodel_p.h
@@ -51,8 +51,6 @@
#include <private/qlistmodelinterface_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -208,6 +206,4 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeXmlListModel)
QML_DECLARE_TYPE(QDeclarativeXmlListModelRole)
-QT_END_HEADER
-
#endif // QDECLARATIVEXMLLISTMODEL_H
diff --git a/src/declarative/util/qlistmodelinterface_p.h b/src/declarative/util/qlistmodelinterface_p.h
index a9d079b9..b485c5fe 100644
--- a/src/declarative/util/qlistmodelinterface_p.h
+++ b/src/declarative/util/qlistmodelinterface_p.h
@@ -47,8 +47,6 @@
#include <private/qtdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -80,5 +78,4 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QListModelInterface : public QObject
QT_END_NAMESPACE
-QT_END_HEADER
#endif //QTREEMODELINTERFACE_H
diff --git a/src/doc/src/declarative/qtdeclarative.qdoc b/src/doc/src/declarative/qtdeclarative.qdoc
index 62629665..69b15821 100644
--- a/src/doc/src/declarative/qtdeclarative.qdoc
+++ b/src/doc/src/declarative/qtdeclarative.qdoc
@@ -211,3 +211,18 @@
Returns the QML type id.
*/
+
+/*!
+ \fn int qmlRegisterType(const char *url, const char *uri, int versionMajor, int versionMinor, const char *qmlName);
+ \relates QDeclarativeEngine
+
+ This function registers a type in the QML system with the name \a qmlName, in the library imported from \a uri having the
+ version number composed from \a versionMajor and \a versionMinor. The type is defined by the QML file located at \a url.
+
+ Normally QML files can be loaded as types directly from other QML files, or using a qmldir file. This function allows
+ registration of files to types from a C++ module, such as when the type mapping needs to be procedurally determined at startup.
+
+ #include <QtDeclarative> to use this function.
+
+ Returns non-zero if the registration was sucessful.
+*/
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
index d50bba9d..68dc25d2 100644
--- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
@@ -49,8 +49,6 @@
#ifndef QT_NO_DIRMODEL
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -153,8 +151,6 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeFolderListModel)
//![qml decl]
-QT_END_HEADER
-
#endif // QT_NO_DIRMODEL
#endif // QDECLARATIVEFOLDERLISTMODEL_H
diff --git a/src/imports/gestures/qdeclarativegesturearea_p.h b/src/imports/gestures/qdeclarativegesturearea_p.h
index 7a2d39e7..68f42641 100644
--- a/src/imports/gestures/qdeclarativegesturearea_p.h
+++ b/src/imports/gestures/qdeclarativegesturearea_p.h
@@ -52,8 +52,6 @@
#ifndef QT_NO_GESTURES
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -97,8 +95,6 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QDeclarativeGestureArea)
-QT_END_HEADER
-
#endif // QT_NO_GESTURES
#endif
diff --git a/src/imports/particles/qdeclarativeparticles_p.h b/src/imports/particles/qdeclarativeparticles_p.h
index 9031589e..dad3f142 100644
--- a/src/imports/particles/qdeclarativeparticles_p.h
+++ b/src/imports/particles/qdeclarativeparticles_p.h
@@ -44,8 +44,6 @@
#include <QtDeclarative/qdeclarativeitem.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
@@ -253,6 +251,4 @@ QML_DECLARE_TYPE(QDeclarativeParticleMotionGravity)
QML_DECLARE_TYPE(QDeclarativeParticleMotionWander)
QML_DECLARE_TYPE(QDeclarativeParticles)
-QT_END_HEADER
-
#endif
diff --git a/src/imports/shaders/scenegraph/qsggeometry.h b/src/imports/shaders/scenegraph/qsggeometry.h
index 2ec3cb9d..eca48c69 100644
--- a/src/imports/shaders/scenegraph/qsggeometry.h
+++ b/src/imports/shaders/scenegraph/qsggeometry.h
@@ -44,8 +44,6 @@
#include <QtOpenGL/qgl.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class QSGGeometry
@@ -229,6 +227,4 @@ inline const QSGGeometry::ColoredPoint2D *QSGGeometry::vertexDataAsColoredPoint2
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSGGEOMETRY_H
diff --git a/src/imports/shaders/shadereffect.h b/src/imports/shaders/shadereffect.h
index 1fc45de6..3bc1bd1f 100644
--- a/src/imports/shaders/shadereffect.h
+++ b/src/imports/shaders/shadereffect.h
@@ -44,8 +44,6 @@
#include <QGraphicsEffect>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class ShaderEffectSource;
@@ -74,8 +72,6 @@ public:
bool m_changed : 1;
};
-QT_END_HEADER
-
QT_END_NAMESPACE
#endif // SHADEREFFECT_H
diff --git a/src/imports/shaders/shadereffectbuffer.h b/src/imports/shaders/shadereffectbuffer.h
index 8674ff7b..569d1ab2 100644
--- a/src/imports/shaders/shadereffectbuffer.h
+++ b/src/imports/shaders/shadereffectbuffer.h
@@ -44,8 +44,6 @@
#include <QGLFramebufferObject>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class ShaderEffectBuffer : public QGLFramebufferObject
@@ -55,8 +53,6 @@ public:
~ShaderEffectBuffer();
};
-QT_END_HEADER
-
QT_END_NAMESPACE
#endif // SHADEREFFECTBUFFER_H
diff --git a/src/imports/shaders/shadereffectitem.h b/src/imports/shaders/shadereffectitem.h
index 2538773d..7274656d 100644
--- a/src/imports/shaders/shadereffectitem.h
+++ b/src/imports/shaders/shadereffectitem.h
@@ -47,8 +47,6 @@
#include "shadereffectsource.h"
#include "scenegraph/qsggeometry.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class QGLFramebufferObject;
@@ -148,8 +146,6 @@ private:
bool m_defaultVertexShader : 1;
};
-QT_END_HEADER
-
QT_END_NAMESPACE
#endif // SHADEREFFECTITEM_H
diff --git a/src/imports/shaders/shadereffectsource.h b/src/imports/shaders/shadereffectsource.h
index 5c8794e3..7003ff40 100644
--- a/src/imports/shaders/shadereffectsource.h
+++ b/src/imports/shaders/shadereffectsource.h
@@ -46,8 +46,6 @@
#include <QGLFunctions>
#include <QPointer>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class ShaderEffectBuffer;
@@ -152,8 +150,6 @@ private:
bool m_mirrored : 1;
};
-QT_END_HEADER
-
QT_END_NAMESPACE
diff --git a/src/imports/webview/qdeclarativewebview_p.h b/src/imports/webview/qdeclarativewebview_p.h
index 4effd00e..f2b5db79 100644
--- a/src/imports/webview/qdeclarativewebview_p.h
+++ b/src/imports/webview/qdeclarativewebview_p.h
@@ -51,8 +51,6 @@
#include <QWebPage>
-QT_BEGIN_HEADER
-
class QWebHistory;
class QWebSettings;
@@ -394,6 +392,4 @@ QML_DECLARE_TYPE(QDeclarativeWebView)
QML_DECLARE_TYPE(QDeclarativeWebSettings)
QML_DECLARE_TYPEINFO(QDeclarativeWebView, QML_HAS_ATTACHED_PROPERTIES)
-QT_END_HEADER
-
#endif
diff --git a/tests/auto/bic/data/QtDeclarative.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtDeclarative.5.0.0.linux-gcc-ia32.txt
index daa9c2b4..5dd9860c 100644
--- a/tests/auto/bic/data/QtDeclarative.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtDeclarative.5.0.0.linux-gcc-ia32.txt
@@ -4203,157 +4203,6 @@ QAccessibleTableModelChangeEvent (0xb3963ca8) 0
QAccessibleEvent (0xb388eab8) 0
primary-for QAccessibleTableModelChangeEvent (0xb3963ca8)
-Vtable for QAccessibleTextInterface
-QAccessibleTextInterface::_ZTV24QAccessibleTextInterface: 20u entries
-0 (int (*)(...))0
-4 (int (*)(...))(& _ZTI24QAccessibleTextInterface)
-8 (int (*)(...))QAccessibleTextInterface::~QAccessibleTextInterface
-12 (int (*)(...))QAccessibleTextInterface::~QAccessibleTextInterface
-16 (int (*)(...))__cxa_pure_virtual
-20 (int (*)(...))__cxa_pure_virtual
-24 (int (*)(...))__cxa_pure_virtual
-28 (int (*)(...))__cxa_pure_virtual
-32 (int (*)(...))__cxa_pure_virtual
-36 (int (*)(...))__cxa_pure_virtual
-40 (int (*)(...))__cxa_pure_virtual
-44 (int (*)(...))__cxa_pure_virtual
-48 (int (*)(...))QAccessibleTextInterface::textBeforeOffset
-52 (int (*)(...))QAccessibleTextInterface::textAfterOffset
-56 (int (*)(...))QAccessibleTextInterface::textAtOffset
-60 (int (*)(...))__cxa_pure_virtual
-64 (int (*)(...))__cxa_pure_virtual
-68 (int (*)(...))__cxa_pure_virtual
-72 (int (*)(...))__cxa_pure_virtual
-76 (int (*)(...))__cxa_pure_virtual
-
-Class QAccessibleTextInterface
- size=4 align=4
- base size=4 base align=4
-QAccessibleTextInterface (0xb38a10a8) 0 nearly-empty
- vptr=((& QAccessibleTextInterface::_ZTV24QAccessibleTextInterface) + 8u)
-
-Vtable for QAccessibleEditableTextInterface
-QAccessibleEditableTextInterface::_ZTV32QAccessibleEditableTextInterface: 7u entries
-0 (int (*)(...))0
-4 (int (*)(...))(& _ZTI32QAccessibleEditableTextInterface)
-8 (int (*)(...))QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface
-12 (int (*)(...))QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface
-16 (int (*)(...))__cxa_pure_virtual
-20 (int (*)(...))__cxa_pure_virtual
-24 (int (*)(...))__cxa_pure_virtual
-
-Class QAccessibleEditableTextInterface
- size=4 align=4
- base size=4 base align=4
-QAccessibleEditableTextInterface (0xb38a1310) 0 nearly-empty
- vptr=((& QAccessibleEditableTextInterface::_ZTV32QAccessibleEditableTextInterface) + 8u)
-
-Vtable for QAccessibleValueInterface
-QAccessibleValueInterface::_ZTV25QAccessibleValueInterface: 9u entries
-0 (int (*)(...))0
-4 (int (*)(...))(& _ZTI25QAccessibleValueInterface)
-8 (int (*)(...))QAccessibleValueInterface::~QAccessibleValueInterface
-12 (int (*)(...))QAccessibleValueInterface::~QAccessibleValueInterface
-16 (int (*)(...))__cxa_pure_virtual
-20 (int (*)(...))__cxa_pure_virtual
-24 (int (*)(...))__cxa_pure_virtual
-28 (int (*)(...))__cxa_pure_virtual
-32 (int (*)(...))__cxa_pure_virtual
-
-Class QAccessibleValueInterface
- size=4 align=4
- base size=4 base align=4
-QAccessibleValueInterface (0xb38a1578) 0 nearly-empty
- vptr=((& QAccessibleValueInterface::_ZTV25QAccessibleValueInterface) + 8u)
-
-Vtable for QAccessibleTableCellInterface
-QAccessibleTableCellInterface::_ZTV29QAccessibleTableCellInterface: 13u entries
-0 (int (*)(...))0
-4 (int (*)(...))(& _ZTI29QAccessibleTableCellInterface)
-8 (int (*)(...))QAccessibleTableCellInterface::~QAccessibleTableCellInterface
-12 (int (*)(...))QAccessibleTableCellInterface::~QAccessibleTableCellInterface
-16 (int (*)(...))__cxa_pure_virtual
-20 (int (*)(...))__cxa_pure_virtual
-24 (int (*)(...))__cxa_pure_virtual
-28 (int (*)(...))__cxa_pure_virtual
-32 (int (*)(...))__cxa_pure_virtual
-36 (int (*)(...))__cxa_pure_virtual
-40 (int (*)(...))__cxa_pure_virtual
-44 (int (*)(...))__cxa_pure_virtual
-48 (int (*)(...))__cxa_pure_virtual
-
-Class QAccessibleTableCellInterface
- size=4 align=4
- base size=4 base align=4
-QAccessibleTableCellInterface (0xb38a17e0) 0 nearly-empty
- vptr=((& QAccessibleTableCellInterface::_ZTV29QAccessibleTableCellInterface) + 8u)
-
-Vtable for QAccessibleTableInterface
-QAccessibleTableInterface::_ZTV25QAccessibleTableInterface: 23u entries
-0 (int (*)(...))0
-4 (int (*)(...))(& _ZTI25QAccessibleTableInterface)
-8 (int (*)(...))QAccessibleTableInterface::~QAccessibleTableInterface
-12 (int (*)(...))QAccessibleTableInterface::~QAccessibleTableInterface
-16 (int (*)(...))__cxa_pure_virtual
-20 (int (*)(...))__cxa_pure_virtual
-24 (int (*)(...))__cxa_pure_virtual
-28 (int (*)(...))__cxa_pure_virtual
-32 (int (*)(...))__cxa_pure_virtual
-36 (int (*)(...))__cxa_pure_virtual
-40 (int (*)(...))__cxa_pure_virtual
-44 (int (*)(...))__cxa_pure_virtual
-48 (int (*)(...))__cxa_pure_virtual
-52 (int (*)(...))__cxa_pure_virtual
-56 (int (*)(...))__cxa_pure_virtual
-60 (int (*)(...))__cxa_pure_virtual
-64 (int (*)(...))__cxa_pure_virtual
-68 (int (*)(...))__cxa_pure_virtual
-72 (int (*)(...))__cxa_pure_virtual
-76 (int (*)(...))__cxa_pure_virtual
-80 (int (*)(...))__cxa_pure_virtual
-84 (int (*)(...))__cxa_pure_virtual
-88 (int (*)(...))__cxa_pure_virtual
-
-Class QAccessibleTableInterface
- size=4 align=4
- base size=4 base align=4
-QAccessibleTableInterface (0xb38a1a48) 0 nearly-empty
- vptr=((& QAccessibleTableInterface::_ZTV25QAccessibleTableInterface) + 8u)
-
-Vtable for QAccessibleActionInterface
-QAccessibleActionInterface::_ZTV26QAccessibleActionInterface: 9u entries
-0 (int (*)(...))0
-4 (int (*)(...))(& _ZTI26QAccessibleActionInterface)
-8 (int (*)(...))QAccessibleActionInterface::~QAccessibleActionInterface
-12 (int (*)(...))QAccessibleActionInterface::~QAccessibleActionInterface
-16 (int (*)(...))__cxa_pure_virtual
-20 (int (*)(...))QAccessibleActionInterface::localizedActionName
-24 (int (*)(...))QAccessibleActionInterface::localizedActionDescription
-28 (int (*)(...))__cxa_pure_virtual
-32 (int (*)(...))__cxa_pure_virtual
-
-Class QAccessibleActionInterface
- size=4 align=4
- base size=4 base align=4
-QAccessibleActionInterface (0xb38a1cb0) 0 nearly-empty
- vptr=((& QAccessibleActionInterface::_ZTV26QAccessibleActionInterface) + 8u)
-
-Vtable for QAccessibleImageInterface
-QAccessibleImageInterface::_ZTV25QAccessibleImageInterface: 7u entries
-0 (int (*)(...))0
-4 (int (*)(...))(& _ZTI25QAccessibleImageInterface)
-8 (int (*)(...))QAccessibleImageInterface::~QAccessibleImageInterface
-12 (int (*)(...))QAccessibleImageInterface::~QAccessibleImageInterface
-16 (int (*)(...))__cxa_pure_virtual
-20 (int (*)(...))__cxa_pure_virtual
-24 (int (*)(...))__cxa_pure_virtual
-
-Class QAccessibleImageInterface
- size=4 align=4
- base size=4 base align=4
-QAccessibleImageInterface (0xb38a1118) 0 nearly-empty
- vptr=((& QAccessibleImageInterface::_ZTV25QAccessibleImageInterface) + 8u)
-
Vtable for QAccessibleBridge
QAccessibleBridge::_ZTV17QAccessibleBridge: 6u entries
0 (int (*)(...))0
diff --git a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h
index 57d8a3d2..a08d9b55 100644
--- a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h
+++ b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h
@@ -44,8 +44,6 @@
#include <QtCore/qglobal.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
class QScriptEngine;
@@ -66,6 +64,4 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDECLARATIVEDEBUGHELPER_P_H
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/LocalLast2.qml b/tests/auto/declarative/qdeclarativelanguage/data/LocalLast2.qml
new file mode 100644
index 00000000..4bf7eb2e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/LocalLast2.qml
@@ -0,0 +1,2 @@
+import QtQuick 1.0
+MouseArea {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml b/tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml
new file mode 100644
index 00000000..9ba0d612
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.0
+
+Item {
+ property int test: 11
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/localOrderTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/localOrderTest.qml
new file mode 100644
index 00000000..d3b31a3d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/localOrderTest.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+import org.qtproject.installedtest 1.0
+
+LocalLast2 {
+ property Item item: LocalLast {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml
new file mode 100644
index 00000000..532bc319
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml
@@ -0,0 +1,4 @@
+import QtQuick 1.0
+import Test 1.0
+
+MyComponentType {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
index ee01235b..f812110d 100644
--- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
@@ -69,7 +69,9 @@ void registerTypes()
qmlRegisterCustomType<MyCustomParserType>("Test", 1, 0, "MyCustomParserType", new MyCustomParserTypeParser);
+#ifdef QT_BUILD_INTERNAL
qmlRegisterTypeNotAvailable("Test",1,0,"UnavailableType", "UnavailableType is unavailable for testing");
+#endif
}
QVariant myCustomVariantTypeConverter(const QString &data)
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index b37873b2..1574aa4a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -99,6 +99,7 @@ private slots:
void assignLiteralToVariant();
void customParserTypes();
void rootAsQmlComponent();
+ void qmlComponentType();
void inlineQmlComponents();
void idProperty();
void autoNotifyConnection();
@@ -132,6 +133,7 @@ private slots:
void reservedWords();
void inlineAssignmentsOverrideBindings();
void nestedComponentRoots();
+ void implicitImportsLast();
void basicRemote_data();
void basicRemote();
@@ -403,7 +405,9 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("invalidOn") << "invalidOn.qml" << "invalidOn.errors.txt" << false;
QTest::newRow("invalidProperty") << "invalidProperty.qml" << "invalidProperty.errors.txt" << false;
QTest::newRow("nonScriptableProperty") << "nonScriptableProperty.qml" << "nonScriptableProperty.errors.txt" << false;
+#ifdef QT_BUILD_INTERNAL
QTest::newRow("notAvailable") << "notAvailable.qml" << "notAvailable.errors.txt" << false;
+#endif
QTest::newRow("singularProperty") << "singularProperty.qml" << "singularProperty.errors.txt" << false;
QTest::newRow("singularProperty.2") << "singularProperty.2.qml" << "singularProperty.2.errors.txt" << false;
QTest::newRow("incorrectCase") << "incorrectCase.qml"
@@ -627,6 +631,16 @@ void tst_qdeclarativelanguage::rootAsQmlComponent()
QCOMPARE(object->getChildren()->count(), 2);
}
+// Tests that types can be specified from a QML only component
+void tst_qdeclarativelanguage::qmlComponentType()
+{
+ QDeclarativeComponent component(&engine, testFileUrl("qmlComponentType.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = qobject_cast<QObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("test"), QVariant(11));
+}
+
// Tests that components can be specified inline
void tst_qdeclarativelanguage::inlineQmlComponents()
{
@@ -1806,6 +1820,11 @@ void tst_qdeclarativelanguage::importsOrder_data()
"LocalLast {}"
<< (!qmlCheckTypes()?"QDeclarativeRectangle":"")// i.e. from org.qtproject.installedtest, not data/LocalLast.qml
<< (!qmlCheckTypes()?"":"LocalLast is ambiguous. Found in lib/org/qtproject/installedtest and in local directory");
+ QTest::newRow("local last 3") <<
+ "import org.qtproject.installedtest 1.0\n"
+ "LocalLast {LocalLast2{}}"
+ << (!qmlCheckTypes()?"QDeclarativeRectangle":"")// i.e. from org.qtproject.installedtest, not data/LocalLast.qml
+ << (!qmlCheckTypes()?"":"LocalLast is ambiguous. Found in lib/org/qtproject/installedtest and in local directory");
}
void tst_qdeclarativelanguage::importsOrder()
@@ -1959,6 +1978,8 @@ void tst_qdeclarativelanguage::initTestCase()
{
QDeclarativeDataTest::initTestCase();
registerTypes();
+ // Registered here because it uses testFileUrl
+ qmlRegisterType(testFileUrl("MyComponentType.qml"), "Test", 1, 0, "MyComponentType");
// Registering the TestType class in other modules should have no adverse effects
qmlRegisterType<TestType>("org.qtproject.TestPre", 1, 0, "Test");
@@ -2021,6 +2042,23 @@ void tst_qdeclarativelanguage::compatibilitySemicolon()
QVERIFY(o != 0);
}
+// Tests that the implicit import has lowest precedence, in the case where
+// there are conflicting types and types only found in the local import.
+// Tests that just check one (or the root) type are in ::importsOrder
+void tst_qdeclarativelanguage::implicitImportsLast()
+{
+ if (qmlCheckTypes())
+ QSKIP("This test is about maintaining the same choice when type is ambiguous.");
+ QDeclarativeComponent component(&engine, testFileUrl("localOrderTest.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = qobject_cast<QObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(QString(object->metaObject()->className()).startsWith(QLatin1String("QDeclarativeMouseArea")));
+ QObject* object2 = object->property("item").value<QObject*>();
+ QVERIFY(object2 != 0);
+ QCOMPARE(QString(object2->metaObject()->className()), QLatin1String("QDeclarativeRectangle"));
+}
+
QTEST_MAIN(tst_qdeclarativelanguage)
#include "tst_qdeclarativelanguage.moc"
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 5c00ac95..eb0e0948 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -85,6 +85,7 @@ private slots:
void enforceRange();
void spacing();
void sections();
+ void currentSection();
void sectionsDelegate();
void cacheBuffer();
void positionViewAtIndex();
@@ -1049,6 +1050,36 @@ void tst_QDeclarativeListView::sections()
delete canvas;
}
+void tst_QDeclarativeListView::currentSection()
+{
+ // QTBUG-29712
+ // update currentSection correctly if model modifications
+ // do not trigger a refill
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 5; i++)
+ model.addItem("Item" + QString::number(i), QString::number(i));
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview-sections.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QTRY_VERIFY(listview != 0);
+
+ // make sure the listView won't trigger refill when removing the first row
+ QTRY_VERIFY(listview->height() > model.count() * 40);
+
+ QTRY_COMPARE(listview->currentSection(), QString("0"));
+ model.removeItem(0);
+ QTRY_COMPARE(listview->currentSection(), QString("1"));
+
+ delete canvas;
+}
+
void tst_QDeclarativeListView::sectionsDelegate()
{
QDeclarativeView *canvas = createView();
diff --git a/tools/qml/qdeclarativetester.cpp b/tools/qml/qdeclarativetester.cpp
index 6b7c395c..056216e2 100644
--- a/tools/qml/qdeclarativetester.cpp
+++ b/tools/qml/qdeclarativetester.cpp
@@ -355,7 +355,7 @@ void QDeclarativeTester::updateCurrentTime(int msec)
// Advance test script
while (testscript && testscript->count() > testscriptidx) {
- QObject *event = testscript->event(testscriptidx);
+ QObject *event = testscript->eventAt(testscriptidx);
if (QDeclarativeVisualTestFrame *frame = qobject_cast<QDeclarativeVisualTestFrame *>(event)) {
if (frame->msec() < msec) {
diff --git a/tools/qml/qdeclarativetester.h b/tools/qml/qdeclarativetester.h
index fc16565c..13bddbb5 100644
--- a/tools/qml/qdeclarativetester.h
+++ b/tools/qml/qdeclarativetester.h
@@ -65,7 +65,7 @@ public:
QDeclarativeListProperty<QObject> events() { return QDeclarativeListProperty<QObject>(this, m_events); }
int count() const { return m_events.count(); }
- QObject *event(int idx) { return m_events.at(idx); }
+ QObject *eventAt(int idx) const { return m_events.at(idx); }
private:
QList<QObject *> m_events;