aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-11-03 13:27:13 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-11-03 13:27:13 +0100
commitf2244103ff7a9b61fc7bcb7e920d8cc6b2f5f226 (patch)
tree8fe753743c46d4a652f582a7a2a49e5709eaa6e0
parent57430b2bdad32150e0ed8ceb6893430363ee6670 (diff)
parent164af37710e5721cbc7d79a0af20f2387181c59c (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: I1de8832fefd0e45fea16ca072b6c7ae44fa376d4
-rw-r--r--src/3rdparty/masm/stubs/Options.cpp2
-rw-r--r--src/imports/folderlistmodel/plugins.qmltypes273
-rw-r--r--src/imports/localstorage/plugins.qmltypes3
-rw-r--r--src/imports/models/models.pro2
-rw-r--r--src/imports/models/plugins.qmltypes54
-rw-r--r--src/imports/particles/plugins.qmltypes207
-rw-r--r--src/imports/qtquick2/plugins.qmltypes2081
-rw-r--r--src/imports/qtquick2/qtquick2.pro1
-rw-r--r--src/imports/settings/plugins.qmltypes3
-rw-r--r--src/imports/statemachine/plugins.qmltypes12
-rw-r--r--src/imports/testlib/plugins.qmltypes21
-rw-r--r--src/imports/window/plugins.qmltypes19
-rw-r--r--src/imports/xmllistmodel/plugins.qmltypes268
-rw-r--r--src/qml/Qt5QmlConfigExtras.cmake.in5
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h16
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp21
-rw-r--r--src/qml/compiler/qv4isel_moth_p.h1
-rw-r--r--src/qml/compiler/qv4isel_p.cpp13
-rw-r--r--src/qml/compiler/qv4isel_p.h1
-rw-r--r--src/qml/compiler/qv4ssa.cpp15
-rw-r--r--src/qml/doc/src/cppintegration/definetypes.qdoc1
-rw-r--r--src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc2
-rw-r--r--src/qml/jit/qv4assembler.cpp2
-rw-r--r--src/qml/jit/qv4assembler_p.h8
-rw-r--r--src/qml/jit/qv4isel_masm.cpp29
-rw-r--r--src/qml/jit/qv4isel_masm_p.h1
-rw-r--r--src/qml/jit/qv4regalloc.cpp3
-rw-r--r--src/qml/jsruntime/qv4engine.cpp2
-rw-r--r--src/qml/jsruntime/qv4objectiterator.cpp2
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp26
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h2
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h8
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp8
-rw-r--r--src/qml/memory/qv4mm.cpp49
-rw-r--r--src/qml/qml/qqmlengine.cpp4
-rw-r--r--src/qml/qml/qqmlfileselector.cpp6
-rw-r--r--src/qml/qml/qqmlfileselector_p.h2
-rw-r--r--src/qml/qml/qqmlglobal_p.h10
-rw-r--r--src/qml/qml/qqmlimport.cpp4
-rw-r--r--src/qml/qml/qqmllocale_p.h2
-rw-r--r--src/qml/qml/qqmltypeloader.cpp149
-rw-r--r--src/qml/qml/qqmltypeloader_p.h11
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp7
-rw-r--r--src/qml/types/qqmlbind.cpp17
-rw-r--r--src/qml/types/qqmlitemselectionmodel.qdoc2
-rw-r--r--src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc9
-rw-r--r--src/quick/items/items.pri1
-rw-r--r--src/quick/items/qquickanimatedsprite.cpp20
-rw-r--r--src/quick/items/qquickanimatedsprite_p.h1
-rw-r--r--src/quick/items/qquickevents.cpp2
-rw-r--r--src/quick/items/qquickimage.cpp5
-rw-r--r--src/quick/items/qquickimagebase.cpp2
-rw-r--r--src/quick/items/qquickitem.cpp34
-rw-r--r--src/quick/items/qquickpathview.cpp10
-rw-r--r--src/quick/items/qquickpathview_p_p.h4
-rw-r--r--src/quick/items/qquickshadereffectnode.cpp50
-rw-r--r--src/quick/items/qquickshadereffectnode_p.h14
-rw-r--r--src/quick/items/qquicktext.cpp148
-rw-r--r--src/quick/items/qquicktext_p_p.h39
-rw-r--r--src/quick/items/qquicktextdocument.cpp148
-rw-r--r--src/quick/items/qquicktextdocument_p.h101
-rw-r--r--src/quick/items/qquicktextedit.cpp2
-rw-r--r--src/quick/items/qquicktextnodeengine.cpp3
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp39
-rw-r--r--src/quick/scenegraph/coreapi/qsgmaterial.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer.cpp11
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp35
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp16
-rw-r--r--src/quick/scenegraph/util/qsgatlastexture.cpp16
-rw-r--r--src/quick/scenegraph/util/qsgdistancefieldutil.cpp19
-rw-r--r--src/quick/scenegraph/util/qsgtexture.cpp2
-rw-r--r--src/quick/util/qquickanimator.cpp2
-rw-r--r--src/quick/util/qquickanimatorcontroller.cpp4
-rw-r--r--src/quick/util/qquickanimatorjob_p.h3
-rw-r--r--src/quick/util/qquickpixmapcache.cpp2
-rw-r--r--tests/auto/cmake/CMakeLists.txt2
-rw-r--r--tests/auto/cmake/test_plugins/CMakeLists.txt14
-rw-r--r--tests/auto/qml/qml.pro5
-rw-r--r--tests/auto/qml/qmllint/data/QTBUG-45916.js6
-rw-r--r--tests/auto/qml/qmllint/data/Simple.qml4
-rw-r--r--tests/auto/qml/qmllint/data/failure1.js5
-rw-r--r--tests/auto/qml/qmllint/data/failure1.qml5
-rw-r--r--tests/auto/qml/qmllint/data/importing_js.qml5
-rw-r--r--tests/auto/qml/qmllint/main.cpp90
-rw-r--r--tests/auto/qml/qmllint/qmllint.pro6
-rw-r--r--tests/auto/qml/qmlmin/tst_qmlmin.cpp1
-rw-r--r--tests/auto/qml/qqmlengine/data/TypeofQmlProperty.qml6
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp14
-rw-r--r--tests/auto/qml/qqmltypeloader/data/load_synchronous.qml42
-rw-r--r--tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp11
-rw-r--r--tests/auto/quick/qquickitem2/data/childrenRectBottomRightCorner.qml47
-rw-r--r--tests/auto/quick/qquickitem2/data/keynavigationtest_loop.qml37
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp48
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp9
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp1
-rw-r--r--tests/auto/quick/qquicktextdocument/tst_qquicktextdocument.cpp16
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp3
-rw-r--r--tools/fdegen/main.cpp8
-rw-r--r--tools/qml/main.cpp4
-rw-r--r--tools/qmlscene/main.cpp4
101 files changed, 2269 insertions, 2245 deletions
diff --git a/src/3rdparty/masm/stubs/Options.cpp b/src/3rdparty/masm/stubs/Options.cpp
index 3b13e32218..76da55c387 100644
--- a/src/3rdparty/masm/stubs/Options.cpp
+++ b/src/3rdparty/masm/stubs/Options.cpp
@@ -40,7 +40,7 @@ namespace JSC {
bool Options::showDisassembly()
{
- static bool showCode = !qgetenv("QV4_SHOW_ASM").isNull();
+ static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_ASM");
return showCode;
}
diff --git a/src/imports/folderlistmodel/plugins.qmltypes b/src/imports/folderlistmodel/plugins.qmltypes
index a55d3a3499..02127c63cb 100644
--- a/src/imports/folderlistmodel/plugins.qmltypes
+++ b/src/imports/folderlistmodel/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,272 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable Qt.labs.folderlistmodel 2.1'
Module {
+ dependencies: []
+ Component {
+ name: "QAbstractItemModel"
+ prototype: "QObject"
+ Enum {
+ name: "LayoutChangeHint"
+ values: {
+ "NoLayoutChangeHint": 0,
+ "VerticalSortHint": 1,
+ "HorizontalSortHint": 2
+ }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ Parameter { name: "roles"; type: "QVector<int>" }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ }
+ Signal {
+ name: "headerDataChanged"
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutChanged" }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutAboutToBeChanged" }
+ Signal {
+ name: "rowsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal { name: "modelAboutToBeReset" }
+ Signal { name: "modelReset" }
+ Signal {
+ name: "rowsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationRow"; type: "int" }
+ }
+ Signal {
+ name: "rowsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "row"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationColumn"; type: "int" }
+ }
+ Signal {
+ name: "columnsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method { name: "submit"; type: "bool" }
+ Method { name: "revert" }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "parent"
+ type: "QModelIndex"
+ Parameter { name: "child"; type: "QModelIndex" }
+ }
+ Method {
+ name: "sibling"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "idx"; type: "QModelIndex" }
+ }
+ Method {
+ name: "rowCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "rowCount"; type: "int" }
+ Method {
+ name: "columnCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "columnCount"; type: "int" }
+ Method {
+ name: "hasChildren"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "hasChildren"; type: "bool" }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ }
+ Method {
+ name: "fetchMore"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "canFetchMore"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "flags"
+ type: "Qt::ItemFlags"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ Parameter { name: "flags"; type: "Qt::MatchFlags" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ }
+ Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" }
Component {
name: "QQuickFolderListModel"
prototype: "QAbstractListModel"
@@ -52,5 +318,10 @@ Module {
Parameter { name: "idx"; type: "int" }
Parameter { name: "property"; type: "string" }
}
+ Method {
+ name: "indexOf"
+ type: "int"
+ Parameter { name: "file"; type: "QUrl" }
+ }
}
}
diff --git a/src/imports/localstorage/plugins.qmltypes b/src/imports/localstorage/plugins.qmltypes
index ff4c897f58..7d81cdf6f4 100644
--- a/src/imports/localstorage/plugins.qmltypes
+++ b/src/imports/localstorage/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,7 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQuick.LocalStorage 2.0'
Module {
+ dependencies: []
Component {
name: "QQuickLocalStorage"
prototype: "QObject"
diff --git a/src/imports/models/models.pro b/src/imports/models/models.pro
index 6a2952cd82..c94ba833ad 100644
--- a/src/imports/models/models.pro
+++ b/src/imports/models/models.pro
@@ -1,7 +1,7 @@
CXX_MODULE = qml
TARGET = modelsplugin
TARGETPATH = QtQml/Models.2
-IMPORT_VERSION = 2.2
+IMPORT_VERSION = 2.3
SOURCES += \
plugin.cpp
diff --git a/src/imports/models/plugins.qmltypes b/src/imports/models/plugins.qmltypes
index e81a971e79..0bd52a13fd 100644
--- a/src/imports/models/plugins.qmltypes
+++ b/src/imports/models/plugins.qmltypes
@@ -1,12 +1,13 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtQml.Models 2.2'
+// 'qmlplugindump -nonrelocatable QtQml.Models 2.3'
Module {
+ dependencies: []
Component {
name: "QAbstractItemModel"
prototype: "QObject"
@@ -527,10 +528,55 @@ Module {
name: "QQmlObjectModel"
defaultProperty: "children"
prototype: "QQmlInstanceModel"
- exports: ["QtQml.Models/ObjectModel 2.1"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQml.Models/ObjectModel 2.1",
+ "QtQml.Models/ObjectModel 2.3"
+ ]
+ exportMetaObjectRevisions: [0, 3]
attachedType: "QQmlObjectModelAttached"
Property { name: "children"; type: "QObject"; isList: true; isReadonly: true }
+ Method { name: "clear"; revision: 3 }
+ Method {
+ name: "get"
+ revision: 3
+ type: "QObject*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "append"
+ revision: 3
+ Parameter { name: "object"; type: "QObject"; isPointer: true }
+ }
+ Method {
+ name: "insert"
+ revision: 3
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "object"; type: "QObject"; isPointer: true }
+ }
+ Method {
+ name: "move"
+ revision: 3
+ Parameter { name: "from"; type: "int" }
+ Parameter { name: "to"; type: "int" }
+ Parameter { name: "n"; type: "int" }
+ }
+ Method {
+ name: "move"
+ revision: 3
+ Parameter { name: "from"; type: "int" }
+ Parameter { name: "to"; type: "int" }
+ }
+ Method {
+ name: "remove"
+ revision: 3
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "n"; type: "int" }
+ }
+ Method {
+ name: "remove"
+ revision: 3
+ Parameter { name: "index"; type: "int" }
+ }
}
Component {
name: "QQmlObjectModelAttached"
diff --git a/src/imports/particles/plugins.qmltypes b/src/imports/particles/plugins.qmltypes
index b1b825dea6..ce78392610 100644
--- a/src/imports/particles/plugins.qmltypes
+++ b/src/imports/particles/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,7 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQuick.Particles 2.0'
Module {
+ dependencies: []
Component {
name: "QQuickAgeAffector"
defaultProperty: "data"
@@ -491,6 +492,160 @@ Module {
}
}
Component {
+ name: "QQuickItem"
+ defaultProperty: "data"
+ prototype: "QObject"
+ Enum {
+ name: "TransformOrigin"
+ values: {
+ "TopLeft": 0,
+ "Top": 1,
+ "TopRight": 2,
+ "Left": 3,
+ "Center": 4,
+ "Right": 5,
+ "BottomLeft": 6,
+ "Bottom": 7,
+ "BottomRight": 8
+ }
+ }
+ Property { name: "parent"; type: "QQuickItem"; isPointer: true }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "x"; type: "double" }
+ Property { name: "y"; type: "double" }
+ Property { name: "z"; type: "double" }
+ Property { name: "width"; type: "double" }
+ Property { name: "height"; type: "double" }
+ Property { name: "opacity"; type: "double" }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true }
+ Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true }
+ Property { name: "state"; type: "string" }
+ Property { name: "childrenRect"; type: "QRectF"; isReadonly: true }
+ Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true }
+ Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "baselineOffset"; type: "double" }
+ Property { name: "clip"; type: "bool" }
+ Property { name: "focus"; type: "bool" }
+ Property { name: "activeFocus"; type: "bool"; isReadonly: true }
+ Property { name: "activeFocusOnTab"; revision: 1; type: "bool" }
+ Property { name: "rotation"; type: "double" }
+ Property { name: "scale"; type: "double" }
+ Property { name: "transformOrigin"; type: "TransformOrigin" }
+ Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true }
+ Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true }
+ Property { name: "smooth"; type: "bool" }
+ Property { name: "antialiasing"; type: "bool" }
+ Property { name: "implicitWidth"; type: "double" }
+ Property { name: "implicitHeight"; type: "double" }
+ Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true }
+ Signal {
+ name: "childrenRectChanged"
+ Parameter { type: "QRectF" }
+ }
+ Signal {
+ name: "baselineOffsetChanged"
+ Parameter { type: "double" }
+ }
+ Signal {
+ name: "stateChanged"
+ Parameter { type: "string" }
+ }
+ Signal {
+ name: "focusChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "activeFocusChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "activeFocusOnTabChanged"
+ revision: 1
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "parentChanged"
+ Parameter { type: "QQuickItem"; isPointer: true }
+ }
+ Signal {
+ name: "transformOriginChanged"
+ Parameter { type: "TransformOrigin" }
+ }
+ Signal {
+ name: "smoothChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "antialiasingChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "clipChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "windowChanged"
+ revision: 1
+ Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
+ }
+ Method { name: "update" }
+ Method {
+ name: "grabToImage"
+ revision: 2
+ type: "bool"
+ Parameter { name: "callback"; type: "QJSValue" }
+ Parameter { name: "targetSize"; type: "QSize" }
+ }
+ Method {
+ name: "grabToImage"
+ revision: 2
+ type: "bool"
+ Parameter { name: "callback"; type: "QJSValue" }
+ }
+ Method {
+ name: "contains"
+ type: "bool"
+ Parameter { name: "point"; type: "QPointF" }
+ }
+ Method {
+ name: "mapFromItem"
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "mapToItem"
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method { name: "forceActiveFocus" }
+ Method {
+ name: "forceActiveFocus"
+ Parameter { name: "reason"; type: "Qt::FocusReason" }
+ }
+ Method {
+ name: "nextItemInFocusChain"
+ revision: 1
+ type: "QQuickItem*"
+ Parameter { name: "forward"; type: "bool" }
+ }
+ Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" }
+ Method {
+ name: "childAt"
+ type: "QQuickItem*"
+ Parameter { name: "x"; type: "double" }
+ Parameter { name: "y"; type: "double" }
+ }
+ }
+ Component {
name: "QQuickItemParticle"
defaultProperty: "data"
prototype: "QQuickParticlePainter"
@@ -996,6 +1151,56 @@ Module {
}
}
Component {
+ name: "QQuickStochasticState"
+ prototype: "QObject"
+ Property { name: "duration"; type: "int" }
+ Property { name: "durationVariation"; type: "int" }
+ Property { name: "randomStart"; type: "bool" }
+ Property { name: "to"; type: "QVariantMap" }
+ Property { name: "name"; type: "string" }
+ Signal {
+ name: "durationChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "nameChanged"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Signal {
+ name: "toChanged"
+ Parameter { name: "arg"; type: "QVariantMap" }
+ }
+ Signal {
+ name: "durationVariationChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal { name: "entered" }
+ Signal {
+ name: "randomStartChanged"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "setDuration"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setName"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setTo"
+ Parameter { name: "arg"; type: "QVariantMap" }
+ }
+ Method {
+ name: "setDurationVariation"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setRandomStart"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ }
+ Component {
name: "QQuickTargetDirection"
prototype: "QQuickDirection"
exports: ["QtQuick.Particles/TargetDirection 2.0"]
diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes
index 050d0f78cd..f0645213b0 100644
--- a/src/imports/qtquick2/plugins.qmltypes
+++ b/src/imports/qtquick2/plugins.qmltypes
@@ -1,12 +1,13 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -builtins'
+// 'qmlplugindump -nonrelocatable QtQuick 2.6'
Module {
+ dependencies: []
Component {
name: "QAbstractItemModel"
prototype: "QObject"
@@ -139,6 +140,137 @@ Module {
}
Method { name: "submit"; type: "bool" }
Method { name: "revert" }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "parent"
+ type: "QModelIndex"
+ Parameter { name: "child"; type: "QModelIndex" }
+ }
+ Method {
+ name: "sibling"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "idx"; type: "QModelIndex" }
+ }
+ Method {
+ name: "rowCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "rowCount"; type: "int" }
+ Method {
+ name: "columnCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "columnCount"; type: "int" }
+ Method {
+ name: "hasChildren"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "hasChildren"; type: "bool" }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ }
+ Method {
+ name: "fetchMore"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "canFetchMore"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "flags"
+ type: "Qt::ItemFlags"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ Parameter { name: "flags"; type: "Qt::MatchFlags" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
}
Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" }
Component {
@@ -299,27 +431,13 @@ Module {
"Quit": 65,
"FullScreen": 66,
"Deselect": 67,
- "DeleteCompleteLine": 68
+ "DeleteCompleteLine": 68,
+ "Backspace": 69,
+ "Cancel": 70
}
}
}
Component {
- name: "QObject"
- exports: ["QtQml/QtObject 2.0", "QtQuick/QtObject 2.0"]
- exportMetaObjectRevisions: [0, 0]
- Property { name: "objectName"; type: "string" }
- Signal {
- name: "objectNameChanged"
- Parameter { name: "objectName"; type: "string" }
- }
- Method { name: "toString" }
- Method { name: "destroy" }
- Method {
- name: "destroy"
- Parameter { name: "delay"; type: "int" }
- }
- }
- Component {
name: "QQmlApplication"
prototype: "QObject"
Property { name: "arguments"; type: "QStringList"; isReadonly: true }
@@ -346,83 +464,6 @@ Module {
}
}
Component {
- name: "QQmlBind"
- prototype: "QObject"
- exports: ["QtQml/Binding 2.0", "QtQuick/Binding 2.0"]
- exportMetaObjectRevisions: [0, 0]
- Property { name: "target"; type: "QObject"; isPointer: true }
- Property { name: "property"; type: "string" }
- Property { name: "value"; type: "QVariant" }
- Property { name: "when"; type: "bool" }
- }
- Component {
- name: "QQmlComponent"
- prototype: "QObject"
- exports: [
- "QML/Component 1.0",
- "QtQml/Component 2.0",
- "QtQuick/Component 2.0"
- ]
- exportMetaObjectRevisions: [0, 0, 0]
- attachedType: "QQmlComponentAttached"
- Enum {
- name: "CompilationMode"
- values: {
- "PreferSynchronous": 0,
- "Asynchronous": 1
- }
- }
- Enum {
- name: "Status"
- values: {
- "Null": 0,
- "Ready": 1,
- "Loading": 2,
- "Error": 3
- }
- }
- Property { name: "progress"; type: "double"; isReadonly: true }
- Property { name: "status"; type: "Status"; isReadonly: true }
- Property { name: "url"; type: "QUrl"; isReadonly: true }
- Signal {
- name: "statusChanged"
- Parameter { type: "QQmlComponent::Status" }
- }
- Signal {
- name: "progressChanged"
- Parameter { type: "double" }
- }
- Method {
- name: "loadUrl"
- Parameter { name: "url"; type: "QUrl" }
- }
- Method {
- name: "loadUrl"
- Parameter { name: "url"; type: "QUrl" }
- Parameter { name: "mode"; type: "CompilationMode" }
- }
- Method {
- name: "setData"
- Parameter { type: "QByteArray" }
- Parameter { name: "baseUrl"; type: "QUrl" }
- }
- Method { name: "errorString"; type: "string" }
- }
- Component {
- name: "QQmlComponentAttached"
- prototype: "QObject"
- Signal { name: "completed" }
- Signal { name: "destruction" }
- }
- Component {
- name: "QQmlConnections"
- prototype: "QObject"
- exports: ["QtQml/Connections 2.0", "QtQuick/Connections 2.0"]
- exportMetaObjectRevisions: [0, 0]
- Property { name: "target"; type: "QObject"; isPointer: true }
- Property { name: "ignoreUnknownSignals"; type: "bool" }
- }
- Component {
name: "QQmlDelegateModel"
defaultProperty: "delegate"
prototype: "QQmlInstanceModel"
@@ -514,7 +555,6 @@ Module {
Component { name: "QQmlDelegateModelParts"; prototype: "QObject" }
Component {
name: "QQmlEasingValueType"
- prototype: "QQmlValueType"
exports: ["QtQuick/Easing 2.0"]
isCreatable: false
exportMetaObjectRevisions: [0]
@@ -576,58 +616,6 @@ Module {
Property { name: "bezierCurve"; type: "QVariantList" }
}
Component {
- name: "QQmlInstanceModel"
- prototype: "QObject"
- Property { name: "count"; type: "int"; isReadonly: true }
- Signal {
- name: "modelUpdated"
- Parameter { name: "changeSet"; type: "QQmlChangeSet" }
- Parameter { name: "reset"; type: "bool" }
- }
- Signal {
- name: "createdItem"
- Parameter { name: "index"; type: "int" }
- Parameter { name: "object"; type: "QObject"; isPointer: true }
- }
- Signal {
- name: "initItem"
- Parameter { name: "index"; type: "int" }
- Parameter { name: "object"; type: "QObject"; isPointer: true }
- }
- Signal {
- name: "destroyingItem"
- Parameter { name: "object"; type: "QObject"; isPointer: true }
- }
- }
- Component {
- name: "QQmlInstantiator"
- defaultProperty: "delegate"
- prototype: "QObject"
- exports: ["QtQml/Instantiator 2.1", "QtQuick/Instantiator 2.1"]
- exportMetaObjectRevisions: [0, 0]
- Property { name: "active"; type: "bool" }
- Property { name: "asynchronous"; type: "bool" }
- Property { name: "model"; type: "QVariant" }
- Property { name: "count"; type: "int"; isReadonly: true }
- Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
- Property { name: "object"; type: "QObject"; isReadonly: true; isPointer: true }
- Signal {
- name: "objectAdded"
- Parameter { name: "index"; type: "int" }
- Parameter { name: "object"; type: "QObject"; isPointer: true }
- }
- Signal {
- name: "objectRemoved"
- Parameter { name: "index"; type: "int" }
- Parameter { name: "object"; type: "QObject"; isPointer: true }
- }
- Method {
- name: "objectAt"
- type: "QObject*"
- Parameter { name: "index"; type: "int" }
- }
- }
- Component {
name: "QQmlListElement"
prototype: "QObject"
exports: ["QtQuick/ListElement 2.0"]
@@ -678,49 +666,6 @@ Module {
Method { name: "sync" }
}
Component {
- name: "QQmlLocale"
- exports: ["QtQml/Locale 2.2", "QtQuick/Locale 2.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0, 0]
- Enum {
- name: "MeasurementSystem"
- values: {
- "MetricSystem": 0,
- "ImperialSystem": 1,
- "ImperialUSSystem": 1,
- "ImperialUKSystem": 2
- }
- }
- Enum {
- name: "FormatType"
- values: {
- "LongFormat": 0,
- "ShortFormat": 1,
- "NarrowFormat": 2
- }
- }
- Enum {
- name: "CurrencySymbolFormat"
- values: {
- "CurrencyIsoCode": 0,
- "CurrencySymbol": 1,
- "CurrencyDisplayName": 2
- }
- }
- Enum {
- name: "DayOfWeek"
- values: {
- "Sunday": 0,
- "Monday": 1,
- "Tuesday": 2,
- "Wednesday": 3,
- "Thursday": 4,
- "Friday": 5,
- "Saturday": 6
- }
- }
- }
- Component {
name: "QQmlObjectModel"
defaultProperty: "children"
prototype: "QQmlInstanceModel"
@@ -728,6 +673,48 @@ Module {
exportMetaObjectRevisions: [0]
attachedType: "QQmlObjectModelAttached"
Property { name: "children"; type: "QObject"; isList: true; isReadonly: true }
+ Method { name: "clear"; revision: 3 }
+ Method {
+ name: "get"
+ revision: 3
+ type: "QObject*"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "append"
+ revision: 3
+ Parameter { name: "object"; type: "QObject"; isPointer: true }
+ }
+ Method {
+ name: "insert"
+ revision: 3
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "object"; type: "QObject"; isPointer: true }
+ }
+ Method {
+ name: "move"
+ revision: 3
+ Parameter { name: "from"; type: "int" }
+ Parameter { name: "to"; type: "int" }
+ Parameter { name: "n"; type: "int" }
+ }
+ Method {
+ name: "move"
+ revision: 3
+ Parameter { name: "from"; type: "int" }
+ Parameter { name: "to"; type: "int" }
+ }
+ Method {
+ name: "remove"
+ revision: 3
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "n"; type: "int" }
+ }
+ Method {
+ name: "remove"
+ revision: 3
+ Parameter { name: "index"; type: "int" }
+ }
}
Component {
name: "QQmlObjectModelAttached"
@@ -735,22 +722,6 @@ Module {
Property { name: "index"; type: "int"; isReadonly: true }
}
Component {
- name: "QQmlTimer"
- prototype: "QObject"
- exports: ["QtQml/Timer 2.0", "QtQuick/Timer 2.0"]
- exportMetaObjectRevisions: [0, 0]
- Property { name: "interval"; type: "int" }
- Property { name: "running"; type: "bool" }
- Property { name: "repeat"; type: "bool" }
- Property { name: "triggeredOnStart"; type: "bool" }
- Property { name: "parent"; type: "QObject"; isReadonly: true; isPointer: true }
- Signal { name: "triggered" }
- Method { name: "start" }
- Method { name: "stop" }
- Method { name: "restart" }
- }
- Component { name: "QQmlValueType"; prototype: "QObject" }
- Component {
name: "QQuickAbstractAnimation"
prototype: "QObject"
exports: ["QtQuick/Animation 2.0"]
@@ -880,6 +851,12 @@ Module {
Signal { name: "toggleAction" }
Signal { name: "increaseAction" }
Signal { name: "decreaseAction" }
+ Signal { name: "scrollUpAction" }
+ Signal { name: "scrollDownAction" }
+ Signal { name: "scrollLeftAction" }
+ Signal { name: "scrollRightAction" }
+ Signal { name: "previousPageAction" }
+ Signal { name: "nextPageAction" }
Method { name: "valueChanged" }
Method { name: "cursorPositionChanged" }
Method {
@@ -1188,14 +1165,24 @@ Module {
name: "QQuickBasePositioner"
defaultProperty: "data"
prototype: "QQuickImplicitSizeItem"
- exports: ["QtQuick/Positioner 2.0"]
+ exports: ["QtQuick/Positioner 2.0", "QtQuick/Positioner 2.6"]
isCreatable: false
- exportMetaObjectRevisions: [0]
+ exportMetaObjectRevisions: [0, 6]
attachedType: "QQuickPositionerAttached"
Property { name: "spacing"; type: "double" }
Property { name: "populate"; type: "QQuickTransition"; isPointer: true }
Property { name: "move"; type: "QQuickTransition"; isPointer: true }
Property { name: "add"; type: "QQuickTransition"; isPointer: true }
+ Property { name: "padding"; revision: 6; type: "double" }
+ Property { name: "topPadding"; revision: 6; type: "double" }
+ Property { name: "leftPadding"; revision: 6; type: "double" }
+ Property { name: "rightPadding"; revision: 6; type: "double" }
+ Property { name: "bottomPadding"; revision: 6; type: "double" }
+ Signal { name: "paddingChanged"; revision: 6 }
+ Signal { name: "topPaddingChanged"; revision: 6 }
+ Signal { name: "leftPaddingChanged"; revision: 6 }
+ Signal { name: "rightPaddingChanged"; revision: 6 }
+ Signal { name: "bottomPaddingChanged"; revision: 6 }
}
Component {
name: "QQuickBehavior"
@@ -1330,8 +1317,8 @@ Module {
name: "QQuickColumn"
defaultProperty: "data"
prototype: "QQuickBasePositioner"
- exports: ["QtQuick/Column 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtQuick/Column 2.0", "QtQuick/Column 2.6"]
+ exportMetaObjectRevisions: [0, 6]
}
Component {
name: "QQuickCurve"
@@ -1469,6 +1456,10 @@ Module {
Parameter { type: "QQmlV4Function"; isPointer: true }
}
Method {
+ name: "getDataAsArrayBuffer"
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
name: "acceptProposedAction"
Parameter { type: "QQmlV4Function"; isPointer: true }
}
@@ -1478,6 +1469,14 @@ Module {
}
}
Component {
+ name: "QQuickEnterKeyAttached"
+ prototype: "QObject"
+ exports: ["QtQuick/EnterKey 2.6"]
+ isCreatable: false
+ exportMetaObjectRevisions: [6]
+ Property { name: "type"; type: "Qt::EnterKeyType" }
+ }
+ Component {
name: "QQuickFlickable"
defaultProperty: "flickableData"
prototype: "QQuickItem"
@@ -1488,7 +1487,8 @@ Module {
values: {
"StopAtBounds": 0,
"DragOverBounds": 1,
- "DragAndOvershootBounds": 2
+ "OvershootBounds": 2,
+ "DragAndOvershootBounds": 3
}
}
Enum {
@@ -1608,8 +1608,8 @@ Module {
name: "QQuickFlow"
defaultProperty: "data"
prototype: "QQuickBasePositioner"
- exports: ["QtQuick/Flow 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtQuick/Flow 2.0", "QtQuick/Flow 2.6"]
+ exportMetaObjectRevisions: [0, 6]
Enum {
name: "Flow"
values: {
@@ -1703,17 +1703,20 @@ Module {
}
Component {
name: "QQuickFontValueType"
- prototype: "QQmlValueType"
exports: ["QtQuick/Font 2.0"]
isCreatable: false
exportMetaObjectRevisions: [0]
Enum {
name: "FontWeight"
values: {
+ "Thin": 0,
+ "ExtraLight": 12,
"Light": 25,
"Normal": 50,
+ "Medium": 57,
"DemiBold": 63,
"Bold": 75,
+ "ExtraBold": 81,
"Black": 87
}
}
@@ -1740,6 +1743,7 @@ Module {
Property { name: "capitalization"; type: "Capitalization" }
Property { name: "letterSpacing"; type: "double" }
Property { name: "wordSpacing"; type: "double" }
+ Method { name: "toString"; type: "string" }
}
Component {
name: "QQuickGrabGestureEvent"
@@ -1769,8 +1773,8 @@ Module {
name: "QQuickGrid"
defaultProperty: "data"
prototype: "QQuickBasePositioner"
- exports: ["QtQuick/Grid 2.0", "QtQuick/Grid 2.1"]
- exportMetaObjectRevisions: [0, 1]
+ exports: ["QtQuick/Grid 2.0", "QtQuick/Grid 2.1", "QtQuick/Grid 2.6"]
+ exportMetaObjectRevisions: [0, 1, 6]
Enum {
name: "Flow"
values: {
@@ -1869,8 +1873,12 @@ Module {
name: "QQuickImage"
defaultProperty: "data"
prototype: "QQuickImageBase"
- exports: ["QtQuick/Image 2.0", "QtQuick/Image 2.3"]
- exportMetaObjectRevisions: [0, 1]
+ exports: [
+ "QtQuick/Image 2.0",
+ "QtQuick/Image 2.3",
+ "QtQuick/Image 2.5"
+ ]
+ exportMetaObjectRevisions: [0, 1, 2]
Enum {
name: "HAlignment"
values: {
@@ -1905,6 +1913,7 @@ Module {
Property { name: "horizontalAlignment"; type: "HAlignment" }
Property { name: "verticalAlignment"; type: "VAlignment" }
Property { name: "mipmap"; revision: 1; type: "bool" }
+ Property { name: "autoTransform"; revision: 2; type: "bool" }
Signal { name: "paintedGeometryChanged" }
Signal {
name: "horizontalAlignmentChanged"
@@ -1919,6 +1928,7 @@ Module {
revision: 1
Parameter { type: "bool" }
}
+ Signal { name: "autoTransformChanged"; revision: 2 }
}
Component {
name: "QQuickImageBase"
@@ -2150,6 +2160,7 @@ Module {
Property { name: "format"; type: "QQuickShaderEffectSource::Format" }
Property { name: "samplerName"; type: "QByteArray" }
Property { name: "effect"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "textureMirroring"; type: "QQuickShaderEffectSource::TextureMirroring" }
Signal {
name: "enabledChanged"
Parameter { name: "enabled"; type: "bool" }
@@ -2186,6 +2197,10 @@ Module {
name: "sourceRectChanged"
Parameter { name: "sourceRect"; type: "QRectF" }
}
+ Signal {
+ name: "textureMirroringChanged"
+ Parameter { name: "mirroring"; type: "QQuickShaderEffectSource::TextureMirroring" }
+ }
}
Component {
name: "QQuickItemView"
@@ -2624,13 +2639,18 @@ Module {
name: "QQuickMouseArea"
defaultProperty: "data"
prototype: "QQuickItem"
- exports: ["QtQuick/MouseArea 2.0", "QtQuick/MouseArea 2.4"]
- exportMetaObjectRevisions: [0, 1]
+ exports: [
+ "QtQuick/MouseArea 2.0",
+ "QtQuick/MouseArea 2.4",
+ "QtQuick/MouseArea 2.5"
+ ]
+ exportMetaObjectRevisions: [0, 1, 2]
Property { name: "mouseX"; type: "double"; isReadonly: true }
Property { name: "mouseY"; type: "double"; isReadonly: true }
Property { name: "containsMouse"; type: "bool"; isReadonly: true }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "enabled"; type: "bool" }
+ Property { name: "scrollGestureEnabled"; revision: 2; type: "bool" }
Property { name: "pressedButtons"; type: "Qt::MouseButtons"; isReadonly: true }
Property { name: "acceptedButtons"; type: "Qt::MouseButtons" }
Property { name: "hoverEnabled"; type: "bool" }
@@ -2640,6 +2660,7 @@ Module {
Property { name: "cursorShape"; type: "Qt::CursorShape" }
Property { name: "containsPress"; revision: 1; type: "bool"; isReadonly: true }
Signal { name: "hoveredChanged" }
+ Signal { name: "scrollGestureEnabledChanged"; revision: 2 }
Signal {
name: "positionChanged"
Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }
@@ -2682,18 +2703,6 @@ Module {
Signal { name: "containsPressChanged"; revision: 1 }
}
Component {
- name: "QQuickMouseEvent"
- prototype: "QObject"
- Property { name: "x"; type: "double"; isReadonly: true }
- Property { name: "y"; type: "double"; isReadonly: true }
- Property { name: "button"; type: "int"; isReadonly: true }
- Property { name: "buttons"; type: "int"; isReadonly: true }
- Property { name: "modifiers"; type: "int"; isReadonly: true }
- Property { name: "wasHeld"; type: "bool"; isReadonly: true }
- Property { name: "isClick"; type: "bool"; isReadonly: true }
- Property { name: "accepted"; type: "bool" }
- }
- Component {
name: "QQuickMultiPointTouchArea"
defaultProperty: "data"
prototype: "QQuickItem"
@@ -2802,6 +2811,7 @@ Module {
Property { name: "fillColor"; type: "QColor" }
Property { name: "contentsScale"; type: "double" }
Property { name: "renderTarget"; type: "RenderTarget" }
+ Property { name: "textureSize"; type: "QSize" }
}
Component {
name: "QQuickParallelAnimation"
@@ -3132,8 +3142,8 @@ Module {
name: "QQuickPinchArea"
defaultProperty: "data"
prototype: "QQuickItem"
- exports: ["QtQuick/PinchArea 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtQuick/PinchArea 2.0", "QtQuick/PinchArea 2.5"]
+ exportMetaObjectRevisions: [0, 1]
Property { name: "enabled"; type: "bool" }
Property { name: "pinch"; type: "QQuickPinch"; isReadonly: true; isPointer: true }
Signal {
@@ -3148,6 +3158,11 @@ Module {
name: "pinchFinished"
Parameter { name: "pinch"; type: "QQuickPinchEvent"; isPointer: true }
}
+ Signal {
+ name: "smartZoom"
+ revision: 1
+ Parameter { name: "pinch"; type: "QQuickPinchEvent"; isPointer: true }
+ }
}
Component {
name: "QQuickPinchEvent"
@@ -3325,8 +3340,8 @@ Module {
name: "QQuickRow"
defaultProperty: "data"
prototype: "QQuickBasePositioner"
- exports: ["QtQuick/Row 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtQuick/Row 2.0", "QtQuick/Row 2.6"]
+ exportMetaObjectRevisions: [0, 6]
Property { name: "layoutDirection"; type: "Qt::LayoutDirection" }
Property { name: "effectiveLayoutDirection"; type: "Qt::LayoutDirection"; isReadonly: true }
}
@@ -3414,8 +3429,11 @@ Module {
name: "QQuickShaderEffectSource"
defaultProperty: "data"
prototype: "QQuickItem"
- exports: ["QtQuick/ShaderEffectSource 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick/ShaderEffectSource 2.0",
+ "QtQuick/ShaderEffectSource 2.6"
+ ]
+ exportMetaObjectRevisions: [0, 1]
Enum {
name: "WrapMode"
values: {
@@ -3433,6 +3451,14 @@ Module {
"RGBA": 6408
}
}
+ Enum {
+ name: "TextureMirroring"
+ values: {
+ "NoMirroring": 0,
+ "MirrorHorizontally": 1,
+ "MirrorVertically": 2
+ }
+ }
Property { name: "wrapMode"; type: "WrapMode" }
Property { name: "sourceItem"; type: "QQuickItem"; isPointer: true }
Property { name: "sourceRect"; type: "QRectF" }
@@ -3442,10 +3468,24 @@ Module {
Property { name: "hideSource"; type: "bool" }
Property { name: "mipmap"; type: "bool" }
Property { name: "recursive"; type: "bool" }
+ Property { name: "textureMirroring"; revision: 1; type: "TextureMirroring" }
Signal { name: "scheduledUpdateCompleted" }
Method { name: "scheduleUpdate" }
}
Component {
+ name: "QQuickShortcut"
+ prototype: "QObject"
+ exports: ["QtQuick/Shortcut 2.5", "QtQuick/Shortcut 2.6"]
+ exportMetaObjectRevisions: [0, 1]
+ Property { name: "sequence"; type: "QVariant" }
+ Property { name: "sequenceString"; revision: 1; type: "string"; isReadonly: true }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "autoRepeat"; type: "bool" }
+ Property { name: "context"; type: "Qt::ShortcutContext" }
+ Signal { name: "activated" }
+ Signal { name: "activatedAmbiguously" }
+ }
+ Component {
name: "QQuickSmoothedAnimation"
prototype: "QQuickNumberAnimation"
exports: ["QtQuick/SmoothedAnimation 2.0"]
@@ -3756,8 +3796,13 @@ Module {
name: "QQuickText"
defaultProperty: "data"
prototype: "QQuickImplicitSizeItem"
- exports: ["QtQuick/Text 2.0", "QtQuick/Text 2.2", "QtQuick/Text 2.3"]
- exportMetaObjectRevisions: [0, 2, 3]
+ exports: [
+ "QtQuick/Text 2.0",
+ "QtQuick/Text 2.2",
+ "QtQuick/Text 2.3",
+ "QtQuick/Text 2.6"
+ ]
+ exportMetaObjectRevisions: [0, 2, 3, 6]
Enum {
name: "HAlignment"
values: {
@@ -3862,6 +3907,11 @@ Module {
Property { name: "fontSizeMode"; type: "FontSizeMode" }
Property { name: "renderType"; type: "RenderType" }
Property { name: "hoveredLink"; revision: 2; type: "string"; isReadonly: true }
+ Property { name: "padding"; revision: 6; type: "double" }
+ Property { name: "topPadding"; revision: 6; type: "double" }
+ Property { name: "leftPadding"; revision: 6; type: "double" }
+ Property { name: "rightPadding"; revision: 6; type: "double" }
+ Property { name: "bottomPadding"; revision: 6; type: "double" }
Signal {
name: "textChanged"
Parameter { name: "text"; type: "string" }
@@ -3912,6 +3962,11 @@ Module {
name: "lineLaidOut"
Parameter { name: "line"; type: "QQuickTextLine"; isPointer: true }
}
+ Signal { name: "paddingChanged"; revision: 6 }
+ Signal { name: "topPaddingChanged"; revision: 6 }
+ Signal { name: "leftPaddingChanged"; revision: 6 }
+ Signal { name: "rightPaddingChanged"; revision: 6 }
+ Signal { name: "bottomPaddingChanged"; revision: 6 }
Method { name: "doLayout" }
Method {
name: "linkAt"
@@ -3930,9 +3985,10 @@ Module {
"QtQuick/TextEdit 2.0",
"QtQuick/TextEdit 2.1",
"QtQuick/TextEdit 2.2",
- "QtQuick/TextEdit 2.3"
+ "QtQuick/TextEdit 2.3",
+ "QtQuick/TextEdit 2.6"
]
- exportMetaObjectRevisions: [0, 1, 2, 3]
+ exportMetaObjectRevisions: [0, 1, 2, 3, 6]
Enum {
name: "HAlignment"
values: {
@@ -4027,6 +4083,11 @@ Module {
isPointer: true
}
Property { name: "hoveredLink"; revision: 2; type: "string"; isReadonly: true }
+ Property { name: "padding"; revision: 6; type: "double" }
+ Property { name: "topPadding"; revision: 6; type: "double" }
+ Property { name: "leftPadding"; revision: 6; type: "double" }
+ Property { name: "rightPadding"; revision: 6; type: "double" }
+ Property { name: "bottomPadding"; revision: 6; type: "double" }
Signal { name: "contentSizeChanged" }
Signal {
name: "colorChanged"
@@ -4098,6 +4159,12 @@ Module {
revision: 2
Parameter { name: "link"; type: "string" }
}
+ Signal { name: "editingFinished"; revision: 6 }
+ Signal { name: "paddingChanged"; revision: 6 }
+ Signal { name: "topPaddingChanged"; revision: 6 }
+ Signal { name: "leftPaddingChanged"; revision: 6 }
+ Signal { name: "rightPaddingChanged"; revision: 6 }
+ Signal { name: "bottomPaddingChanged"; revision: 6 }
Method { name: "selectAll" }
Method { name: "selectWord" }
Method {
@@ -4186,9 +4253,10 @@ Module {
exports: [
"QtQuick/TextInput 2.0",
"QtQuick/TextInput 2.2",
- "QtQuick/TextInput 2.4"
+ "QtQuick/TextInput 2.4",
+ "QtQuick/TextInput 2.6"
]
- exportMetaObjectRevisions: [0, 2, 3]
+ exportMetaObjectRevisions: [0, 2, 3, 6]
Enum {
name: "EchoMode"
values: {
@@ -4284,6 +4352,11 @@ Module {
Property { name: "contentWidth"; type: "double"; isReadonly: true }
Property { name: "contentHeight"; type: "double"; isReadonly: true }
Property { name: "renderType"; type: "RenderType" }
+ Property { name: "padding"; revision: 6; type: "double" }
+ Property { name: "topPadding"; revision: 6; type: "double" }
+ Property { name: "leftPadding"; revision: 6; type: "double" }
+ Property { name: "rightPadding"; revision: 6; type: "double" }
+ Property { name: "bottomPadding"; revision: 6; type: "double" }
Signal { name: "accepted" }
Signal { name: "editingFinished"; revision: 2 }
Signal {
@@ -4340,6 +4413,11 @@ Module {
Parameter { name: "mode"; type: "SelectionMode" }
}
Signal { name: "contentSizeChanged" }
+ Signal { name: "paddingChanged"; revision: 6 }
+ Signal { name: "topPaddingChanged"; revision: 6 }
+ Signal { name: "leftPaddingChanged"; revision: 6 }
+ Signal { name: "rightPaddingChanged"; revision: 6 }
+ Signal { name: "bottomPaddingChanged"; revision: 6 }
Method { name: "selectAll" }
Method { name: "selectWord" }
Method {
@@ -4584,1515 +4662,4 @@ Module {
prototype: "QObject"
Signal { name: "changed" }
}
- Component {
- name: "Qt"
- Enum {
- name: "GlobalColor"
- values: {
- "color0": 0,
- "color1": 1,
- "black": 2,
- "white": 3,
- "darkGray": 4,
- "gray": 5,
- "lightGray": 6,
- "red": 7,
- "green": 8,
- "blue": 9,
- "cyan": 10,
- "magenta": 11,
- "yellow": 12,
- "darkRed": 13,
- "darkGreen": 14,
- "darkBlue": 15,
- "darkCyan": 16,
- "darkMagenta": 17,
- "darkYellow": 18,
- "transparent": 19
- }
- }
- Enum {
- name: "KeyboardModifiers"
- values: {
- "NoModifier": 0,
- "ShiftModifier": 33554432,
- "ControlModifier": 67108864,
- "AltModifier": 134217728,
- "MetaModifier": 268435456,
- "KeypadModifier": 536870912,
- "GroupSwitchModifier": 1073741824,
- "KeyboardModifierMask": -33554432
- }
- }
- Enum {
- name: "MouseButtons"
- values: {
- "NoButton": 0,
- "LeftButton": 1,
- "RightButton": 2,
- "MidButton": 4,
- "MiddleButton": 4,
- "BackButton": 8,
- "XButton1": 8,
- "ExtraButton1": 8,
- "ForwardButton": 16,
- "XButton2": 16,
- "ExtraButton2": 16,
- "TaskButton": 32,
- "ExtraButton3": 32,
- "ExtraButton4": 64,
- "ExtraButton5": 128,
- "ExtraButton6": 256,
- "ExtraButton7": 512,
- "ExtraButton8": 1024,
- "ExtraButton9": 2048,
- "ExtraButton10": 4096,
- "ExtraButton11": 8192,
- "ExtraButton12": 16384,
- "ExtraButton13": 32768,
- "ExtraButton14": 65536,
- "ExtraButton15": 131072,
- "ExtraButton16": 262144,
- "ExtraButton17": 524288,
- "ExtraButton18": 1048576,
- "ExtraButton19": 2097152,
- "ExtraButton20": 4194304,
- "ExtraButton21": 8388608,
- "ExtraButton22": 16777216,
- "ExtraButton23": 33554432,
- "ExtraButton24": 67108864,
- "AllButtons": 134217727,
- "MaxMouseButton": 67108864,
- "MouseButtonMask": -1
- }
- }
- Enum {
- name: "Orientation"
- values: {
- "Horizontal": 1,
- "Vertical": 2
- }
- }
- Enum {
- name: "Orientations"
- values: {
- "Horizontal": 1,
- "Vertical": 2
- }
- }
- Enum {
- name: "FocusPolicy"
- values: {
- "NoFocus": 0,
- "TabFocus": 1,
- "ClickFocus": 2,
- "StrongFocus": 11,
- "WheelFocus": 15
- }
- }
- Enum {
- name: "SortOrder"
- values: {
- "AscendingOrder": 0,
- "DescendingOrder": 1
- }
- }
- Enum {
- name: "Alignment"
- values: {
- "AlignLeft": 1,
- "AlignLeading": 1,
- "AlignRight": 2,
- "AlignTrailing": 2,
- "AlignHCenter": 4,
- "AlignJustify": 8,
- "AlignAbsolute": 16,
- "AlignHorizontal_Mask": 31,
- "AlignTop": 32,
- "AlignBottom": 64,
- "AlignVCenter": 128,
- "AlignBaseline": 256,
- "AlignVertical_Mask": 480,
- "AlignCenter": 132
- }
- }
- Enum {
- name: "TextElideMode"
- values: {
- "ElideLeft": 0,
- "ElideRight": 1,
- "ElideMiddle": 2,
- "ElideNone": 3
- }
- }
- Enum {
- name: "WindowType"
- values: {
- "Widget": 0,
- "Window": 1,
- "Dialog": 3,
- "Sheet": 5,
- "Drawer": 7,
- "Popup": 9,
- "Tool": 11,
- "ToolTip": 13,
- "SplashScreen": 15,
- "Desktop": 17,
- "SubWindow": 18,
- "ForeignWindow": 33,
- "CoverWindow": 65,
- "WindowType_Mask": 255,
- "MSWindowsFixedSizeDialogHint": 256,
- "MSWindowsOwnDC": 512,
- "BypassWindowManagerHint": 1024,
- "X11BypassWindowManagerHint": 1024,
- "FramelessWindowHint": 2048,
- "WindowTitleHint": 4096,
- "WindowSystemMenuHint": 8192,
- "WindowMinimizeButtonHint": 16384,
- "WindowMaximizeButtonHint": 32768,
- "WindowMinMaxButtonsHint": 49152,
- "WindowContextHelpButtonHint": 65536,
- "WindowShadeButtonHint": 131072,
- "WindowStaysOnTopHint": 262144,
- "WindowTransparentForInput": 524288,
- "WindowOverridesSystemGestures": 1048576,
- "WindowDoesNotAcceptFocus": 2097152,
- "CustomizeWindowHint": 33554432,
- "WindowStaysOnBottomHint": 67108864,
- "WindowCloseButtonHint": 134217728,
- "MacWindowToolBarButtonHint": 268435456,
- "BypassGraphicsProxyWidget": 536870912,
- "WindowOkButtonHint": 524288,
- "WindowCancelButtonHint": 1048576,
- "NoDropShadowWindowHint": 1073741824,
- "WindowFullscreenButtonHint": -2147483648
- }
- }
- Enum {
- name: "WindowFlags"
- values: {
- "Widget": 0,
- "Window": 1,
- "Dialog": 3,
- "Sheet": 5,
- "Drawer": 7,
- "Popup": 9,
- "Tool": 11,
- "ToolTip": 13,
- "SplashScreen": 15,
- "Desktop": 17,
- "SubWindow": 18,
- "ForeignWindow": 33,
- "CoverWindow": 65,
- "WindowType_Mask": 255,
- "MSWindowsFixedSizeDialogHint": 256,
- "MSWindowsOwnDC": 512,
- "BypassWindowManagerHint": 1024,
- "X11BypassWindowManagerHint": 1024,
- "FramelessWindowHint": 2048,
- "WindowTitleHint": 4096,
- "WindowSystemMenuHint": 8192,
- "WindowMinimizeButtonHint": 16384,
- "WindowMaximizeButtonHint": 32768,
- "WindowMinMaxButtonsHint": 49152,
- "WindowContextHelpButtonHint": 65536,
- "WindowShadeButtonHint": 131072,
- "WindowStaysOnTopHint": 262144,
- "WindowTransparentForInput": 524288,
- "WindowOverridesSystemGestures": 1048576,
- "WindowDoesNotAcceptFocus": 2097152,
- "CustomizeWindowHint": 33554432,
- "WindowStaysOnBottomHint": 67108864,
- "WindowCloseButtonHint": 134217728,
- "MacWindowToolBarButtonHint": 268435456,
- "BypassGraphicsProxyWidget": 536870912,
- "WindowOkButtonHint": 524288,
- "WindowCancelButtonHint": 1048576,
- "NoDropShadowWindowHint": 1073741824,
- "WindowFullscreenButtonHint": -2147483648
- }
- }
- Enum {
- name: "WindowState"
- values: {
- "WindowNoState": 0,
- "WindowMinimized": 1,
- "WindowMaximized": 2,
- "WindowFullScreen": 4,
- "WindowActive": 8
- }
- }
- Enum {
- name: "WindowStates"
- values: {
- "WindowNoState": 0,
- "WindowMinimized": 1,
- "WindowMaximized": 2,
- "WindowFullScreen": 4,
- "WindowActive": 8
- }
- }
- Enum {
- name: "ApplicationState"
- values: {
- "ApplicationSuspended": 0,
- "ApplicationHidden": 1,
- "ApplicationInactive": 2,
- "ApplicationActive": 4
- }
- }
- Enum {
- name: "ScreenOrientation"
- values: {
- "PrimaryOrientation": 0,
- "PortraitOrientation": 1,
- "LandscapeOrientation": 2,
- "InvertedPortraitOrientation": 4,
- "InvertedLandscapeOrientation": 8
- }
- }
- Enum {
- name: "ScreenOrientations"
- values: {
- "PrimaryOrientation": 0,
- "PortraitOrientation": 1,
- "LandscapeOrientation": 2,
- "InvertedPortraitOrientation": 4,
- "InvertedLandscapeOrientation": 8
- }
- }
- Enum {
- name: "WidgetAttribute"
- values: {
- "WA_Disabled": 0,
- "WA_UnderMouse": 1,
- "WA_MouseTracking": 2,
- "WA_ContentsPropagated": 3,
- "WA_OpaquePaintEvent": 4,
- "WA_NoBackground": 4,
- "WA_StaticContents": 5,
- "WA_LaidOut": 7,
- "WA_PaintOnScreen": 8,
- "WA_NoSystemBackground": 9,
- "WA_UpdatesDisabled": 10,
- "WA_Mapped": 11,
- "WA_MacNoClickThrough": 12,
- "WA_InputMethodEnabled": 14,
- "WA_WState_Visible": 15,
- "WA_WState_Hidden": 16,
- "WA_ForceDisabled": 32,
- "WA_KeyCompression": 33,
- "WA_PendingMoveEvent": 34,
- "WA_PendingResizeEvent": 35,
- "WA_SetPalette": 36,
- "WA_SetFont": 37,
- "WA_SetCursor": 38,
- "WA_NoChildEventsFromChildren": 39,
- "WA_WindowModified": 41,
- "WA_Resized": 42,
- "WA_Moved": 43,
- "WA_PendingUpdate": 44,
- "WA_InvalidSize": 45,
- "WA_MacBrushedMetal": 46,
- "WA_MacMetalStyle": 46,
- "WA_CustomWhatsThis": 47,
- "WA_LayoutOnEntireRect": 48,
- "WA_OutsideWSRange": 49,
- "WA_GrabbedShortcut": 50,
- "WA_TransparentForMouseEvents": 51,
- "WA_PaintUnclipped": 52,
- "WA_SetWindowIcon": 53,
- "WA_NoMouseReplay": 54,
- "WA_DeleteOnClose": 55,
- "WA_RightToLeft": 56,
- "WA_SetLayoutDirection": 57,
- "WA_NoChildEventsForParent": 58,
- "WA_ForceUpdatesDisabled": 59,
- "WA_WState_Created": 60,
- "WA_WState_CompressKeys": 61,
- "WA_WState_InPaintEvent": 62,
- "WA_WState_Reparented": 63,
- "WA_WState_ConfigPending": 64,
- "WA_WState_Polished": 66,
- "WA_WState_DND": 67,
- "WA_WState_OwnSizePolicy": 68,
- "WA_WState_ExplicitShowHide": 69,
- "WA_ShowModal": 70,
- "WA_MouseNoMask": 71,
- "WA_GroupLeader": 72,
- "WA_NoMousePropagation": 73,
- "WA_Hover": 74,
- "WA_InputMethodTransparent": 75,
- "WA_QuitOnClose": 76,
- "WA_KeyboardFocusChange": 77,
- "WA_AcceptDrops": 78,
- "WA_DropSiteRegistered": 79,
- "WA_ForceAcceptDrops": 79,
- "WA_WindowPropagation": 80,
- "WA_NoX11EventCompression": 81,
- "WA_TintedBackground": 82,
- "WA_X11OpenGLOverlay": 83,
- "WA_AlwaysShowToolTips": 84,
- "WA_MacOpaqueSizeGrip": 85,
- "WA_SetStyle": 86,
- "WA_SetLocale": 87,
- "WA_MacShowFocusRect": 88,
- "WA_MacNormalSize": 89,
- "WA_MacSmallSize": 90,
- "WA_MacMiniSize": 91,
- "WA_LayoutUsesWidgetRect": 92,
- "WA_StyledBackground": 93,
- "WA_MSWindowsUseDirect3D": 94,
- "WA_CanHostQMdiSubWindowTitleBar": 95,
- "WA_MacAlwaysShowToolWindow": 96,
- "WA_StyleSheet": 97,
- "WA_ShowWithoutActivating": 98,
- "WA_X11BypassTransientForHint": 99,
- "WA_NativeWindow": 100,
- "WA_DontCreateNativeAncestors": 101,
- "WA_MacVariableSize": 102,
- "WA_DontShowOnScreen": 103,
- "WA_X11NetWmWindowTypeDesktop": 104,
- "WA_X11NetWmWindowTypeDock": 105,
- "WA_X11NetWmWindowTypeToolBar": 106,
- "WA_X11NetWmWindowTypeMenu": 107,
- "WA_X11NetWmWindowTypeUtility": 108,
- "WA_X11NetWmWindowTypeSplash": 109,
- "WA_X11NetWmWindowTypeDialog": 110,
- "WA_X11NetWmWindowTypeDropDownMenu": 111,
- "WA_X11NetWmWindowTypePopupMenu": 112,
- "WA_X11NetWmWindowTypeToolTip": 113,
- "WA_X11NetWmWindowTypeNotification": 114,
- "WA_X11NetWmWindowTypeCombo": 115,
- "WA_X11NetWmWindowTypeDND": 116,
- "WA_MacFrameworkScaled": 117,
- "WA_SetWindowModality": 118,
- "WA_WState_WindowOpacitySet": 119,
- "WA_TranslucentBackground": 120,
- "WA_AcceptTouchEvents": 121,
- "WA_WState_AcceptedTouchBeginEvent": 122,
- "WA_TouchPadAcceptSingleTouchEvents": 123,
- "WA_X11DoNotAcceptFocus": 126,
- "WA_MacNoShadow": 127,
- "WA_AlwaysStackOnTop": 128,
- "WA_AttributeCount": 129
- }
- }
- Enum {
- name: "ApplicationAttribute"
- values: {
- "AA_ImmediateWidgetCreation": 0,
- "AA_MSWindowsUseDirect3DByDefault": 1,
- "AA_DontShowIconsInMenus": 2,
- "AA_NativeWindows": 3,
- "AA_DontCreateNativeWidgetSiblings": 4,
- "AA_MacPluginApplication": 5,
- "AA_DontUseNativeMenuBar": 6,
- "AA_MacDontSwapCtrlAndMeta": 7,
- "AA_Use96Dpi": 8,
- "AA_X11InitThreads": 10,
- "AA_SynthesizeTouchForUnhandledMouseEvents": 11,
- "AA_SynthesizeMouseForUnhandledTouchEvents": 12,
- "AA_UseHighDpiPixmaps": 13,
- "AA_ForceRasterWidgets": 14,
- "AA_UseDesktopOpenGL": 15,
- "AA_UseOpenGLES": 16,
- "AA_UseSoftwareOpenGL": 17,
- "AA_ShareOpenGLContexts": 18,
- "AA_AttributeCount": 19
- }
- }
- Enum {
- name: "ImageConversionFlags"
- values: {
- "ColorMode_Mask": 3,
- "AutoColor": 0,
- "ColorOnly": 3,
- "MonoOnly": 2,
- "AlphaDither_Mask": 12,
- "ThresholdAlphaDither": 0,
- "OrderedAlphaDither": 4,
- "DiffuseAlphaDither": 8,
- "NoAlpha": 12,
- "Dither_Mask": 48,
- "DiffuseDither": 0,
- "OrderedDither": 16,
- "ThresholdDither": 32,
- "DitherMode_Mask": 192,
- "AutoDither": 0,
- "PreferDither": 64,
- "AvoidDither": 128,
- "NoOpaqueDetection": 256,
- "NoFormatConversion": 512
- }
- }
- Enum {
- name: "BGMode"
- values: {
- "TransparentMode": 0,
- "OpaqueMode": 1
- }
- }
- Enum {
- name: "Key"
- values: {
- "Key_Escape": 16777216,
- "Key_Tab": 16777217,
- "Key_Backtab": 16777218,
- "Key_Backspace": 16777219,
- "Key_Return": 16777220,
- "Key_Enter": 16777221,
- "Key_Insert": 16777222,
- "Key_Delete": 16777223,
- "Key_Pause": 16777224,
- "Key_Print": 16777225,
- "Key_SysReq": 16777226,
- "Key_Clear": 16777227,
- "Key_Home": 16777232,
- "Key_End": 16777233,
- "Key_Left": 16777234,
- "Key_Up": 16777235,
- "Key_Right": 16777236,
- "Key_Down": 16777237,
- "Key_PageUp": 16777238,
- "Key_PageDown": 16777239,
- "Key_Shift": 16777248,
- "Key_Control": 16777249,
- "Key_Meta": 16777250,
- "Key_Alt": 16777251,
- "Key_CapsLock": 16777252,
- "Key_NumLock": 16777253,
- "Key_ScrollLock": 16777254,
- "Key_F1": 16777264,
- "Key_F2": 16777265,
- "Key_F3": 16777266,
- "Key_F4": 16777267,
- "Key_F5": 16777268,
- "Key_F6": 16777269,
- "Key_F7": 16777270,
- "Key_F8": 16777271,
- "Key_F9": 16777272,
- "Key_F10": 16777273,
- "Key_F11": 16777274,
- "Key_F12": 16777275,
- "Key_F13": 16777276,
- "Key_F14": 16777277,
- "Key_F15": 16777278,
- "Key_F16": 16777279,
- "Key_F17": 16777280,
- "Key_F18": 16777281,
- "Key_F19": 16777282,
- "Key_F20": 16777283,
- "Key_F21": 16777284,
- "Key_F22": 16777285,
- "Key_F23": 16777286,
- "Key_F24": 16777287,
- "Key_F25": 16777288,
- "Key_F26": 16777289,
- "Key_F27": 16777290,
- "Key_F28": 16777291,
- "Key_F29": 16777292,
- "Key_F30": 16777293,
- "Key_F31": 16777294,
- "Key_F32": 16777295,
- "Key_F33": 16777296,
- "Key_F34": 16777297,
- "Key_F35": 16777298,
- "Key_Super_L": 16777299,
- "Key_Super_R": 16777300,
- "Key_Menu": 16777301,
- "Key_Hyper_L": 16777302,
- "Key_Hyper_R": 16777303,
- "Key_Help": 16777304,
- "Key_Direction_L": 16777305,
- "Key_Direction_R": 16777312,
- "Key_Space": 32,
- "Key_Any": 32,
- "Key_Exclam": 33,
- "Key_QuoteDbl": 34,
- "Key_NumberSign": 35,
- "Key_Dollar": 36,
- "Key_Percent": 37,
- "Key_Ampersand": 38,
- "Key_Apostrophe": 39,
- "Key_ParenLeft": 40,
- "Key_ParenRight": 41,
- "Key_Asterisk": 42,
- "Key_Plus": 43,
- "Key_Comma": 44,
- "Key_Minus": 45,
- "Key_Period": 46,
- "Key_Slash": 47,
- "Key_0": 48,
- "Key_1": 49,
- "Key_2": 50,
- "Key_3": 51,
- "Key_4": 52,
- "Key_5": 53,
- "Key_6": 54,
- "Key_7": 55,
- "Key_8": 56,
- "Key_9": 57,
- "Key_Colon": 58,
- "Key_Semicolon": 59,
- "Key_Less": 60,
- "Key_Equal": 61,
- "Key_Greater": 62,
- "Key_Question": 63,
- "Key_At": 64,
- "Key_A": 65,
- "Key_B": 66,
- "Key_C": 67,
- "Key_D": 68,
- "Key_E": 69,
- "Key_F": 70,
- "Key_G": 71,
- "Key_H": 72,
- "Key_I": 73,
- "Key_J": 74,
- "Key_K": 75,
- "Key_L": 76,
- "Key_M": 77,
- "Key_N": 78,
- "Key_O": 79,
- "Key_P": 80,
- "Key_Q": 81,
- "Key_R": 82,
- "Key_S": 83,
- "Key_T": 84,
- "Key_U": 85,
- "Key_V": 86,
- "Key_W": 87,
- "Key_X": 88,
- "Key_Y": 89,
- "Key_Z": 90,
- "Key_BracketLeft": 91,
- "Key_Backslash": 92,
- "Key_BracketRight": 93,
- "Key_AsciiCircum": 94,
- "Key_Underscore": 95,
- "Key_QuoteLeft": 96,
- "Key_BraceLeft": 123,
- "Key_Bar": 124,
- "Key_BraceRight": 125,
- "Key_AsciiTilde": 126,
- "Key_nobreakspace": 160,
- "Key_exclamdown": 161,
- "Key_cent": 162,
- "Key_sterling": 163,
- "Key_currency": 164,
- "Key_yen": 165,
- "Key_brokenbar": 166,
- "Key_section": 167,
- "Key_diaeresis": 168,
- "Key_copyright": 169,
- "Key_ordfeminine": 170,
- "Key_guillemotleft": 171,
- "Key_notsign": 172,
- "Key_hyphen": 173,
- "Key_registered": 174,
- "Key_macron": 175,
- "Key_degree": 176,
- "Key_plusminus": 177,
- "Key_twosuperior": 178,
- "Key_threesuperior": 179,
- "Key_acute": 180,
- "Key_mu": 181,
- "Key_paragraph": 182,
- "Key_periodcentered": 183,
- "Key_cedilla": 184,
- "Key_onesuperior": 185,
- "Key_masculine": 186,
- "Key_guillemotright": 187,
- "Key_onequarter": 188,
- "Key_onehalf": 189,
- "Key_threequarters": 190,
- "Key_questiondown": 191,
- "Key_Agrave": 192,
- "Key_Aacute": 193,
- "Key_Acircumflex": 194,
- "Key_Atilde": 195,
- "Key_Adiaeresis": 196,
- "Key_Aring": 197,
- "Key_AE": 198,
- "Key_Ccedilla": 199,
- "Key_Egrave": 200,
- "Key_Eacute": 201,
- "Key_Ecircumflex": 202,
- "Key_Ediaeresis": 203,
- "Key_Igrave": 204,
- "Key_Iacute": 205,
- "Key_Icircumflex": 206,
- "Key_Idiaeresis": 207,
- "Key_ETH": 208,
- "Key_Ntilde": 209,
- "Key_Ograve": 210,
- "Key_Oacute": 211,
- "Key_Ocircumflex": 212,
- "Key_Otilde": 213,
- "Key_Odiaeresis": 214,
- "Key_multiply": 215,
- "Key_Ooblique": 216,
- "Key_Ugrave": 217,
- "Key_Uacute": 218,
- "Key_Ucircumflex": 219,
- "Key_Udiaeresis": 220,
- "Key_Yacute": 221,
- "Key_THORN": 222,
- "Key_ssharp": 223,
- "Key_division": 247,
- "Key_ydiaeresis": 255,
- "Key_AltGr": 16781571,
- "Key_Multi_key": 16781600,
- "Key_Codeinput": 16781623,
- "Key_SingleCandidate": 16781628,
- "Key_MultipleCandidate": 16781629,
- "Key_PreviousCandidate": 16781630,
- "Key_Mode_switch": 16781694,
- "Key_Kanji": 16781601,
- "Key_Muhenkan": 16781602,
- "Key_Henkan": 16781603,
- "Key_Romaji": 16781604,
- "Key_Hiragana": 16781605,
- "Key_Katakana": 16781606,
- "Key_Hiragana_Katakana": 16781607,
- "Key_Zenkaku": 16781608,
- "Key_Hankaku": 16781609,
- "Key_Zenkaku_Hankaku": 16781610,
- "Key_Touroku": 16781611,
- "Key_Massyo": 16781612,
- "Key_Kana_Lock": 16781613,
- "Key_Kana_Shift": 16781614,
- "Key_Eisu_Shift": 16781615,
- "Key_Eisu_toggle": 16781616,
- "Key_Hangul": 16781617,
- "Key_Hangul_Start": 16781618,
- "Key_Hangul_End": 16781619,
- "Key_Hangul_Hanja": 16781620,
- "Key_Hangul_Jamo": 16781621,
- "Key_Hangul_Romaja": 16781622,
- "Key_Hangul_Jeonja": 16781624,
- "Key_Hangul_Banja": 16781625,
- "Key_Hangul_PreHanja": 16781626,
- "Key_Hangul_PostHanja": 16781627,
- "Key_Hangul_Special": 16781631,
- "Key_Dead_Grave": 16781904,
- "Key_Dead_Acute": 16781905,
- "Key_Dead_Circumflex": 16781906,
- "Key_Dead_Tilde": 16781907,
- "Key_Dead_Macron": 16781908,
- "Key_Dead_Breve": 16781909,
- "Key_Dead_Abovedot": 16781910,
- "Key_Dead_Diaeresis": 16781911,
- "Key_Dead_Abovering": 16781912,
- "Key_Dead_Doubleacute": 16781913,
- "Key_Dead_Caron": 16781914,
- "Key_Dead_Cedilla": 16781915,
- "Key_Dead_Ogonek": 16781916,
- "Key_Dead_Iota": 16781917,
- "Key_Dead_Voiced_Sound": 16781918,
- "Key_Dead_Semivoiced_Sound": 16781919,
- "Key_Dead_Belowdot": 16781920,
- "Key_Dead_Hook": 16781921,
- "Key_Dead_Horn": 16781922,
- "Key_Back": 16777313,
- "Key_Forward": 16777314,
- "Key_Stop": 16777315,
- "Key_Refresh": 16777316,
- "Key_VolumeDown": 16777328,
- "Key_VolumeMute": 16777329,
- "Key_VolumeUp": 16777330,
- "Key_BassBoost": 16777331,
- "Key_BassUp": 16777332,
- "Key_BassDown": 16777333,
- "Key_TrebleUp": 16777334,
- "Key_TrebleDown": 16777335,
- "Key_MediaPlay": 16777344,
- "Key_MediaStop": 16777345,
- "Key_MediaPrevious": 16777346,
- "Key_MediaNext": 16777347,
- "Key_MediaRecord": 16777348,
- "Key_MediaPause": 16777349,
- "Key_MediaTogglePlayPause": 16777350,
- "Key_HomePage": 16777360,
- "Key_Favorites": 16777361,
- "Key_Search": 16777362,
- "Key_Standby": 16777363,
- "Key_OpenUrl": 16777364,
- "Key_LaunchMail": 16777376,
- "Key_LaunchMedia": 16777377,
- "Key_Launch0": 16777378,
- "Key_Launch1": 16777379,
- "Key_Launch2": 16777380,
- "Key_Launch3": 16777381,
- "Key_Launch4": 16777382,
- "Key_Launch5": 16777383,
- "Key_Launch6": 16777384,
- "Key_Launch7": 16777385,
- "Key_Launch8": 16777386,
- "Key_Launch9": 16777387,
- "Key_LaunchA": 16777388,
- "Key_LaunchB": 16777389,
- "Key_LaunchC": 16777390,
- "Key_LaunchD": 16777391,
- "Key_LaunchE": 16777392,
- "Key_LaunchF": 16777393,
- "Key_MonBrightnessUp": 16777394,
- "Key_MonBrightnessDown": 16777395,
- "Key_KeyboardLightOnOff": 16777396,
- "Key_KeyboardBrightnessUp": 16777397,
- "Key_KeyboardBrightnessDown": 16777398,
- "Key_PowerOff": 16777399,
- "Key_WakeUp": 16777400,
- "Key_Eject": 16777401,
- "Key_ScreenSaver": 16777402,
- "Key_WWW": 16777403,
- "Key_Memo": 16777404,
- "Key_LightBulb": 16777405,
- "Key_Shop": 16777406,
- "Key_History": 16777407,
- "Key_AddFavorite": 16777408,
- "Key_HotLinks": 16777409,
- "Key_BrightnessAdjust": 16777410,
- "Key_Finance": 16777411,
- "Key_Community": 16777412,
- "Key_AudioRewind": 16777413,
- "Key_BackForward": 16777414,
- "Key_ApplicationLeft": 16777415,
- "Key_ApplicationRight": 16777416,
- "Key_Book": 16777417,
- "Key_CD": 16777418,
- "Key_Calculator": 16777419,
- "Key_ToDoList": 16777420,
- "Key_ClearGrab": 16777421,
- "Key_Close": 16777422,
- "Key_Copy": 16777423,
- "Key_Cut": 16777424,
- "Key_Display": 16777425,
- "Key_DOS": 16777426,
- "Key_Documents": 16777427,
- "Key_Excel": 16777428,
- "Key_Explorer": 16777429,
- "Key_Game": 16777430,
- "Key_Go": 16777431,
- "Key_iTouch": 16777432,
- "Key_LogOff": 16777433,
- "Key_Market": 16777434,
- "Key_Meeting": 16777435,
- "Key_MenuKB": 16777436,
- "Key_MenuPB": 16777437,
- "Key_MySites": 16777438,
- "Key_News": 16777439,
- "Key_OfficeHome": 16777440,
- "Key_Option": 16777441,
- "Key_Paste": 16777442,
- "Key_Phone": 16777443,
- "Key_Calendar": 16777444,
- "Key_Reply": 16777445,
- "Key_Reload": 16777446,
- "Key_RotateWindows": 16777447,
- "Key_RotationPB": 16777448,
- "Key_RotationKB": 16777449,
- "Key_Save": 16777450,
- "Key_Send": 16777451,
- "Key_Spell": 16777452,
- "Key_SplitScreen": 16777453,
- "Key_Support": 16777454,
- "Key_TaskPane": 16777455,
- "Key_Terminal": 16777456,
- "Key_Tools": 16777457,
- "Key_Travel": 16777458,
- "Key_Video": 16777459,
- "Key_Word": 16777460,
- "Key_Xfer": 16777461,
- "Key_ZoomIn": 16777462,
- "Key_ZoomOut": 16777463,
- "Key_Away": 16777464,
- "Key_Messenger": 16777465,
- "Key_WebCam": 16777466,
- "Key_MailForward": 16777467,
- "Key_Pictures": 16777468,
- "Key_Music": 16777469,
- "Key_Battery": 16777470,
- "Key_Bluetooth": 16777471,
- "Key_WLAN": 16777472,
- "Key_UWB": 16777473,
- "Key_AudioForward": 16777474,
- "Key_AudioRepeat": 16777475,
- "Key_AudioRandomPlay": 16777476,
- "Key_Subtitle": 16777477,
- "Key_AudioCycleTrack": 16777478,
- "Key_Time": 16777479,
- "Key_Hibernate": 16777480,
- "Key_View": 16777481,
- "Key_TopMenu": 16777482,
- "Key_PowerDown": 16777483,
- "Key_Suspend": 16777484,
- "Key_ContrastAdjust": 16777485,
- "Key_LaunchG": 16777486,
- "Key_LaunchH": 16777487,
- "Key_TouchpadToggle": 16777488,
- "Key_TouchpadOn": 16777489,
- "Key_TouchpadOff": 16777490,
- "Key_MicMute": 16777491,
- "Key_Red": 16777492,
- "Key_Green": 16777493,
- "Key_Yellow": 16777494,
- "Key_Blue": 16777495,
- "Key_ChannelUp": 16777496,
- "Key_ChannelDown": 16777497,
- "Key_Guide": 16777498,
- "Key_Info": 16777499,
- "Key_Settings": 16777500,
- "Key_MicVolumeUp": 16777501,
- "Key_MicVolumeDown": 16777502,
- "Key_New": 16777504,
- "Key_Open": 16777505,
- "Key_Find": 16777506,
- "Key_Undo": 16777507,
- "Key_Redo": 16777508,
- "Key_MediaLast": 16842751,
- "Key_Select": 16842752,
- "Key_Yes": 16842753,
- "Key_No": 16842754,
- "Key_Cancel": 16908289,
- "Key_Printer": 16908290,
- "Key_Execute": 16908291,
- "Key_Sleep": 16908292,
- "Key_Play": 16908293,
- "Key_Zoom": 16908294,
- "Key_Exit": 16908298,
- "Key_Context1": 17825792,
- "Key_Context2": 17825793,
- "Key_Context3": 17825794,
- "Key_Context4": 17825795,
- "Key_Call": 17825796,
- "Key_Hangup": 17825797,
- "Key_Flip": 17825798,
- "Key_ToggleCallHangup": 17825799,
- "Key_VoiceDial": 17825800,
- "Key_LastNumberRedial": 17825801,
- "Key_Camera": 17825824,
- "Key_CameraFocus": 17825825,
- "Key_unknown": 33554431
- }
- }
- Enum {
- name: "ArrowType"
- values: {
- "NoArrow": 0,
- "UpArrow": 1,
- "DownArrow": 2,
- "LeftArrow": 3,
- "RightArrow": 4
- }
- }
- Enum {
- name: "PenStyle"
- values: {
- "NoPen": 0,
- "SolidLine": 1,
- "DashLine": 2,
- "DotLine": 3,
- "DashDotLine": 4,
- "DashDotDotLine": 5,
- "CustomDashLine": 6
- }
- }
- Enum {
- name: "PenCapStyle"
- values: {
- "FlatCap": 0,
- "SquareCap": 16,
- "RoundCap": 32,
- "MPenCapStyle": 48
- }
- }
- Enum {
- name: "PenJoinStyle"
- values: {
- "MiterJoin": 0,
- "BevelJoin": 64,
- "RoundJoin": 128,
- "SvgMiterJoin": 256,
- "MPenJoinStyle": 448
- }
- }
- Enum {
- name: "BrushStyle"
- values: {
- "NoBrush": 0,
- "SolidPattern": 1,
- "Dense1Pattern": 2,
- "Dense2Pattern": 3,
- "Dense3Pattern": 4,
- "Dense4Pattern": 5,
- "Dense5Pattern": 6,
- "Dense6Pattern": 7,
- "Dense7Pattern": 8,
- "HorPattern": 9,
- "VerPattern": 10,
- "CrossPattern": 11,
- "BDiagPattern": 12,
- "FDiagPattern": 13,
- "DiagCrossPattern": 14,
- "LinearGradientPattern": 15,
- "RadialGradientPattern": 16,
- "ConicalGradientPattern": 17,
- "TexturePattern": 24
- }
- }
- Enum {
- name: "SizeMode"
- values: {
- "AbsoluteSize": 0,
- "RelativeSize": 1
- }
- }
- Enum {
- name: "CursorShape"
- values: {
- "ArrowCursor": 0,
- "UpArrowCursor": 1,
- "CrossCursor": 2,
- "WaitCursor": 3,
- "IBeamCursor": 4,
- "SizeVerCursor": 5,
- "SizeHorCursor": 6,
- "SizeBDiagCursor": 7,
- "SizeFDiagCursor": 8,
- "SizeAllCursor": 9,
- "BlankCursor": 10,
- "SplitVCursor": 11,
- "SplitHCursor": 12,
- "PointingHandCursor": 13,
- "ForbiddenCursor": 14,
- "WhatsThisCursor": 15,
- "BusyCursor": 16,
- "OpenHandCursor": 17,
- "ClosedHandCursor": 18,
- "DragCopyCursor": 19,
- "DragMoveCursor": 20,
- "DragLinkCursor": 21,
- "LastCursor": 21,
- "BitmapCursor": 24,
- "CustomCursor": 25
- }
- }
- Enum {
- name: "TextFormat"
- values: {
- "PlainText": 0,
- "RichText": 1,
- "AutoText": 2
- }
- }
- Enum {
- name: "AspectRatioMode"
- values: {
- "IgnoreAspectRatio": 0,
- "KeepAspectRatio": 1,
- "KeepAspectRatioByExpanding": 2
- }
- }
- Enum {
- name: "DockWidgetArea"
- values: {
- "LeftDockWidgetArea": 1,
- "RightDockWidgetArea": 2,
- "TopDockWidgetArea": 4,
- "BottomDockWidgetArea": 8,
- "DockWidgetArea_Mask": 15,
- "AllDockWidgetAreas": 15,
- "NoDockWidgetArea": 0
- }
- }
- Enum {
- name: "DockWidgetAreas"
- values: {
- "LeftDockWidgetArea": 1,
- "RightDockWidgetArea": 2,
- "TopDockWidgetArea": 4,
- "BottomDockWidgetArea": 8,
- "DockWidgetArea_Mask": 15,
- "AllDockWidgetAreas": 15,
- "NoDockWidgetArea": 0
- }
- }
- Enum {
- name: "ToolBarArea"
- values: {
- "LeftToolBarArea": 1,
- "RightToolBarArea": 2,
- "TopToolBarArea": 4,
- "BottomToolBarArea": 8,
- "ToolBarArea_Mask": 15,
- "AllToolBarAreas": 15,
- "NoToolBarArea": 0
- }
- }
- Enum {
- name: "ToolBarAreas"
- values: {
- "LeftToolBarArea": 1,
- "RightToolBarArea": 2,
- "TopToolBarArea": 4,
- "BottomToolBarArea": 8,
- "ToolBarArea_Mask": 15,
- "AllToolBarAreas": 15,
- "NoToolBarArea": 0
- }
- }
- Enum {
- name: "DateFormat"
- values: {
- "TextDate": 0,
- "ISODate": 1,
- "SystemLocaleDate": 2,
- "LocalDate": 2,
- "LocaleDate": 3,
- "SystemLocaleShortDate": 4,
- "SystemLocaleLongDate": 5,
- "DefaultLocaleShortDate": 6,
- "DefaultLocaleLongDate": 7,
- "RFC2822Date": 8
- }
- }
- Enum {
- name: "TimeSpec"
- values: {
- "LocalTime": 0,
- "UTC": 1,
- "OffsetFromUTC": 2,
- "TimeZone": 3
- }
- }
- Enum {
- name: "DayOfWeek"
- values: {
- "Monday": 1,
- "Tuesday": 2,
- "Wednesday": 3,
- "Thursday": 4,
- "Friday": 5,
- "Saturday": 6,
- "Sunday": 7
- }
- }
- Enum {
- name: "ScrollBarPolicy"
- values: {
- "ScrollBarAsNeeded": 0,
- "ScrollBarAlwaysOff": 1,
- "ScrollBarAlwaysOn": 2
- }
- }
- Enum {
- name: "CaseSensitivity"
- values: {
- "CaseInsensitive": 0,
- "CaseSensitive": 1
- }
- }
- Enum {
- name: "Corner"
- values: {
- "TopLeftCorner": 0,
- "TopRightCorner": 1,
- "BottomLeftCorner": 2,
- "BottomRightCorner": 3
- }
- }
- Enum {
- name: "Edge"
- values: {
- "TopEdge": 1,
- "LeftEdge": 2,
- "RightEdge": 4,
- "BottomEdge": 8
- }
- }
- Enum {
- name: "Edges"
- values: {
- "TopEdge": 1,
- "LeftEdge": 2,
- "RightEdge": 4,
- "BottomEdge": 8
- }
- }
- Enum {
- name: "ConnectionType"
- values: {
- "AutoConnection": 0,
- "DirectConnection": 1,
- "QueuedConnection": 2,
- "BlockingQueuedConnection": 3,
- "UniqueConnection": 128
- }
- }
- Enum {
- name: "ShortcutContext"
- values: {
- "WidgetShortcut": 0,
- "WindowShortcut": 1,
- "ApplicationShortcut": 2,
- "WidgetWithChildrenShortcut": 3
- }
- }
- Enum {
- name: "FillRule"
- values: {
- "OddEvenFill": 0,
- "WindingFill": 1
- }
- }
- Enum {
- name: "MaskMode"
- values: {
- "MaskInColor": 0,
- "MaskOutColor": 1
- }
- }
- Enum {
- name: "ClipOperation"
- values: {
- "NoClip": 0,
- "ReplaceClip": 1,
- "IntersectClip": 2
- }
- }
- Enum {
- name: "ItemSelectionMode"
- values: {
- "ContainsItemShape": 0,
- "IntersectsItemShape": 1,
- "ContainsItemBoundingRect": 2,
- "IntersectsItemBoundingRect": 3
- }
- }
- Enum {
- name: "TransformationMode"
- values: {
- "FastTransformation": 0,
- "SmoothTransformation": 1
- }
- }
- Enum {
- name: "Axis"
- values: {
- "XAxis": 0,
- "YAxis": 1,
- "ZAxis": 2
- }
- }
- Enum {
- name: "FocusReason"
- values: {
- "MouseFocusReason": 0,
- "TabFocusReason": 1,
- "BacktabFocusReason": 2,
- "ActiveWindowFocusReason": 3,
- "PopupFocusReason": 4,
- "ShortcutFocusReason": 5,
- "MenuBarFocusReason": 6,
- "OtherFocusReason": 7,
- "NoFocusReason": 8
- }
- }
- Enum {
- name: "ContextMenuPolicy"
- values: {
- "NoContextMenu": 0,
- "DefaultContextMenu": 1,
- "ActionsContextMenu": 2,
- "CustomContextMenu": 3,
- "PreventContextMenu": 4
- }
- }
- Enum {
- name: "InputMethodQuery"
- values: {
- "ImEnabled": 1,
- "ImCursorRectangle": 2,
- "ImMicroFocus": 2,
- "ImFont": 4,
- "ImCursorPosition": 8,
- "ImSurroundingText": 16,
- "ImCurrentSelection": 32,
- "ImMaximumTextLength": 64,
- "ImAnchorPosition": 128,
- "ImHints": 256,
- "ImPreferredLanguage": 512,
- "ImAbsolutePosition": 1024,
- "ImTextBeforeCursor": 2048,
- "ImTextAfterCursor": 4096,
- "ImPlatformData": -2147483648,
- "ImQueryInput": 186,
- "ImQueryAll": -1
- }
- }
- Enum {
- name: "InputMethodQueries"
- values: {
- "ImEnabled": 1,
- "ImCursorRectangle": 2,
- "ImMicroFocus": 2,
- "ImFont": 4,
- "ImCursorPosition": 8,
- "ImSurroundingText": 16,
- "ImCurrentSelection": 32,
- "ImMaximumTextLength": 64,
- "ImAnchorPosition": 128,
- "ImHints": 256,
- "ImPreferredLanguage": 512,
- "ImAbsolutePosition": 1024,
- "ImTextBeforeCursor": 2048,
- "ImTextAfterCursor": 4096,
- "ImPlatformData": -2147483648,
- "ImQueryInput": 186,
- "ImQueryAll": -1
- }
- }
- Enum {
- name: "InputMethodHint"
- values: {
- "ImhNone": 0,
- "ImhHiddenText": 1,
- "ImhSensitiveData": 2,
- "ImhNoAutoUppercase": 4,
- "ImhPreferNumbers": 8,
- "ImhPreferUppercase": 16,
- "ImhPreferLowercase": 32,
- "ImhNoPredictiveText": 64,
- "ImhDate": 128,
- "ImhTime": 256,
- "ImhPreferLatin": 512,
- "ImhMultiLine": 1024,
- "ImhDigitsOnly": 65536,
- "ImhFormattedNumbersOnly": 131072,
- "ImhUppercaseOnly": 262144,
- "ImhLowercaseOnly": 524288,
- "ImhDialableCharactersOnly": 1048576,
- "ImhEmailCharactersOnly": 2097152,
- "ImhUrlCharactersOnly": 4194304,
- "ImhLatinOnly": 8388608,
- "ImhExclusiveInputMask": -65536
- }
- }
- Enum {
- name: "InputMethodHints"
- values: {
- "ImhNone": 0,
- "ImhHiddenText": 1,
- "ImhSensitiveData": 2,
- "ImhNoAutoUppercase": 4,
- "ImhPreferNumbers": 8,
- "ImhPreferUppercase": 16,
- "ImhPreferLowercase": 32,
- "ImhNoPredictiveText": 64,
- "ImhDate": 128,
- "ImhTime": 256,
- "ImhPreferLatin": 512,
- "ImhMultiLine": 1024,
- "ImhDigitsOnly": 65536,
- "ImhFormattedNumbersOnly": 131072,
- "ImhUppercaseOnly": 262144,
- "ImhLowercaseOnly": 524288,
- "ImhDialableCharactersOnly": 1048576,
- "ImhEmailCharactersOnly": 2097152,
- "ImhUrlCharactersOnly": 4194304,
- "ImhLatinOnly": 8388608,
- "ImhExclusiveInputMask": -65536
- }
- }
- Enum {
- name: "ToolButtonStyle"
- values: {
- "ToolButtonIconOnly": 0,
- "ToolButtonTextOnly": 1,
- "ToolButtonTextBesideIcon": 2,
- "ToolButtonTextUnderIcon": 3,
- "ToolButtonFollowStyle": 4
- }
- }
- Enum {
- name: "LayoutDirection"
- values: {
- "LeftToRight": 0,
- "RightToLeft": 1,
- "LayoutDirectionAuto": 2
- }
- }
- Enum {
- name: "DropAction"
- values: {
- "CopyAction": 1,
- "MoveAction": 2,
- "LinkAction": 4,
- "ActionMask": 255,
- "TargetMoveAction": 32770,
- "IgnoreAction": 0
- }
- }
- Enum {
- name: "DropActions"
- values: {
- "CopyAction": 1,
- "MoveAction": 2,
- "LinkAction": 4,
- "ActionMask": 255,
- "TargetMoveAction": 32770,
- "IgnoreAction": 0
- }
- }
- Enum {
- name: "CheckState"
- values: {
- "Unchecked": 0,
- "PartiallyChecked": 1,
- "Checked": 2
- }
- }
- Enum {
- name: "ItemFlags"
- values: {
- "NoItemFlags": 0,
- "ItemIsSelectable": 1,
- "ItemIsEditable": 2,
- "ItemIsDragEnabled": 4,
- "ItemIsDropEnabled": 8,
- "ItemIsUserCheckable": 16,
- "ItemIsEnabled": 32,
- "ItemIsTristate": 64,
- "ItemNeverHasChildren": 128
- }
- }
- Enum {
- name: "MatchFlags"
- values: {
- "MatchExactly": 0,
- "MatchContains": 1,
- "MatchStartsWith": 2,
- "MatchEndsWith": 3,
- "MatchRegExp": 4,
- "MatchWildcard": 5,
- "MatchFixedString": 8,
- "MatchCaseSensitive": 16,
- "MatchWrap": 32,
- "MatchRecursive": 64
- }
- }
- Enum {
- name: "WindowModality"
- values: {
- "NonModal": 0,
- "WindowModal": 1,
- "ApplicationModal": 2
- }
- }
- Enum {
- name: "TextInteractionFlag"
- values: {
- "NoTextInteraction": 0,
- "TextSelectableByMouse": 1,
- "TextSelectableByKeyboard": 2,
- "LinksAccessibleByMouse": 4,
- "LinksAccessibleByKeyboard": 8,
- "TextEditable": 16,
- "TextEditorInteraction": 19,
- "TextBrowserInteraction": 13
- }
- }
- Enum {
- name: "TextInteractionFlags"
- values: {
- "NoTextInteraction": 0,
- "TextSelectableByMouse": 1,
- "TextSelectableByKeyboard": 2,
- "LinksAccessibleByMouse": 4,
- "LinksAccessibleByKeyboard": 8,
- "TextEditable": 16,
- "TextEditorInteraction": 19,
- "TextBrowserInteraction": 13
- }
- }
- Enum {
- name: "SizeHint"
- values: {
- "MinimumSize": 0,
- "PreferredSize": 1,
- "MaximumSize": 2,
- "MinimumDescent": 3,
- "NSizeHints": 4
- }
- }
- Enum {
- name: "GestureState"
- values: {
- "NoGesture": 0,
- "GestureStarted": 1,
- "GestureUpdated": 2,
- "GestureFinished": 3,
- "GestureCanceled": 4
- }
- }
- Enum {
- name: "GestureType"
- values: {
- "TapGesture": 1,
- "TapAndHoldGesture": 2,
- "PanGesture": 3,
- "PinchGesture": 4,
- "SwipeGesture": 5,
- "CustomGesture": 256,
- "LastGestureType": -1
- }
- }
- Enum {
- name: "NativeGestureType"
- values: {
- "BeginNativeGesture": 0,
- "EndNativeGesture": 1,
- "PanNativeGesture": 2,
- "ZoomNativeGesture": 3,
- "SmartZoomNativeGesture": 4,
- "RotateNativeGesture": 5,
- "SwipeNativeGesture": 6
- }
- }
- Enum {
- name: "CursorMoveStyle"
- values: {
- "LogicalMoveStyle": 0,
- "VisualMoveStyle": 1
- }
- }
- Enum {
- name: "TimerType"
- values: {
- "PreciseTimer": 0,
- "CoarseTimer": 1,
- "VeryCoarseTimer": 2
- }
- }
- Enum {
- name: "ScrollPhase"
- values: {
- "ScrollBegin": 1,
- "ScrollUpdate": 2,
- "ScrollEnd": 3
- }
- }
- Enum {
- name: "MouseEventSource"
- values: {
- "MouseEventNotSynthesized": 0,
- "MouseEventSynthesizedBySystem": 1,
- "MouseEventSynthesizedByQt": 2
- }
- }
- }
- Component { name: "QEasingCurve"; prototype: "QQmlEasingValueType" }
}
diff --git a/src/imports/qtquick2/qtquick2.pro b/src/imports/qtquick2/qtquick2.pro
index 2cd15c7340..118343588a 100644
--- a/src/imports/qtquick2/qtquick2.pro
+++ b/src/imports/qtquick2/qtquick2.pro
@@ -1,6 +1,7 @@
CXX_MODULE = qml
TARGET = qtquick2plugin
TARGETPATH = QtQuick.2
+IMPORT_VERSION = 2.6
SOURCES += \
plugin.cpp
diff --git a/src/imports/settings/plugins.qmltypes b/src/imports/settings/plugins.qmltypes
index 87503fbda5..eaa310edc9 100644
--- a/src/imports/settings/plugins.qmltypes
+++ b/src/imports/settings/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,7 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable Qt.labs.settings 1.0'
Module {
+ dependencies: []
Component {
name: "QQmlSettings"
prototype: "QObject"
diff --git a/src/imports/statemachine/plugins.qmltypes b/src/imports/statemachine/plugins.qmltypes
index db5897bb0f..c4b453b9e4 100644
--- a/src/imports/statemachine/plugins.qmltypes
+++ b/src/imports/statemachine/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,7 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQml.StateMachine 1.0'
Module {
+ dependencies: []
Component {
name: "FinalState"
defaultProperty: "children"
@@ -32,9 +33,17 @@ Module {
Component {
name: "QAbstractTransition"
prototype: "QObject"
+ Enum {
+ name: "TransitionType"
+ values: {
+ "ExternalTransition": 0,
+ "InternalTransition": 1
+ }
+ }
Property { name: "sourceState"; type: "QState"; isReadonly: true; isPointer: true }
Property { name: "targetState"; type: "QAbstractState"; isPointer: true }
Property { name: "targetStates"; type: "QList<QAbstractState*>" }
+ Property { name: "transitionType"; revision: 1; type: "TransitionType" }
Signal { name: "triggered" }
}
Component { name: "QFinalState"; prototype: "QAbstractState" }
@@ -51,6 +60,7 @@ Module {
}
}
Property { name: "defaultState"; type: "QAbstractState"; isPointer: true }
+ Property { name: "defaultTransition"; type: "QAbstractTransition"; isPointer: true }
Property { name: "historyType"; type: "HistoryType" }
}
Component {
diff --git a/src/imports/testlib/plugins.qmltypes b/src/imports/testlib/plugins.qmltypes
index a892f73eb0..2beb38a940 100644
--- a/src/imports/testlib/plugins.qmltypes
+++ b/src/imports/testlib/plugins.qmltypes
@@ -1,16 +1,17 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump QtTest 1.1'
+// 'qmlplugindump -nonrelocatable QtTest 1.0'
Module {
+ dependencies: []
Component {
name: "QuickTestEvent"
prototype: "QObject"
- exports: ["TestEvent 1.0"]
+ exports: ["QtTest/TestEvent 1.0"]
exportMetaObjectRevisions: [0]
Method {
name: "keyPress"
@@ -95,6 +96,16 @@ Module {
Parameter { name: "delay"; type: "int" }
}
Method {
+ name: "mouseDoubleClickSequence"
+ type: "bool"
+ Parameter { name: "item"; type: "QObject"; isPointer: true }
+ Parameter { name: "x"; type: "double" }
+ Parameter { name: "y"; type: "double" }
+ Parameter { name: "button"; type: "int" }
+ Parameter { name: "modifiers"; type: "int" }
+ Parameter { name: "delay"; type: "int" }
+ }
+ Method {
name: "mouseMove"
type: "bool"
Parameter { name: "item"; type: "QObject"; isPointer: true }
@@ -119,7 +130,7 @@ Module {
Component {
name: "QuickTestResult"
prototype: "QObject"
- exports: ["TestResult 1.0", "TestResult 1.1"]
+ exports: ["QtTest/TestResult 1.0", "QtTest/TestResult 1.1"]
exportMetaObjectRevisions: [0, 1]
Enum {
name: "RunMode"
@@ -261,7 +272,7 @@ Module {
Component {
name: "QuickTestUtil"
prototype: "QObject"
- exports: ["TestUtil 1.0"]
+ exports: ["QtTest/TestUtil 1.0"]
exportMetaObjectRevisions: [0]
Property { name: "printAvailableFunctions"; type: "bool"; isReadonly: true }
Property { name: "dragThreshold"; type: "int"; isReadonly: true }
diff --git a/src/imports/window/plugins.qmltypes b/src/imports/window/plugins.qmltypes
index fa320886db..8c21271614 100644
--- a/src/imports/window/plugins.qmltypes
+++ b/src/imports/window/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,19 +7,7 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQuick.Window 2.2'
Module {
- Component {
- name: "QQuickRootItem"
- defaultProperty: "data"
- prototype: "QQuickItem"
- Method {
- name: "setWidth"
- Parameter { name: "w"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "h"; type: "int" }
- }
- }
+ dependencies: []
Component {
name: "QQuickScreen"
prototype: "QObject"
@@ -112,6 +100,8 @@ Module {
Property { name: "active"; type: "bool"; isReadonly: true }
Property { name: "activeFocusItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "width"; type: "int"; isReadonly: true }
+ Property { name: "height"; type: "int"; isReadonly: true }
}
Component {
name: "QQuickWindowQmlImpl"
@@ -288,5 +278,6 @@ Module {
revision: 1
Parameter { name: "msec"; type: "int" }
}
+ Method { name: "requestUpdate"; revision: 3 }
}
}
diff --git a/src/imports/xmllistmodel/plugins.qmltypes b/src/imports/xmllistmodel/plugins.qmltypes
index 0978237027..d098d11409 100644
--- a/src/imports/xmllistmodel/plugins.qmltypes
+++ b/src/imports/xmllistmodel/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,272 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQuick.XmlListModel 2.0'
Module {
+ dependencies: []
+ Component {
+ name: "QAbstractItemModel"
+ prototype: "QObject"
+ Enum {
+ name: "LayoutChangeHint"
+ values: {
+ "NoLayoutChangeHint": 0,
+ "VerticalSortHint": 1,
+ "HorizontalSortHint": 2
+ }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ Parameter { name: "roles"; type: "QVector<int>" }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ }
+ Signal {
+ name: "headerDataChanged"
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutChanged" }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutAboutToBeChanged" }
+ Signal {
+ name: "rowsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal { name: "modelAboutToBeReset" }
+ Signal { name: "modelReset" }
+ Signal {
+ name: "rowsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationRow"; type: "int" }
+ }
+ Signal {
+ name: "rowsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "row"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationColumn"; type: "int" }
+ }
+ Signal {
+ name: "columnsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method { name: "submit"; type: "bool" }
+ Method { name: "revert" }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "parent"
+ type: "QModelIndex"
+ Parameter { name: "child"; type: "QModelIndex" }
+ }
+ Method {
+ name: "sibling"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "idx"; type: "QModelIndex" }
+ }
+ Method {
+ name: "rowCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "rowCount"; type: "int" }
+ Method {
+ name: "columnCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "columnCount"; type: "int" }
+ Method {
+ name: "hasChildren"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "hasChildren"; type: "bool" }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ }
+ Method {
+ name: "fetchMore"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "canFetchMore"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "flags"
+ type: "Qt::ItemFlags"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ Parameter { name: "flags"; type: "Qt::MatchFlags" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ }
+ Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" }
Component {
name: "QQuickXmlListModel"
defaultProperty: "roles"
diff --git a/src/qml/Qt5QmlConfigExtras.cmake.in b/src/qml/Qt5QmlConfigExtras.cmake.in
new file mode 100644
index 0000000000..9ddb9885cd
--- /dev/null
+++ b/src/qml/Qt5QmlConfigExtras.cmake.in
@@ -0,0 +1,5 @@
+file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/Qt5Qml_*Factory.cmake")
+
+foreach(_other_plugin ${_qt5qml_other_plugins})
+ include(${_other_plugin} OPTIONAL)
+endforeach()
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index 1eebcbbe7f..97aee80e91 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -102,6 +102,8 @@ QT_BEGIN_NAMESPACE
F(CallBuiltinDeleteMember, callBuiltinDeleteMember) \
F(CallBuiltinDeleteSubscript, callBuiltinDeleteSubscript) \
F(CallBuiltinDeleteName, callBuiltinDeleteName) \
+ F(CallBuiltinTypeofScopeObjectProperty, callBuiltinTypeofScopeObjectProperty) \
+ F(CallBuiltinTypeofContextObjectProperty, callBuiltinTypeofContextObjectProperty) \
F(CallBuiltinTypeofMember, callBuiltinTypeofMember) \
F(CallBuiltinTypeofSubscript, callBuiltinTypeofSubscript) \
F(CallBuiltinTypeofName, callBuiltinTypeofName) \
@@ -511,6 +513,18 @@ union Instr
int name;
Param result;
};
+ struct instr_callBuiltinTypeofScopeObjectProperty {
+ MOTH_INSTR_HEADER
+ int index;
+ Param base;
+ Param result;
+ };
+ struct instr_callBuiltinTypeofContextObjectProperty {
+ MOTH_INSTR_HEADER
+ int index;
+ Param base;
+ Param result;
+ };
struct instr_callBuiltinTypeofMember {
MOTH_INSTR_HEADER
int member;
@@ -809,6 +823,8 @@ union Instr
instr_callBuiltinDeleteMember callBuiltinDeleteMember;
instr_callBuiltinDeleteSubscript callBuiltinDeleteSubscript;
instr_callBuiltinDeleteName callBuiltinDeleteName;
+ instr_callBuiltinTypeofScopeObjectProperty callBuiltinTypeofScopeObjectProperty;
+ instr_callBuiltinTypeofContextObjectProperty callBuiltinTypeofContextObjectProperty;
instr_callBuiltinTypeofMember callBuiltinTypeofMember;
instr_callBuiltinTypeofSubscript callBuiltinTypeofSubscript;
instr_callBuiltinTypeofName callBuiltinTypeofName;
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index ede1e6938f..afb36c5f14 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -350,7 +350,7 @@ void InstructionSelection::run(int functionIndex)
opt.run(qmlEngine, useTypeInference, /*peelLoops =*/ false);
if (opt.isInSSA()) {
static const bool doStackSlotAllocation =
- qgetenv("QV4_NO_INTERPRETER_STACK_SLOT_ALLOCATION").isEmpty();
+ qEnvironmentVariableIsEmpty("QV4_NO_INTERPRETER_STACK_SLOT_ALLOCATION");
if (doStackSlotAllocation) {
AllocateStackSlots(opt.lifeTimeIntervals()).forFunction(_function);
@@ -1177,6 +1177,25 @@ void InstructionSelection::callBuiltinInvalid(IR::Name *func, IR::ExprList *args
addInstruction(call);
}
+void InstructionSelection::callBuiltinTypeofQmlContextProperty(IR::Expr *base, IR::Member::MemberKind kind, int propertyIndex, IR::Expr *result)
+{
+ if (kind == IR::Member::MemberOfQmlScopeObject) {
+ Instruction::CallBuiltinTypeofScopeObjectProperty call;
+ call.base = getParam(base);
+ call.index = propertyIndex;
+ call.result = getResultParam(result);
+ addInstruction(call);
+ } else if (kind == IR::Member::MemberOfQmlContextObject) {
+ Instruction::CallBuiltinTypeofContextObjectProperty call;
+ call.base = getParam(base);
+ call.index = propertyIndex;
+ call.result = getResultParam(result);
+ addInstruction(call);
+ } else {
+ Q_UNREACHABLE();
+ }
+}
+
void InstructionSelection::callBuiltinTypeofMember(IR::Expr *base, const QString &name,
IR::Expr *result)
{
diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h
index 947461f98e..e2385aad6d 100644
--- a/src/qml/compiler/qv4isel_moth_p.h
+++ b/src/qml/compiler/qv4isel_moth_p.h
@@ -84,6 +84,7 @@ protected:
virtual void visitRet(IR::Ret *);
virtual void callBuiltinInvalid(IR::Name *func, IR::ExprList *args, IR::Expr *result);
+ virtual void callBuiltinTypeofQmlContextProperty(IR::Expr *base, IR::Member::MemberKind kind, int propertyIndex, IR::Expr *result);
virtual void callBuiltinTypeofMember(IR::Expr *base, const QString &name, IR::Expr *result);
virtual void callBuiltinTypeofSubscript(IR::Expr *base, IR::Expr *index, IR::Expr *result);
virtual void callBuiltinTypeofName(const QString &name, IR::Expr *result);
diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp
index 9d172b1223..184cff43e6 100644
--- a/src/qml/compiler/qv4isel_p.cpp
+++ b/src/qml/compiler/qv4isel_p.cpp
@@ -282,8 +282,17 @@ void IRDecoder::callBuiltin(IR::Call *call, Expr *result)
return;
case IR::Name::builtin_typeof: {
- if (IR::Member *m = call->args->expr->asMember()) {
- callBuiltinTypeofMember(m->base, *m->name, result);
+ if (IR::Member *member = call->args->expr->asMember()) {
+#ifndef V4_BOOTSTRAP
+ Q_ASSERT(member->kind != IR::Member::MemberOfIdObjectsArray);
+ if (member->kind == IR::Member::MemberOfQmlScopeObject || member->kind == IR::Member::MemberOfQmlContextObject) {
+ callBuiltinTypeofQmlContextProperty(member->base,
+ IR::Member::MemberKind(member->kind),
+ member->property->coreIndex, result);
+ return;
+ }
+#endif
+ callBuiltinTypeofMember(member->base, *member->name, result);
return;
} else if (IR::Subscript *ss = call->args->expr->asSubscript()) {
callBuiltinTypeofSubscript(ss->base, ss->index, result);
diff --git a/src/qml/compiler/qv4isel_p.h b/src/qml/compiler/qv4isel_p.h
index 50ee955378..b78d323e7d 100644
--- a/src/qml/compiler/qv4isel_p.h
+++ b/src/qml/compiler/qv4isel_p.h
@@ -118,6 +118,7 @@ public: // visitor methods for StmtVisitor:
public: // to implement by subclasses:
virtual void callBuiltinInvalid(IR::Name *func, IR::ExprList *args, IR::Expr *result) = 0;
+ virtual void callBuiltinTypeofQmlContextProperty(IR::Expr *base, IR::Member::MemberKind kind, int propertyIndex, IR::Expr *result) = 0;
virtual void callBuiltinTypeofMember(IR::Expr *base, const QString &name, IR::Expr *result) = 0;
virtual void callBuiltinTypeofSubscript(IR::Expr *base, IR::Expr *index, IR::Expr *result) = 0;
virtual void callBuiltinTypeofName(const QString &name, IR::Expr *result) = 0;
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 2b0383beec..89101ad756 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -69,7 +69,7 @@ enum { DoVerification = 1 };
static void showMeTheCode(IR::Function *function, const char *marker)
{
- static bool showCode = !qgetenv("QV4_SHOW_IR").isNull();
+ static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_IR");
if (showCode) {
qDebug() << marker;
QBuffer buf;
@@ -3899,7 +3899,7 @@ bool tryOptimizingComparison(Expr *&expr)
void cfg2dot(IR::Function *f, const QVector<LoopDetection::LoopInfo *> &loops = QVector<LoopDetection::LoopInfo *>())
{
- static bool showCode = !qgetenv("QV4_SHOW_IR").isNull();
+ static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_IR");
if (!showCode)
return;
@@ -5195,12 +5195,15 @@ void Optimizer::run(QQmlEnginePrivate *qmlEngine, bool doTypeInference, bool pee
cleanupBasicBlocks(function);
function->removeSharedExpressions();
-
+ int statementCount = 0;
+ foreach (BasicBlock *bb, function->basicBlocks())
+ if (!bb->isRemoved())
+ statementCount += bb->statementCount();
// showMeTheCode(function);
- static bool doSSA = qgetenv("QV4_NO_SSA").isEmpty();
+ static bool doSSA = qEnvironmentVariableIsEmpty("QV4_NO_SSA");
- if (!function->hasTry && !function->hasWith && !function->module->debugMode && doSSA) {
+ if (!function->hasTry && !function->hasWith && !function->module->debugMode && doSSA && statementCount <= 300) {
// qout << "SSA for " << (function->name ? qPrintable(*function->name) : "<anonymous>") << endl;
ConvertArgLocals(function).toTemps();
@@ -5266,7 +5269,7 @@ void Optimizer::run(QQmlEnginePrivate *qmlEngine, bool doTypeInference, bool pee
verifyNoPointerSharing(function);
}
- static bool doOpt = qgetenv("QV4_NO_OPT").isEmpty();
+ static const bool doOpt = qEnvironmentVariableIsEmpty("QV4_NO_OPT");
if (doOpt) {
// qout << "Running SSA optimization..." << endl;
worklist.reset();
diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc
index 426848f6e6..593feb49e7 100644
--- a/src/qml/doc/src/cppintegration/definetypes.qdoc
+++ b/src/qml/doc/src/cppintegration/definetypes.qdoc
@@ -195,6 +195,7 @@ be aware that properties of such a singleton type cannot be bound to.
See \l{qmlRegisterSingletonType()} for more information on how implement and
register a new singleton type, and how to use an existing singleton type.
+\note Enum values for registered types in QML should start with a capital.
\section2 Type Revisions and Versions
diff --git a/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
index 780086cfc7..ffbf2282a6 100644
--- a/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
@@ -80,7 +80,7 @@ must import that module in their QML documents.
\section1 Property Change Behavior for Basic Types
Some basic types have properties: for example, the \l font type has
-\c pixelSize, \c family and \c b properties. Unlike properties of
+\c pixelSize, \c family and \c bold properties. Unlike properties of
\l{qtqml-typesystem-topic.html#qml-object-types}{object types}, properties of
basic types do not provide their own property change signals. It is only possible
to create a property change signal handler for the basic type property itself:
diff --git a/src/qml/jit/qv4assembler.cpp b/src/qml/jit/qv4assembler.cpp
index b5765b5705..c949c424ea 100644
--- a/src/qml/jit/qv4assembler.cpp
+++ b/src/qml/jit/qv4assembler.cpp
@@ -333,7 +333,7 @@ Assembler::Jump Assembler::genTryDoubleConversion(IR::Expr *src, Assembler::FPRe
// not an int, check if it's a double:
isNoInt.link(this);
-#if QT_POINTER_SIZE == 8
+#ifdef QV4_USE_64_BIT_VALUE_ENCODING
and32(Assembler::TrustedImm32(Value::IsDouble_Mask), Assembler::ScratchRegister);
Assembler::Jump isNoDbl = branch32(Assembler::Equal, Assembler::ScratchRegister,
Assembler::TrustedImm32(0));
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h
index effae64967..80e71ef13c 100644
--- a/src/qml/jit/qv4assembler_p.h
+++ b/src/qml/jit/qv4assembler_p.h
@@ -745,7 +745,7 @@ public:
moveDouble(source, (FPRegisterID) targetTemp->index);
return;
}
-#if QT_POINTER_SIZE == 8
+#ifdef QV4_USE_64_BIT_VALUE_ENCODING
moveDoubleTo64(source, ReturnValueRegister);
move(TrustedImm64(QV4::Value::NaNEncodeMask), ScratchRegister);
xor64(ScratchRegister, ReturnValueRegister);
@@ -756,7 +756,7 @@ public:
storeDouble(source, ptr);
#endif
}
-#if QT_POINTER_SIZE == 8
+#ifdef QV4_USE_64_BIT_VALUE_ENCODING
// We need to (de)mangle the double
void loadDouble(Address addr, FPRegisterID dest)
{
@@ -869,7 +869,7 @@ public:
template <int ArgumentIndex, typename Parameter>
struct SizeOnStack
{
- enum { Size = Select<ArgumentIndex >= RegisterArgumentCount, QT_POINTER_SIZE, 0>::Chosen };
+ enum { Size = Select<ArgumentIndex >= RegisterArgumentCount, sizeof(void*), 0>::Chosen };
};
template <int ArgumentIndex>
@@ -1077,7 +1077,7 @@ public:
FPRegisterID toDoubleRegister(IR::Expr *e, FPRegisterID target = FPGpr0)
{
if (IR::Const *c = e->asConst()) {
-#if QT_POINTER_SIZE == 8
+#ifdef QV4_USE_64_BIT_VALUE_ENCODING
union {
double d;
int64_t i;
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 782b0c8659..6de6524615 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -185,7 +185,7 @@ JSC::MacroAssemblerCodeRef Assembler::link(int *codeSize)
JSC::MacroAssemblerCodeRef codeRef;
- static bool showCode = !qgetenv("QV4_SHOW_ASM").isNull();
+ static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_ASM");
if (showCode) {
QBuffer buf;
buf.open(QIODevice::WriteOnly);
@@ -275,7 +275,7 @@ void InstructionSelection::run(int functionIndex)
IR::Optimizer opt(_function);
opt.run(qmlEngine);
- static const bool withRegisterAllocator = qgetenv("QV4_NO_REGALLOC").isEmpty();
+ static const bool withRegisterAllocator = qEnvironmentVariableIsEmpty("QV4_NO_REGALLOC");
if (Assembler::RegAllocIsSupported && opt.isInSSA() && withRegisterAllocator) {
RegisterAllocator regalloc(Assembler::getRegisterInfo());
regalloc.run(_function, opt);
@@ -399,6 +399,23 @@ void InstructionSelection::callBuiltinInvalid(IR::Name *func, IR::ExprList *args
}
}
+void InstructionSelection::callBuiltinTypeofQmlContextProperty(IR::Expr *base,
+ IR::Member::MemberKind kind,
+ int propertyIndex, IR::Expr *result)
+{
+ if (kind == IR::Member::MemberOfQmlScopeObject) {
+ generateFunctionCall(result, Runtime::typeofScopeObjectProperty, Assembler::EngineRegister,
+ Assembler::PointerToValue(base),
+ Assembler::TrustedImm32(propertyIndex));
+ } else if (kind == IR::Member::MemberOfQmlContextObject) {
+ generateFunctionCall(result, Runtime::typeofContextObjectProperty,
+ Assembler::EngineRegister, Assembler::PointerToValue(base),
+ Assembler::TrustedImm32(propertyIndex));
+ } else {
+ Q_UNREACHABLE();
+ }
+}
+
void InstructionSelection::callBuiltinTypeofMember(IR::Expr *base, const QString &name,
IR::Expr *result)
{
@@ -681,7 +698,7 @@ void InstructionSelection::loadString(const QString &str, IR::Expr *target)
Pointer srcAddr = _as->loadStringAddress(Assembler::ReturnValueRegister, str);
_as->loadPtr(srcAddr, Assembler::ReturnValueRegister);
Pointer destAddr = _as->loadAddress(Assembler::ScratchRegister, target);
-#if QT_POINTER_SIZE == 8
+#ifdef QV4_USE_64_BIT_VALUE_ENCODING
_as->store64(Assembler::ReturnValueRegister, destAddr);
#else
_as->store32(Assembler::ReturnValueRegister, destAddr);
@@ -1085,7 +1102,7 @@ void InstructionSelection::convertTypeToDouble(IR::Expr *source, IR::Expr *targe
// not an int, check if it's NOT a double:
isNoInt.link(_as);
-#if QT_POINTER_SIZE == 8
+#ifdef QV4_USE_64_BIT_VALUE_ENCODING
_as->and32(Assembler::TrustedImm32(Value::IsDouble_Mask), Assembler::ScratchRegister);
Assembler::Jump isDbl = _as->branch32(Assembler::NotEqual, Assembler::ScratchRegister,
Assembler::TrustedImm32(0));
@@ -1103,7 +1120,7 @@ void InstructionSelection::convertTypeToDouble(IR::Expr *source, IR::Expr *targe
Assembler::Pointer addr2 = _as->loadAddress(Assembler::ScratchRegister, source);
IR::Temp *targetTemp = target->asTemp();
if (!targetTemp || targetTemp->kind == IR::Temp::StackSlot) {
-#if QT_POINTER_SIZE == 8
+#if Q_PROCESSOR_WORDSIZE == 8
_as->load64(addr2, Assembler::ScratchRegister);
_as->store64(Assembler::ScratchRegister, _as->loadAddress(Assembler::ReturnValueRegister, target));
#else
@@ -1172,7 +1189,7 @@ void InstructionSelection::convertTypeToSInt32(IR::Expr *source, IR::Expr *targe
switch (source->type) {
case IR::VarType: {
-#if QT_POINTER_SIZE == 8
+#ifdef QV4_USE_64_BIT_VALUE_ENCODING
Assembler::Pointer addr = _as->loadAddress(Assembler::ScratchRegister, source);
_as->load64(addr, Assembler::ScratchRegister);
_as->move(Assembler::ScratchRegister, Assembler::ReturnValueRegister);
diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h
index 29749f7492..6e9b02b034 100644
--- a/src/qml/jit/qv4isel_masm_p.h
+++ b/src/qml/jit/qv4isel_masm_p.h
@@ -80,6 +80,7 @@ protected:
virtual QQmlRefPointer<QV4::CompiledData::CompilationUnit> backendCompileStep();
virtual void callBuiltinInvalid(IR::Name *func, IR::ExprList *args, IR::Expr *result);
+ virtual void callBuiltinTypeofQmlContextProperty(IR::Expr *base, IR::Member::MemberKind kind, int propertyIndex, IR::Expr *result);
virtual void callBuiltinTypeofMember(IR::Expr *base, const QString &name, IR::Expr *result);
virtual void callBuiltinTypeofSubscript(IR::Expr *base, IR::Expr *index, IR::Expr *result);
virtual void callBuiltinTypeofName(const QString &name, IR::Expr *result);
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp
index b9178c0ea0..5e836f06f1 100644
--- a/src/qml/jit/qv4regalloc.cpp
+++ b/src/qml/jit/qv4regalloc.cpp
@@ -267,6 +267,7 @@ public:
protected: // IRDecoder
virtual void callBuiltinInvalid(IR::Name *, IR::ExprList *, IR::Expr *) {}
+ virtual void callBuiltinTypeofQmlContextProperty(IR::Expr *, IR::Member::MemberKind, int, IR::Expr *) {}
virtual void callBuiltinTypeofMember(IR::Expr *, const QString &, IR::Expr *) {}
virtual void callBuiltinTypeofSubscript(IR::Expr *, IR::Expr *, IR::Expr *) {}
virtual void callBuiltinTypeofName(const QString &, IR::Expr *) {}
@@ -1323,7 +1324,7 @@ void RegisterAllocator::run(IR::Function *function, const Optimizer &opt)
if (DebugRegAlloc)
qDebug() << "*** Finished regalloc , result:";
- static bool showCode = !qgetenv("QV4_SHOW_IR").isNull();
+ static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_IR");
if (showCode) {
QBuffer buf;
buf.open(QIODevice::WriteOnly);
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 82d94f569e..e31d9b1481 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -218,7 +218,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
if (!factory) {
#ifdef V4_ENABLE_JIT
- static const bool forceMoth = !qgetenv("QV4_FORCE_INTERPRETER").isEmpty();
+ static const bool forceMoth = !qEnvironmentVariableIsEmpty("QV4_FORCE_INTERPRETER");
if (forceMoth)
factory = new Moth::ISelFactory;
else
diff --git a/src/qml/jsruntime/qv4objectiterator.cpp b/src/qml/jsruntime/qv4objectiterator.cpp
index 7f97872092..1413f439b1 100644
--- a/src/qml/jsruntime/qv4objectiterator.cpp
+++ b/src/qml/jsruntime/qv4objectiterator.cpp
@@ -68,7 +68,7 @@ void ObjectIterator::init(const Object *o)
object->setM(o ? o->m() : 0);
current->setM(o ? o->m() : 0);
-#if QT_POINTER_SIZE == 4
+#ifndef QV4_USE_64_BIT_VALUE_ENCODING
object->setTag(QV4::Value::Managed_Type);
current->setTag(QV4::Value::Managed_Type);
#endif
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 0d7a1851b8..a988313f5f 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -1146,6 +1146,28 @@ QV4::ReturnedValue Runtime::typeofName(ExecutionEngine *engine, int nameIndex)
return Runtime::typeofValue(engine, prop);
}
+#ifndef V4_BOOTSTRAP
+ReturnedValue Runtime::typeofScopeObjectProperty(ExecutionEngine *engine, const Value &context,
+ int propertyIndex)
+{
+ Scope scope(engine);
+ ScopedValue prop(scope, getQmlScopeObjectProperty(engine, context, propertyIndex));
+ if (scope.engine->hasException)
+ return Encode::undefined();
+ return Runtime::typeofValue(engine, prop);
+}
+
+ReturnedValue Runtime::typeofContextObjectProperty(ExecutionEngine *engine, const Value &context,
+ int propertyIndex)
+{
+ Scope scope(engine);
+ ScopedValue prop(scope, getQmlContextObjectProperty(engine, context, propertyIndex));
+ if (scope.engine->hasException)
+ return Encode::undefined();
+ return Runtime::typeofValue(engine, prop);
+}
+#endif // V4_BOOTSTRAP
+
QV4::ReturnedValue Runtime::typeofMember(ExecutionEngine *engine, const Value &base, int nameIndex)
{
Scope scope(engine);
@@ -1341,13 +1363,13 @@ unsigned Runtime::doubleToUInt(const double &d)
return Primitive::toUInt32(d);
}
+#ifndef V4_BOOTSTRAP
+
ReturnedValue Runtime::getQmlContext(NoThrowEngine *engine)
{
return engine->qmlContext()->asReturnedValue();
}
-#ifndef V4_BOOTSTRAP
-
ReturnedValue Runtime::regexpLiteral(ExecutionEngine *engine, int id)
{
return engine->current->compilationUnit->runtimeRegularExpressions[id].asReturnedValue();
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index 571abac21e..0d81edca1e 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -127,6 +127,8 @@ struct Q_QML_PRIVATE_EXPORT Runtime {
// typeof
static ReturnedValue typeofValue(ExecutionEngine *engine, const Value &val);
static ReturnedValue typeofName(ExecutionEngine *engine, int nameIndex);
+ static ReturnedValue typeofScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex);
+ static ReturnedValue typeofContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex);
static ReturnedValue typeofMember(ExecutionEngine *engine, const Value &base, int nameIndex);
static ReturnedValue typeofElement(ExecutionEngine *engine, const Value &base, const Value &index);
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 101d3dcb3c..f6361681a5 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -120,7 +120,7 @@ struct ScopedValue
{
ptr = scope.engine->jsStackTop++;
ptr->setM(o);
-#if QT_POINTER_SIZE == 4
+#ifndef QV4_USE_64_BIT_VALUE_ENCODING
ptr->setTag(QV4::Value::Managed_Type);
#endif
}
@@ -144,7 +144,7 @@ struct ScopedValue
ScopedValue &operator=(Heap::Base *o) {
ptr->setM(o);
-#if QT_POINTER_SIZE == 4
+#ifndef QV4_USE_64_BIT_VALUE_ENCODING
ptr->setTag(QV4::Value::Managed_Type);
#endif
return *this;
@@ -186,7 +186,7 @@ struct Scoped
inline void setPointer(const Managed *p) {
ptr->setM(p ? p->m() : 0);
-#if QT_POINTER_SIZE == 4
+#ifndef QV4_USE_64_BIT_VALUE_ENCODING
ptr->setTag(QV4::Value::Managed_Type);
#endif
}
@@ -195,7 +195,7 @@ struct Scoped
{
ptr = scope.engine->jsStackTop++;
ptr->setM(0);
-#if QT_POINTER_SIZE == 4
+#ifndef QV4_USE_64_BIT_VALUE_ENCODING
ptr->setTag(QV4::Value::Managed_Type);
#endif
}
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 68f996c4c7..024a72bde2 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -684,6 +684,14 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
STOREVALUE(instr.result, Runtime::deleteName(engine, instr.name));
MOTH_END_INSTR(CallBuiltinDeleteName)
+ MOTH_BEGIN_INSTR(CallBuiltinTypeofScopeObjectProperty)
+ STOREVALUE(instr.result, Runtime::typeofScopeObjectProperty(engine, VALUE(instr.base), instr.index));
+ MOTH_END_INSTR(CallBuiltinTypeofMember)
+
+ MOTH_BEGIN_INSTR(CallBuiltinTypeofContextObjectProperty)
+ STOREVALUE(instr.result, Runtime::typeofContextObjectProperty(engine, VALUE(instr.base), instr.index));
+ MOTH_END_INSTR(CallBuiltinTypeofMember)
+
MOTH_BEGIN_INSTR(CallBuiltinTypeofMember)
STOREVALUE(instr.result, Runtime::typeofMember(engine, VALUE(instr.base), instr.member));
MOTH_END_INSTR(CallBuiltinTypeofMember)
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index 0887e43441..5181bf912b 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -70,6 +70,36 @@ using namespace WTF;
QT_BEGIN_NAMESPACE
+static uint maxShiftValue()
+{
+ static uint result = 0;
+ if (!result) {
+ result = 6;
+ if (Q_UNLIKELY(qEnvironmentVariableIsSet("QV4_MM_MAXBLOCK_SHIFT"))) {
+ bool ok;
+ const uint overrideValue = qgetenv("QV4_MM_MAXBLOCK_SHIFT").toUInt(&ok);
+ if (ok && overrideValue <= 11 && overrideValue > 0)
+ result = overrideValue;
+ }
+ }
+ return result;
+}
+
+static std::size_t maxChunkSizeValue()
+{
+ static std::size_t result = 0;
+ if (!result) {
+ result = 32 * 1024;
+ if (Q_UNLIKELY(qEnvironmentVariableIsSet("QV4_MM_MAX_CHUNK_SIZE"))) {
+ bool ok;
+ const std::size_t overrideValue = qgetenv("QV4_MM_MAX_CHUNK_SIZE").toUInt(&ok);
+ if (ok)
+ result = overrideValue;
+ }
+ }
+ return result;
+}
+
using namespace QV4;
struct MemoryManager::Data
@@ -120,11 +150,13 @@ struct MemoryManager::Data
Data()
: gcBlocked(false)
+ , aggressiveGC(!qEnvironmentVariableIsEmpty("QV4_MM_AGGRESSIVE_GC"))
+ , gcStats(!qEnvironmentVariableIsEmpty("QV4_MM_STATS"))
, engine(0)
, totalItems(0)
, totalAlloc(0)
- , maxShift(6)
- , maxChunkSize(32*1024)
+ , maxShift(maxShiftValue())
+ , maxChunkSize(maxChunkSizeValue())
, unmanagedHeapSize(0)
, unmanagedHeapSizeGCLimit(MIN_UNMANAGED_HEAPSIZE_GC_LIMIT)
, largeItems(0)
@@ -134,19 +166,6 @@ struct MemoryManager::Data
memset(nChunks, 0, sizeof(nChunks));
memset(availableItems, 0, sizeof(availableItems));
memset(allocCount, 0, sizeof(allocCount));
- aggressiveGC = !qgetenv("QV4_MM_AGGRESSIVE_GC").isEmpty();
- gcStats = !qgetenv("QV4_MM_STATS").isEmpty();
-
- QByteArray overrideMaxShift = qgetenv("QV4_MM_MAXBLOCK_SHIFT");
- bool ok;
- uint override = overrideMaxShift.toUInt(&ok);
- if (ok && override <= 11 && override > 0)
- maxShift = override;
-
- QByteArray maxChunkString = qgetenv("QV4_MM_MAX_CHUNK_SIZE");
- std::size_t tmpMaxChunkSize = maxChunkString.toUInt(&ok);
- if (ok)
- maxChunkSize = tmpMaxChunkSize;
}
~Data()
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 56252ec1ab..ae7c0cf8fb 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -2437,6 +2437,8 @@ bool QQml_isFileCaseCorrect(const QString &fileName, int lengthIn /* = -1 */)
Returns the QQmlEngine associated with \a object, if any. This is equivalent to
QQmlEngine::contextForObject(object)->engine(), but more efficient.
+ \note Add \c{#include <QtQml>} to use this function.
+
\sa {QQmlEngine::contextForObject()}{contextForObject()}, qmlContext()
*/
@@ -2447,6 +2449,8 @@ bool QQml_isFileCaseCorrect(const QString &fileName, int lengthIn /* = -1 */)
Returns the QQmlContext associated with \a object, if any. This is equivalent to
QQmlEngine::contextForObject(object).
+ \note Add \c{#include <QtQml>} to use this function.
+
\sa {QQmlEngine::contextForObject()}{contextForObject()}, qmlEngine()
*/
diff --git a/src/qml/qml/qqmlfileselector.cpp b/src/qml/qml/qqmlfileselector.cpp
index 8597e8a5c7..ab880b7069 100644
--- a/src/qml/qml/qqmlfileselector.cpp
+++ b/src/qml/qml/qqmlfileselector.cpp
@@ -123,6 +123,12 @@ QQmlFileSelectorPrivate::QQmlFileSelectorPrivate()
myInstance.reset(new QQmlFileSelectorInterceptor(this));
}
+QQmlFileSelectorPrivate::~QQmlFileSelectorPrivate()
+{
+ if (ownSelector)
+ delete selector;
+}
+
/*!
Sets the QFileSelector instance for use by the QQmlFileSelector to \a selector.
QQmlFileSelector does not take ownership of the new QFileSelector. To reset QQmlFileSelector
diff --git a/src/qml/qml/qqmlfileselector_p.h b/src/qml/qml/qqmlfileselector_p.h
index 58248bf1c1..46ea027bc1 100644
--- a/src/qml/qml/qqmlfileselector_p.h
+++ b/src/qml/qml/qqmlfileselector_p.h
@@ -60,6 +60,8 @@ class Q_QML_PRIVATE_EXPORT QQmlFileSelectorPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QQmlFileSelector)
public:
QQmlFileSelectorPrivate();
+ ~QQmlFileSelectorPrivate();
+
QFileSelector* selector;
QPointer<QQmlEngine> engine;
bool ownSelector;
diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h
index b7212648ab..23cfc24e7a 100644
--- a/src/qml/qml/qqmlglobal_p.h
+++ b/src/qml/qml/qqmlglobal_p.h
@@ -59,10 +59,12 @@ QT_BEGIN_NAMESPACE
{ \
static enum { Yes, No, Unknown } status = Unknown; \
if (status == Unknown) { \
- QByteArray v = qgetenv(#var); \
- bool value = !v.isEmpty() && v != "0" && v != "false"; \
- if (value) status = Yes; \
- else status = No; \
+ status = No; \
+ if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty(#var))) { \
+ const QByteArray v = qgetenv(#var); \
+ if (v != "0" && v != "false") \
+ status = Yes; \
+ } \
} \
return status == Yes; \
}
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index d0d14d9416..c5b5947c11 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -1570,8 +1570,8 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
addImportPath(installImportsPath);
// env import paths
- QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
- if (!envImportPath.isEmpty()) {
+ if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) {
+ const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
#if defined(Q_OS_WIN)
QLatin1Char pathSep(';');
#else
diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h
index 0c2fbbdb14..aa6b2e8681 100644
--- a/src/qml/qml/qqmllocale_p.h
+++ b/src/qml/qml/qqmllocale_p.h
@@ -82,7 +82,7 @@ private:
};
-class Q_AUTOTEST_EXPORT QQmlLocale
+class Q_QML_PRIVATE_EXPORT QQmlLocale
{
Q_GADGET
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 270c28c399..29f1ca7959 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -911,97 +911,116 @@ void QQmlTypeLoader::unlock()
m_thread->unlock();
}
-/*!
-Load the provided \a blob from the network or filesystem.
+struct PlainLoader {
+ void loadThread(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->loadThread(blob);
+ }
+ void load(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->m_thread->load(blob);
+ }
+ void loadAsync(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->m_thread->loadAsync(blob);
+ }
+};
-The loader must be locked.
-*/
-void QQmlTypeLoader::load(QQmlDataBlob *blob, Mode mode)
+struct StaticLoader {
+ const QByteArray &data;
+ StaticLoader(const QByteArray &data) : data(data) {}
+
+ void loadThread(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->loadWithStaticDataThread(blob, data);
+ }
+ void load(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->m_thread->loadWithStaticData(blob, data);
+ }
+ void loadAsync(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->m_thread->loadWithStaticDataAsync(blob, data);
+ }
+};
+
+struct CachedLoader {
+ const QQmlPrivate::CachedQmlUnit *unit;
+ CachedLoader(const QQmlPrivate::CachedQmlUnit *unit) : unit(unit) {}
+
+ void loadThread(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->loadWithCachedUnitThread(blob, unit);
+ }
+ void load(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->m_thread->loadWithCachedUnit(blob, unit);
+ }
+ void loadAsync(QQmlTypeLoader *loader, QQmlDataBlob *blob) const
+ {
+ loader->m_thread->loadWithCachedUnit(blob, unit);
+ }
+};
+
+template<typename Loader>
+void QQmlTypeLoader::doLoad(const Loader &loader, QQmlDataBlob *blob, Mode mode)
{
#ifdef DATABLOB_DEBUG
- qWarning("QQmlTypeLoader::load(%s): %s thread", qPrintable(blob->m_url.toString()),
+ qWarning("QQmlTypeLoader::doLoad(%s): %s thread", qPrintable(blob->m_url.toString()),
m_thread->isThisThread()?"Compile":"Engine");
#endif
blob->startLoading();
if (m_thread->isThisThread()) {
unlock();
- loadThread(blob);
+ loader.loadThread(this, blob);
lock();
- } else if (mode == PreferSynchronous) {
+ } else if (mode == Asynchronous) {
+ blob->m_data.setIsAsync(true);
unlock();
- m_thread->load(blob);
+ loader.loadAsync(this, blob);
lock();
- if (!blob->isCompleteOrError())
- blob->m_data.setIsAsync(true);
} else {
- Q_ASSERT(mode == Asynchronous);
- blob->m_data.setIsAsync(true);
unlock();
- m_thread->loadAsync(blob);
+ loader.load(this, blob);
lock();
+ if (mode == PreferSynchronous) {
+ if (!blob->isCompleteOrError())
+ blob->m_data.setIsAsync(true);
+ } else {
+ Q_ASSERT(mode == Synchronous);
+ while (!blob->isCompleteOrError()) {
+ unlock();
+ m_thread->waitForNextMessage();
+ lock();
+ }
+ }
}
}
/*!
-Load the provided \a blob with \a data. The blob's URL is not used by the data loader in this case.
+Load the provided \a blob from the network or filesystem.
The loader must be locked.
*/
-void QQmlTypeLoader::loadWithStaticData(QQmlDataBlob *blob, const QByteArray &data, Mode mode)
+void QQmlTypeLoader::load(QQmlDataBlob *blob, Mode mode)
{
-#ifdef DATABLOB_DEBUG
- qWarning("QQmlTypeLoader::loadWithStaticData(%s, data): %s thread", qPrintable(blob->m_url.toString()),
- m_thread->isThisThread()?"Compile":"Engine");
-#endif
+ doLoad(PlainLoader(), blob, mode);
+}
- blob->startLoading();
+/*!
+Load the provided \a blob with \a data. The blob's URL is not used by the data loader in this case.
- if (m_thread->isThisThread()) {
- unlock();
- loadWithStaticDataThread(blob, data);
- lock();
- } else if (mode == PreferSynchronous) {
- unlock();
- m_thread->loadWithStaticData(blob, data);
- lock();
- if (!blob->isCompleteOrError())
- blob->m_data.setIsAsync(true);
- } else {
- Q_ASSERT(mode == Asynchronous);
- blob->m_data.setIsAsync(true);
- unlock();
- m_thread->loadWithStaticDataAsync(blob, data);
- lock();
- }
+The loader must be locked.
+*/
+void QQmlTypeLoader::loadWithStaticData(QQmlDataBlob *blob, const QByteArray &data, Mode mode)
+{
+ doLoad(StaticLoader(data), blob, mode);
}
void QQmlTypeLoader::loadWithCachedUnit(QQmlDataBlob *blob, const QQmlPrivate::CachedQmlUnit *unit, Mode mode)
{
-#ifdef DATABLOB_DEBUG
- qWarning("QQmlTypeLoader::loadWithUnitFcatory(%s, data): %s thread", qPrintable(blob->m_url.toString()),
- m_thread->isThisThread()?"Compile":"Engine");
-#endif
-
- blob->startLoading();
-
- if (m_thread->isThisThread()) {
- unlock();
- loadWithCachedUnitThread(blob, unit);
- lock();
- } else if (mode == PreferSynchronous) {
- unlock();
- m_thread->loadWithCachedUnit(blob, unit);
- lock();
- if (!blob->isCompleteOrError())
- blob->m_data.setIsAsync(true);
- } else {
- Q_ASSERT(mode == Asynchronous);
- blob->m_data.setIsAsync(true);
- unlock();
- m_thread->loadWithCachedUnitAsync(blob, unit);
- lock();
- }
+ doLoad(CachedLoader(unit), blob, mode);
}
void QQmlTypeLoader::loadWithStaticDataThread(QQmlDataBlob *blob, const QByteArray &data)
@@ -1618,7 +1637,7 @@ QQmlTypeData *QQmlTypeLoader::getType(const QUrl &url, Mode mode)
} else {
QQmlTypeLoader::load(typeData, mode);
}
- } else if ((mode == PreferSynchronous) && QQmlFile::isSynchronous(url)) {
+ } else if ((mode == PreferSynchronous || mode == Synchronous) && QQmlFile::isSynchronous(url)) {
// this was started Asynchronous, but we need to force Synchronous
// completion now (if at all possible with this type of URL).
@@ -1643,12 +1662,12 @@ QQmlTypeData *QQmlTypeLoader::getType(const QUrl &url, Mode mode)
Returns a QQmlTypeData for the given \a data with the provided base \a url. The
QQmlTypeData will not be cached.
*/
-QQmlTypeData *QQmlTypeLoader::getType(const QByteArray &data, const QUrl &url)
+QQmlTypeData *QQmlTypeLoader::getType(const QByteArray &data, const QUrl &url, Mode mode)
{
LockHolder<QQmlTypeLoader> holder(this);
QQmlTypeData *typeData = new QQmlTypeData(url, this);
- QQmlTypeLoader::loadWithStaticData(typeData, data);
+ QQmlTypeLoader::loadWithStaticData(typeData, data, mode);
return typeData;
}
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h
index e7b4b8f95b..6433601ba8 100644
--- a/src/qml/qml/qqmltypeloader_p.h
+++ b/src/qml/qml/qqmltypeloader_p.h
@@ -215,7 +215,7 @@ class Q_AUTOTEST_EXPORT QQmlTypeLoader
{
Q_DECLARE_TR_FUNCTIONS(QQmlTypeLoader)
public:
- enum Mode { PreferSynchronous, Asynchronous };
+ enum Mode { PreferSynchronous, Asynchronous, Synchronous };
class Q_QML_PRIVATE_EXPORT Blob : public QQmlDataBlob
{
@@ -283,7 +283,7 @@ public:
QQmlImportDatabase *importDatabase();
QQmlTypeData *getType(const QUrl &url, Mode mode = PreferSynchronous);
- QQmlTypeData *getType(const QByteArray &, const QUrl &url);
+ QQmlTypeData *getType(const QByteArray &, const QUrl &url, Mode mode = PreferSynchronous);
QQmlScriptBlob *getScript(const QUrl &);
QQmlQmldirData *getQmldir(const QUrl &);
@@ -362,6 +362,13 @@ private:
QmldirCache m_qmldirCache;
ImportDirCache m_importDirCache;
ImportQmlDirCache m_importQmlDirCache;
+
+ template<typename Loader>
+ void doLoad(const Loader &loader, QQmlDataBlob *blob, Mode mode);
+
+ friend struct PlainLoader;
+ friend struct CachedLoader;
+ friend struct StaticLoader;
};
class Q_AUTOTEST_EXPORT QQmlTypeData : public QQmlTypeLoader::Blob
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 89088e5b3e..3acabe390f 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -1013,8 +1013,13 @@ ReturnedValue QtObject::method_createQmlObject(CallContext *ctx)
if (!parentArg)
V4THROW_ERROR("Qt.createQmlObject(): Missing parent object");
+ QQmlTypeData *typeData = QQmlEnginePrivate::get(engine)->typeLoader.getType(
+ qml.toUtf8(), url, QQmlTypeLoader::Synchronous);
+ Q_ASSERT(typeData->isCompleteOrError());
QQmlComponent component(engine);
- component.setData(qml.toUtf8(), url);
+ QQmlComponentPrivate *componentPrivate = QQmlComponentPrivate::get(&component);
+ componentPrivate->fromTypeData(typeData);
+ componentPrivate->progress = 1.0;
if (component.isError()) {
ScopedValue v(scope, Error::create(ctx->d()->engine, component.errors()));
diff --git a/src/qml/types/qqmlbind.cpp b/src/qml/types/qqmlbind.cpp
index df429e5bc1..bd893bd2f4 100644
--- a/src/qml/types/qqmlbind.cpp
+++ b/src/qml/types/qqmlbind.cpp
@@ -221,6 +221,23 @@ void QQmlBind::setObject(QObject *obj)
\qmlproperty string QtQml::Binding::property
The property to be updated.
+
+ This can be a group property if the expression results in accessing a
+ property of a \l {QML Basic Types}{value type}. For example:
+
+ \qml
+ Item {
+ id: item
+
+ property rect rectangle: Qt.rect(0, 0, 200, 200)
+ }
+
+ Binding {
+ target: item
+ property: "rectangle.x"
+ value: 100
+ }
+ \endqml
*/
QString QQmlBind::property() const
{
diff --git a/src/qml/types/qqmlitemselectionmodel.qdoc b/src/qml/types/qqmlitemselectionmodel.qdoc
index b4da0c63f3..c223ef614e 100644
--- a/src/qml/types/qqmlitemselectionmodel.qdoc
+++ b/src/qml/types/qqmlitemselectionmodel.qdoc
@@ -55,7 +55,7 @@
It will trigger property binding updates every time \l selectionChanged()
is emitted, even though its value hasn't changed.
- \sa selection(), selectedIndexes(), select(), selectionChanged()
+ \sa selection(), selectedIndexes, select(), selectionChanged()
*/
/*!
diff --git a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
index e928adba9c..324fc9750f 100644
--- a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
+++ b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
@@ -371,13 +371,12 @@ or removed from a positioner.
Transitions for adding items apply to items that are created as part of a
positioner, as well as those that are reparented to become children of a
positioner.
+
Transitions for removing items apply to items within a positioner that are
deleted, as well as those that are removed from a positioner and given new
parents in a document.
-Additionally, changing the opacity of items to zero will cause them to
-disappear using the remove transition, and making the opacity non-zero will
-cause them to appear using the add transition.
-
-
+\note Changing the opacity of items to zero will not cause them to
+disappear from the positioner. They can be removed and re-added by changing
+the visible property.
*/
diff --git a/src/quick/items/items.pri b/src/quick/items/items.pri
index 0b98782566..ab966b6ccc 100644
--- a/src/quick/items/items.pri
+++ b/src/quick/items/items.pri
@@ -23,6 +23,7 @@ HEADERS += \
$$PWD/qquicktextcontrol_p.h \
$$PWD/qquicktextcontrol_p_p.h \
$$PWD/qquicktextdocument.h \
+ $$PWD/qquicktextdocument_p.h \
$$PWD/qquicktextedit_p.h \
$$PWD/qquicktextedit_p_p.h \
$$PWD/qquicktextutil_p.h \
diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp
index 5e653e426c..e37ed6c18c 100644
--- a/src/quick/items/qquickanimatedsprite.cpp
+++ b/src/quick/items/qquickanimatedsprite.cpp
@@ -374,6 +374,7 @@ void QQuickAnimatedSprite::stop()
return;
m_pauseOffset = 0;
emit runningChanged(false);
+ update();
}
/*!
@@ -391,6 +392,7 @@ void QQuickAnimatedSprite::advance(int frames)
m_curFrame += m_spriteEngine->maxFrames();
m_curFrame = m_curFrame % m_spriteEngine->maxFrames();
emit currentFrameChanged(m_curFrame);
+ update();
}
/*!
@@ -408,6 +410,7 @@ void QQuickAnimatedSprite::pause()
m_pauseOffset = m_timestamp.elapsed();
m_paused = true;
emit pausedChanged(true);
+ update();
}
/*!
@@ -425,6 +428,7 @@ void QQuickAnimatedSprite::resume()
m_pauseOffset = m_pauseOffset - m_timestamp.elapsed();
m_paused = false;
emit pausedChanged(false);
+ update();
}
void QQuickAnimatedSprite::createEngine()
@@ -436,6 +440,7 @@ void QQuickAnimatedSprite::createEngine()
m_spriteEngine = new QQuickSpriteEngine(QList<QQuickSprite*>(spriteList), this);
m_spriteEngine->startAssemblingImage();
reset();
+ update();
}
static QSGGeometry::Attribute AnimatedSprite_Attributes[] = {
@@ -555,9 +560,12 @@ QSGNode *QQuickAnimatedSprite::updatePaintNode(QSGNode *, UpdatePaintNodeData *)
prepareNextFrame();
if (m_running) {
- update();
- if (m_node)
+ if (!m_paused)
+ update();
+
+ if (m_node) {
m_node->markDirty(QSGNode::DirtyMaterial);
+ }
}
return m_node;
@@ -614,12 +622,16 @@ void QQuickAnimatedSprite::prepareNextFrame()
frameAt = 0;
m_running = false;
emit runningChanged(false);
+ update();
}
} else {
frameAt = m_curFrame;
}
- if (m_curFrame != lastFrame && isCurrentFrameChangedConnected())
- emit currentFrameChanged(m_curFrame);
+ if (m_curFrame != lastFrame) {
+ if (isCurrentFrameChangedConnected())
+ emit currentFrameChanged(m_curFrame);
+ update();
+ }
qreal frameCount = m_spriteEngine->spriteFrames();
bool reverse = m_spriteEngine->sprite()->reverse();
diff --git a/src/quick/items/qquickanimatedsprite_p.h b/src/quick/items/qquickanimatedsprite_p.h
index fa022af4ee..87d489a60a 100644
--- a/src/quick/items/qquickanimatedsprite_p.h
+++ b/src/quick/items/qquickanimatedsprite_p.h
@@ -344,6 +344,7 @@ public Q_SLOTS:
if (m_curFrame != arg) {
m_curFrame = arg;
Q_EMIT currentFrameChanged(arg); //TODO-C Only emitted on manual advance!
+ update();
}
}
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index 1380452718..520b9d46bb 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -322,7 +322,7 @@ Item {
/*!
\qmlproperty point QtQuick::WheelEvent::pixelDelta
- This property holds the delta in screen pixels and is available in plataforms that
+ This property holds the delta in screen pixels and is available in platforms that
have high-resolution trackpads, such as OS X.
The x and y cordinate of this property holds the delta in horizontal and
vertical orientation. The value should be used directly to scroll content on screen.
diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp
index 483d86c97d..20f4551af9 100644
--- a/src/quick/items/qquickimage.cpp
+++ b/src/quick/items/qquickimage.cpp
@@ -196,7 +196,6 @@ void QQuickImagePrivate::setPixmap(const QQuickPixmap &pixmap)
Set this property to define what happens when the source image has a different size
than the item.
-
\list
\li Image.Stretch - the image is scaled to fit
\li Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping
@@ -309,8 +308,8 @@ void QQuickImage::setFillMode(FillMode mode)
\qmlproperty real QtQuick::Image::paintedHeight
These properties hold the size of the image that is actually painted.
- In most cases it is the same as \c width and \c height, but when using a
- \c fillMode \c PreserveAspectFit or \c fillMode \c PreserveAspectCrop
+ In most cases it is the same as \c width and \c height, but when using an
+ \l {fillMode}{Image.PreserveAspectFit} or an \l {fillMode}{Image.PreserveAspectCrop}
\c paintedWidth or \c paintedHeight can be smaller or larger than
\c width and \c height of the Image item.
*/
diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp
index c37e6c942c..073fe58e7b 100644
--- a/src/quick/items/qquickimagebase.cpp
+++ b/src/quick/items/qquickimagebase.cpp
@@ -358,7 +358,7 @@ void QQuickImageBase::resolve2xLocalFile(const QUrl &url, qreal targetDevicePixe
Q_ASSERT(sourceDevicePixelRatio);
// Bail out if "@2x" image loading is disabled, don't change the source url or devicePixelRatio.
- static bool disable2xImageLoading = !qgetenv("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING").isEmpty();
+ static const bool disable2xImageLoading = !qEnvironmentVariableIsEmpty("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING");
if (disable2xImageLoading)
return;
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index bf53b0f3ea..23d13c2fd4 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -72,14 +72,14 @@
#endif
#include <algorithm>
-#include <float.h>
+#include <limits>
// XXX todo Check that elements that create items handle memory correctly after visual ownership change
QT_BEGIN_NAMESPACE
#ifndef QT_NO_DEBUG
-static bool qsg_leak_check = !qgetenv("QML_LEAK_CHECK").isEmpty();
+static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK");
#endif
void debugFocusTree(QQuickItem *item, QQuickItem *scope = 0, int depth = 1)
@@ -217,8 +217,8 @@ bool QQuickContents::calcHeight(QQuickItem *changed)
m_y = top;
m_height = bottom - top;
} else {
- qreal top = FLT_MAX;
- qreal bottom = 0;
+ qreal top = std::numeric_limits<qreal>::max();
+ qreal bottom = -std::numeric_limits<qreal>::max();
QList<QQuickItem *> children = m_item->childItems();
for (int i = 0; i < children.count(); ++i) {
QQuickItem *child = children.at(i);
@@ -252,8 +252,8 @@ bool QQuickContents::calcWidth(QQuickItem *changed)
m_x = left;
m_width = right - left;
} else {
- qreal left = FLT_MAX;
- qreal right = 0;
+ qreal left = std::numeric_limits<qreal>::max();
+ qreal right = -std::numeric_limits<qreal>::max();
QList<QQuickItem *> children = m_item->childItems();
for (int i = 0; i < children.count(); ++i) {
QQuickItem *child = children.at(i);
@@ -724,6 +724,7 @@ void QQuickKeyNavigationAttached::setFocusNavigation(QQuickItem *currentItem, co
{
QQuickItem *initialItem = currentItem;
bool isNextItem = false;
+ QVector<QQuickItem *> visitedItems;
do {
isNextItem = false;
if (currentItem->isVisible() && currentItem->isEnabled()) {
@@ -734,13 +735,14 @@ void QQuickKeyNavigationAttached::setFocusNavigation(QQuickItem *currentItem, co
if (attached) {
QQuickItem *tempItem = qvariant_cast<QQuickItem*>(attached->property(dir));
if (tempItem) {
+ visitedItems.append(currentItem);
currentItem = tempItem;
isNextItem = true;
}
}
}
}
- while (currentItem != initialItem && isNextItem);
+ while (currentItem != initialItem && isNextItem && !visitedItems.contains(currentItem));
}
struct SigMap {
@@ -2602,7 +2604,7 @@ void QQuickItem::setParentItem(QQuickItem *parentItem)
QQuickItem *itemAncestor = parentItem;
while (itemAncestor != 0) {
if (itemAncestor == this) {
- qWarning("QQuickItem::setParentItem: Parent is already part of this items subtree.");
+ qWarning() << "QQuickItem::setParentItem: Parent" << parentItem << "is already part of the subtree of" << this;
return;
}
itemAncestor = itemAncestor->parentItem();
@@ -5918,7 +5920,7 @@ void QQuickItemPrivate::itemChange(QQuickItem::ItemChange change, const QQuickIt
In Qt Quick 2.0, this property has minimal impact on performance.
- By default is true.
+ By default, this property is set to \c true.
*/
/*!
\property QQuickItem::smooth
@@ -5930,7 +5932,7 @@ void QQuickItemPrivate::itemChange(QQuickItem::ItemChange change, const QQuickIt
In Qt Quick 2.0, this property has minimal impact on performance.
- By default is true.
+ By default, this property is set to \c true.
*/
bool QQuickItem::smooth() const
{
@@ -5952,10 +5954,10 @@ void QQuickItem::setSmooth(bool smooth)
/*!
\qmlproperty bool QtQuick::Item::activeFocusOnTab
- This property holds whether the item wants to be in tab focus
- chain. By default this is set to false.
+ This property holds whether the item wants to be in the tab focus
+ chain. By default, this is set to \c false.
- The tab focus chain traverses elements by visiting first the
+ The tab focus chain traverses elements by first visiting the
parent, and then its children in the order they occur in the
children property. Pressing the tab key on an item in the tab
focus chain will move keyboard focus to the next item in the
@@ -5964,14 +5966,14 @@ void QQuickItem::setSmooth(bool smooth)
To set up a manual tab focus chain, see \l KeyNavigation. Tab
key events used by Keys or KeyNavigation have precedence over
- focus chain behavior, ignore the events in other key handlers
+ focus chain behavior; ignore the events in other key handlers
to allow it to propagate.
*/
/*!
\property QQuickItem::activeFocusOnTab
- This property holds whether the item wants to be in tab focus
- chain. By default this is set to false.
+ This property holds whether the item wants to be in the tab focus
+ chain. By default, this is set to \c false.
*/
bool QQuickItem::activeFocusOnTab() const
{
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp
index 302532c3d1..05bf50574c 100644
--- a/src/quick/items/qquickpathview.cpp
+++ b/src/quick/items/qquickpathview.cpp
@@ -753,7 +753,7 @@ void QQuickPathView::setCurrentIndex(int idx)
if (d->modelCount) {
d->createCurrentItem();
if (d->haveHighlightRange && d->highlightRangeMode == QQuickPathView::StrictlyEnforceRange)
- d->snapToIndex(d->currentIndex);
+ d->snapToIndex(d->currentIndex, QQuickPathViewPrivate::SetIndex);
d->currentItemOffset = d->positionOfIndex(d->currentIndex);
d->updateHighlight();
}
@@ -988,7 +988,7 @@ void QQuickPathView::setHighlightRangeMode(HighlightRangeMode mode)
d->regenerate();
int index = d->highlightRangeMode != NoHighlightRange ? d->currentIndex : d->calcCurrentIndex();
if (index >= 0)
- d->snapToIndex(index);
+ d->snapToIndex(index, QQuickPathViewPrivate::Other);
}
emit highlightRangeModeChanged();
}
@@ -2306,12 +2306,12 @@ void QQuickPathViewPrivate::fixOffset()
if (curr != currentIndex && highlightRangeMode == QQuickPathView::StrictlyEnforceRange)
q->setCurrentIndex(curr);
else
- snapToIndex(curr);
+ snapToIndex(curr, Other);
}
}
}
-void QQuickPathViewPrivate::snapToIndex(int index)
+void QQuickPathViewPrivate::snapToIndex(int index, MovementReason reason)
{
if (!model || modelCount <= 0)
return;
@@ -2321,7 +2321,7 @@ void QQuickPathViewPrivate::snapToIndex(int index)
if (offset == targetOffset)
return;
- moveReason = Other;
+ moveReason = reason;
offsetAdj = 0.0;
tl.reset(moveOffset);
moveOffset.setValue(offset);
diff --git a/src/quick/items/qquickpathview_p_p.h b/src/quick/items/qquickpathview_p_p.h
index 2a497881d4..73e4884424 100644
--- a/src/quick/items/qquickpathview_p_p.h
+++ b/src/quick/items/qquickpathview_p_p.h
@@ -114,7 +114,8 @@ public:
void setAdjustedOffset(qreal offset);
void regenerate();
void updateItem(QQuickItem *, qreal);
- void snapToIndex(int index);
+ enum MovementReason { Other, SetIndex, Mouse };
+ void snapToIndex(int index, MovementReason reason);
QPointF pointNear(const QPointF &point, qreal *nearPercent=0) const;
void addVelocitySample(qreal v);
qreal calcVelocity() const;
@@ -163,7 +164,6 @@ public:
QList<QQuickItem *> itemCache;
QPointer<QQmlInstanceModel> model;
QVariant modelVariant;
- enum MovementReason { Other, SetIndex, Mouse };
MovementReason moveReason;
enum MovementDirection { Shortest, Negative, Positive };
MovementDirection moveDirection;
diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp
index b84a4adaab..ed9e29d599 100644
--- a/src/quick/items/qquickshadereffectnode.cpp
+++ b/src/quick/items/qquickshadereffectnode.cpp
@@ -350,11 +350,22 @@ uint qHash(const QQuickShaderEffectMaterialKey &key)
return hash;
}
-
-typedef QHash<QQuickShaderEffectMaterialKey, QWeakPointer<QSGMaterialType> > MaterialHash;
-
-Q_GLOBAL_STATIC(MaterialHash, materialHash)
-Q_GLOBAL_STATIC(QMutex, materialHashMutex)
+class QQuickShaderEffectMaterialCache : public QObject
+{
+ Q_OBJECT
+public:
+ static QQuickShaderEffectMaterialCache *get(bool create = true) {
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ QQuickShaderEffectMaterialCache *me = ctx->findChild<QQuickShaderEffectMaterialCache *>(QStringLiteral("__qt_ShaderEffectCache"), Qt::FindDirectChildrenOnly);
+ if (!me && create) {
+ me = new QQuickShaderEffectMaterialCache();
+ me->setObjectName(QStringLiteral("__qt_ShaderEffectCache"));
+ me->setParent(ctx);
+ }
+ return me;
+ }
+ QHash<QQuickShaderEffectMaterialKey, QSGMaterialType *> cache;
+};
QQuickShaderEffectMaterial::QQuickShaderEffectMaterial(QQuickShaderEffectNode *node)
: cullMode(NoCulling)
@@ -367,7 +378,7 @@ QQuickShaderEffectMaterial::QQuickShaderEffectMaterial(QQuickShaderEffectNode *n
QSGMaterialType *QQuickShaderEffectMaterial::type() const
{
- return m_type.data();
+ return m_type;
}
QSGMaterialShader *QQuickShaderEffectMaterial::createShader() const
@@ -425,30 +436,23 @@ int QQuickShaderEffectMaterial::compare(const QSGMaterial *o) const
void QQuickShaderEffectMaterial::setProgramSource(const QQuickShaderEffectMaterialKey &source)
{
- QMutexLocker locker(materialHashMutex);
- Q_UNUSED(locker);
-
m_source = source;
m_emittedLogChanged = false;
- QWeakPointer<QSGMaterialType> weakPtr = materialHash->value(m_source);
- m_type = weakPtr.toStrongRef();
- if (m_type.isNull()) {
- m_type = QSharedPointer<QSGMaterialType>(new QSGMaterialType);
- materialHash->insert(m_source, m_type.toWeakRef());
+ QQuickShaderEffectMaterialCache *cache = QQuickShaderEffectMaterialCache::get();
+ m_type = cache->cache.value(m_source);
+ if (!m_type) {
+ m_type = new QSGMaterialType();
+ cache->cache.insert(source, m_type);
}
}
void QQuickShaderEffectMaterial::cleanupMaterialCache()
{
- QMutexLocker locker(materialHashMutex);
- Q_UNUSED(locker);
-
- for (MaterialHash::iterator it = materialHash->begin(); it != materialHash->end(); ) {
- if (!it.value().toStrongRef())
- it = materialHash->erase(it);
- else
- ++it;
+ QQuickShaderEffectMaterialCache *cache = QQuickShaderEffectMaterialCache::get(false);
+ if (cache) {
+ qDeleteAll(cache->cache.values());
+ delete cache;
}
}
@@ -501,4 +505,6 @@ void QQuickShaderEffectNode::preprocess()
static_cast<QQuickShaderEffectMaterial *>(material())->updateTextures();
}
+#include "qquickshadereffectnode.moc"
+
QT_END_NAMESPACE
diff --git a/src/quick/items/qquickshadereffectnode_p.h b/src/quick/items/qquickshadereffectnode_p.h
index 420ca1237b..76aecd1b04 100644
--- a/src/quick/items/qquickshadereffectnode_p.h
+++ b/src/quick/items/qquickshadereffectnode_p.h
@@ -73,7 +73,6 @@ struct QQuickShaderEffectMaterialKey {
uint qHash(const QQuickShaderEffectMaterialKey &key);
-
class QQuickCustomMaterialShader;
class QQuickShaderEffectNode;
class Q_QUICK_PRIVATE_EXPORT QQuickShaderEffectMaterial : public QSGMaterial
@@ -117,13 +116,12 @@ public:
protected:
friend class QQuickCustomMaterialShader;
- // The type pointer needs to be unique. It is not safe to let the type object be part of the
- // QQuickShaderEffectMaterial, since it can be deleted and a new one constructed on top of the old
- // one. The new QQuickShaderEffectMaterial would then get the same type pointer as the old one, and
- // CustomMaterialShaders based on the old one would incorrectly be used together with the new
- // one. To guarantee that the type pointer is unique, the type object must live as long as
- // there are any CustomMaterialShaders of that type.
- QSharedPointer<QSGMaterialType> m_type;
+ // Each material needs a unique type to ensure that the renderer has a one
+ // and exactly one GL program for every unique set of shader sources.
+ // setProgramSource() stores the sources in a cache along with the right
+ // type. The type is cleaned up in cleanupMaterialCache() which is called
+ // when the GL context is shut down.
+ QSGMaterialType *m_type;
QQuickShaderEffectMaterialKey m_source;
QQuickShaderEffectNode *m_node;
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index b89cfe8c04..d32b194803 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -40,6 +40,7 @@
#include "qquicktextnode_p.h"
#include "qquickimage_p_p.h"
#include "qquicktextutil_p.h"
+#include "qquicktextdocument_p.h"
#include <QtQuick/private/qsgtexture_p.h>
@@ -117,153 +118,6 @@ void QQuickTextPrivate::init()
q->setFlag(QQuickItem::ItemHasContents);
}
-QQuickTextDocumentWithImageResources::QQuickTextDocumentWithImageResources(QQuickItem *parent)
-: QTextDocument(parent), outstanding(0)
-{
- setUndoRedoEnabled(false);
- documentLayout()->registerHandler(QTextFormat::ImageObject, this);
- connect(this, SIGNAL(baseUrlChanged(QUrl)), this, SLOT(reset()));
-}
-
-QQuickTextDocumentWithImageResources::~QQuickTextDocumentWithImageResources()
-{
- if (!m_resources.isEmpty())
- qDeleteAll(m_resources);
-}
-
-QVariant QQuickTextDocumentWithImageResources::loadResource(int type, const QUrl &name)
-{
- QQmlContext *context = qmlContext(parent());
-
- if (type == QTextDocument::ImageResource) {
- QQuickPixmap *p = loadPixmap(context, name);
- return p->image();
- }
-
- return QTextDocument::loadResource(type, name);
-}
-
-void QQuickTextDocumentWithImageResources::requestFinished()
-{
- outstanding--;
- if (outstanding == 0) {
- markContentsDirty(0, characterCount());
- emit imagesLoaded();
- }
-}
-
-QSizeF QQuickTextDocumentWithImageResources::intrinsicSize(
- QTextDocument *, int, const QTextFormat &format)
-{
- if (format.isImageFormat()) {
- QTextImageFormat imageFormat = format.toImageFormat();
-
- const int width = qRound(imageFormat.width());
- const bool hasWidth = imageFormat.hasProperty(QTextFormat::ImageWidth) && width > 0;
- const int height = qRound(imageFormat.height());
- const bool hasHeight = imageFormat.hasProperty(QTextFormat::ImageHeight) && height > 0;
-
- QSizeF size(width, height);
- if (!hasWidth || !hasHeight) {
- QQmlContext *context = qmlContext(parent());
- QUrl url = baseUrl().resolved(QUrl(imageFormat.name()));
-
- QQuickPixmap *p = loadPixmap(context, url);
- if (!p->isReady()) {
- if (!hasWidth)
- size.setWidth(16);
- if (!hasHeight)
- size.setHeight(16);
- return size;
- }
- QSize implicitSize = p->implicitSize();
-
- if (!hasWidth) {
- if (!hasHeight)
- size.setWidth(implicitSize.width());
- else
- size.setWidth(qRound(height * (implicitSize.width() / (qreal) implicitSize.height())));
- }
- if (!hasHeight) {
- if (!hasWidth)
- size.setHeight(implicitSize.height());
- else
- size.setHeight(qRound(width * (implicitSize.height() / (qreal) implicitSize.width())));
- }
- }
- return size;
- }
- return QSizeF();
-}
-
-void QQuickTextDocumentWithImageResources::drawObject(
- QPainter *, const QRectF &, QTextDocument *, int, const QTextFormat &)
-{
-}
-
-QImage QQuickTextDocumentWithImageResources::image(const QTextImageFormat &format)
-{
- QQmlContext *context = qmlContext(parent());
- QUrl url = baseUrl().resolved(QUrl(format.name()));
-
- QQuickPixmap *p = loadPixmap(context, url);
- return p->image();
-}
-
-void QQuickTextDocumentWithImageResources::reset()
-{
- clearResources();
- markContentsDirty(0, characterCount());
-}
-
-QQuickPixmap *QQuickTextDocumentWithImageResources::loadPixmap(
- QQmlContext *context, const QUrl &url)
-{
-
- QHash<QUrl, QQuickPixmap *>::Iterator iter = m_resources.find(url);
-
- if (iter == m_resources.end()) {
- QQuickPixmap *p = new QQuickPixmap(context->engine(), url);
- iter = m_resources.insert(url, p);
-
- if (p->isLoading()) {
- p->connectFinished(this, SLOT(requestFinished()));
- outstanding++;
- }
- }
-
- QQuickPixmap *p = *iter;
- if (p->isError()) {
- if (!errors.contains(url)) {
- errors.insert(url);
- qmlInfo(parent()) << p->error();
- }
- }
- return p;
-}
-
-void QQuickTextDocumentWithImageResources::clearResources()
-{
- foreach (QQuickPixmap *pixmap, m_resources)
- pixmap->clear(this);
- qDeleteAll(m_resources);
- m_resources.clear();
- outstanding = 0;
-}
-
-void QQuickTextDocumentWithImageResources::setText(const QString &text)
-{
- clearResources();
-
-#ifndef QT_NO_TEXTHTMLPARSER
- setHtml(text);
-#else
- setPlainText(text);
-#endif
-}
-
-QSet<QUrl> QQuickTextDocumentWithImageResources::errors;
-
QQuickTextPrivate::~QQuickTextPrivate()
{
delete elideLayout;
diff --git a/src/quick/items/qquicktext_p_p.h b/src/quick/items/qquicktext_p_p.h
index 21086f1c3f..c8cadcece9 100644
--- a/src/quick/items/qquicktext_p_p.h
+++ b/src/quick/items/qquicktext_p_p.h
@@ -196,45 +196,6 @@ public:
static inline QQuickTextPrivate *get(QQuickText *t) { return t->d_func(); }
};
-class QQuickPixmap;
-class QQuickTextDocumentWithImageResources : public QTextDocument, public QTextObjectInterface
-{
- Q_OBJECT
- Q_INTERFACES(QTextObjectInterface)
-public:
- QQuickTextDocumentWithImageResources(QQuickItem *parent);
- virtual ~QQuickTextDocumentWithImageResources();
-
- void setText(const QString &);
- int resourcesLoading() const { return outstanding; }
-
- QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format);
- void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format);
-
- QImage image(const QTextImageFormat &format);
-
-public Q_SLOTS:
- void clearResources();
-
-Q_SIGNALS:
- void imagesLoaded();
-
-protected:
- QVariant loadResource(int type, const QUrl &name);
-
- QQuickPixmap *loadPixmap(QQmlContext *context, const QUrl &name);
-
-private Q_SLOTS:
- void reset();
- void requestFinished();
-
-private:
- QHash<QUrl, QQuickPixmap *> m_resources;
-
- int outstanding;
- static QSet<QUrl> errors;
-};
-
QT_END_NAMESPACE
#endif // QQUICKTEXT_P_P_H
diff --git a/src/quick/items/qquicktextdocument.cpp b/src/quick/items/qquicktextdocument.cpp
index b34ae24461..1f1359a3c3 100644
--- a/src/quick/items/qquicktextdocument.cpp
+++ b/src/quick/items/qquicktextdocument.cpp
@@ -32,11 +32,16 @@
****************************************************************************/
#include "qquicktextdocument.h"
+#include "qquicktextdocument_p.h"
#include "qquicktextedit_p.h"
#include "qquicktextedit_p_p.h"
#include "qquicktext_p_p.h"
+#include <QtQml/qqmlinfo.h>
+#include <QtQml/qqmlcontext.h>
+#include <QtQuick/private/qquickpixmapcache_p.h>
+
QT_BEGIN_NAMESPACE
/*!
@@ -78,4 +83,147 @@ QTextDocument* QQuickTextDocument::textDocument() const
return d->document.data();
}
+QQuickTextDocumentWithImageResources::QQuickTextDocumentWithImageResources(QQuickItem *parent)
+: QTextDocument(parent), outstanding(0)
+{
+ setUndoRedoEnabled(false);
+ documentLayout()->registerHandler(QTextFormat::ImageObject, this);
+ connect(this, SIGNAL(baseUrlChanged(QUrl)), this, SLOT(reset()));
+}
+
+QQuickTextDocumentWithImageResources::~QQuickTextDocumentWithImageResources()
+{
+ if (!m_resources.isEmpty())
+ qDeleteAll(m_resources);
+}
+
+QVariant QQuickTextDocumentWithImageResources::loadResource(int type, const QUrl &name)
+{
+ QVariant resource = QTextDocument::loadResource(type, name);
+ if (resource.isNull() && type == QTextDocument::ImageResource) {
+ QQmlContext *context = qmlContext(parent());
+ QUrl url = baseUrl().resolved(name);
+ QQuickPixmap *p = loadPixmap(context, url);
+ resource = p->image();
+ }
+
+ return resource;
+}
+
+void QQuickTextDocumentWithImageResources::requestFinished()
+{
+ outstanding--;
+ if (outstanding == 0) {
+ markContentsDirty(0, characterCount());
+ emit imagesLoaded();
+ }
+}
+
+QSizeF QQuickTextDocumentWithImageResources::intrinsicSize(
+ QTextDocument *, int, const QTextFormat &format)
+{
+ if (format.isImageFormat()) {
+ QTextImageFormat imageFormat = format.toImageFormat();
+
+ const int width = qRound(imageFormat.width());
+ const bool hasWidth = imageFormat.hasProperty(QTextFormat::ImageWidth) && width > 0;
+ const int height = qRound(imageFormat.height());
+ const bool hasHeight = imageFormat.hasProperty(QTextFormat::ImageHeight) && height > 0;
+
+ QSizeF size(width, height);
+ if (!hasWidth || !hasHeight) {
+ QVariant res = resource(QTextDocument::ImageResource, QUrl(imageFormat.name()));
+ QImage image = res.value<QImage>();
+ if (image.isNull()) {
+ if (!hasWidth)
+ size.setWidth(16);
+ if (!hasHeight)
+ size.setHeight(16);
+ return size;
+ }
+ QSize imgSize = image.size();
+
+ if (!hasWidth) {
+ if (!hasHeight)
+ size.setWidth(imgSize.width());
+ else
+ size.setWidth(qRound(height * (imgSize.width() / (qreal) imgSize.height())));
+ }
+ if (!hasHeight) {
+ if (!hasWidth)
+ size.setHeight(imgSize.height());
+ else
+ size.setHeight(qRound(width * (imgSize.height() / (qreal) imgSize.width())));
+ }
+ }
+ return size;
+ }
+ return QSizeF();
+}
+
+void QQuickTextDocumentWithImageResources::drawObject(
+ QPainter *, const QRectF &, QTextDocument *, int, const QTextFormat &)
+{
+}
+
+QImage QQuickTextDocumentWithImageResources::image(const QTextImageFormat &format)
+{
+ QVariant res = resource(QTextDocument::ImageResource, QUrl(format.name()));
+ return res.value<QImage>();
+}
+
+void QQuickTextDocumentWithImageResources::reset()
+{
+ clearResources();
+ markContentsDirty(0, characterCount());
+}
+
+QQuickPixmap *QQuickTextDocumentWithImageResources::loadPixmap(
+ QQmlContext *context, const QUrl &url)
+{
+
+ QHash<QUrl, QQuickPixmap *>::Iterator iter = m_resources.find(url);
+
+ if (iter == m_resources.end()) {
+ QQuickPixmap *p = new QQuickPixmap(context->engine(), url);
+ iter = m_resources.insert(url, p);
+
+ if (p->isLoading()) {
+ p->connectFinished(this, SLOT(requestFinished()));
+ outstanding++;
+ }
+ }
+
+ QQuickPixmap *p = *iter;
+ if (p->isError()) {
+ if (!errors.contains(url)) {
+ errors.insert(url);
+ qmlInfo(parent()) << p->error();
+ }
+ }
+ return p;
+}
+
+void QQuickTextDocumentWithImageResources::clearResources()
+{
+ foreach (QQuickPixmap *pixmap, m_resources)
+ pixmap->clear(this);
+ qDeleteAll(m_resources);
+ m_resources.clear();
+ outstanding = 0;
+}
+
+void QQuickTextDocumentWithImageResources::setText(const QString &text)
+{
+ clearResources();
+
+#ifndef QT_NO_TEXTHTMLPARSER
+ setHtml(text);
+#else
+ setPlainText(text);
+#endif
+}
+
+QSet<QUrl> QQuickTextDocumentWithImageResources::errors;
+
QT_END_NAMESPACE
diff --git a/src/quick/items/qquicktextdocument_p.h b/src/quick/items/qquicktextdocument_p.h
new file mode 100644
index 0000000000..1a9d71fe1c
--- /dev/null
+++ b/src/quick/items/qquicktextdocument_p.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKTEXTDOCUMENT_P_H
+#define QQUICKTEXTDOCUMENT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qhash.h>
+#include <QtCore/qvariant.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qtextdocument.h>
+#include <QtGui/qabstracttextdocumentlayout.h>
+#include <QtGui/qtextlayout.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickItem;
+class QQuickPixmap;
+class QQmlContext;
+
+class Q_AUTOTEST_EXPORT QQuickTextDocumentWithImageResources : public QTextDocument, public QTextObjectInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QTextObjectInterface)
+public:
+ QQuickTextDocumentWithImageResources(QQuickItem *parent);
+ virtual ~QQuickTextDocumentWithImageResources();
+
+ void setText(const QString &);
+ int resourcesLoading() const { return outstanding; }
+
+ QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format);
+ void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format);
+
+ QImage image(const QTextImageFormat &format);
+
+public Q_SLOTS:
+ void clearResources();
+
+Q_SIGNALS:
+ void imagesLoaded();
+
+protected:
+ QVariant loadResource(int type, const QUrl &name);
+
+ QQuickPixmap *loadPixmap(QQmlContext *context, const QUrl &name);
+
+private Q_SLOTS:
+ void reset();
+ void requestFinished();
+
+private:
+ QHash<QUrl, QQuickPixmap *> m_resources;
+
+ int outstanding;
+ static QSet<QUrl> errors;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKDOCUMENT_P_H
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 7cf3b449a0..8282c09770 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -34,7 +34,7 @@
#include "qquicktextedit_p.h"
#include "qquicktextedit_p_p.h"
#include "qquicktextcontrol_p.h"
-#include "qquicktext_p_p.h"
+#include "qquicktextdocument_p.h"
#include "qquickevents_p_p.h"
#include "qquickwindow.h"
#include "qquicktextnode_p.h"
diff --git a/src/quick/items/qquicktextnodeengine.cpp b/src/quick/items/qquicktextnodeengine.cpp
index 2b7f94d8bf..a65b98acd1 100644
--- a/src/quick/items/qquicktextnodeengine.cpp
+++ b/src/quick/items/qquicktextnodeengine.cpp
@@ -42,7 +42,8 @@
#include <QtGui/qtexttable.h>
#include <QtGui/qtextlist.h>
-#include <private/qquicktext_p_p.h>
+#include <private/qquicktext_p.h>
+#include <private/qquicktextdocument_p.h>
#include <private/qtextdocumentlayout_p.h>
#include <private/qtextimagehandler_p.h>
#include <private/qrawfont_p.h>
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 60ada14c32..b1792d27a7 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -61,6 +61,8 @@ QT_BEGIN_NAMESPACE
extern QByteArray qsgShaderRewriter_insertZAttributes(const char *input, QSurfaceFormat::OpenGLContextProfile profile);
+int qt_sg_envInt(const char *name, int defaultValue);
+
namespace QSGBatchRenderer
{
@@ -785,30 +787,17 @@ Renderer::Renderer(QSGRenderContext *ctx)
}
m_bufferStrategy = GL_STATIC_DRAW;
- QByteArray strategy = qgetenv("QSG_RENDERER_BUFFER_STRATEGY");
- if (strategy == "dynamic") {
- m_bufferStrategy = GL_DYNAMIC_DRAW;
- } else if (strategy == "stream") {
- m_bufferStrategy = GL_STREAM_DRAW;
- }
-
- m_batchNodeThreshold = 64;
- QByteArray alternateThreshold = qgetenv("QSG_RENDERER_BATCH_NODE_THRESHOLD");
- if (alternateThreshold.length() > 0) {
- bool ok = false;
- int threshold = alternateThreshold.toInt(&ok);
- if (ok)
- m_batchNodeThreshold = threshold;
- }
-
- m_batchVertexThreshold = 1024;
- alternateThreshold = qgetenv("QSG_RENDERER_BATCH_VERTEX_THRESHOLD");
- if (alternateThreshold.length() > 0) {
- bool ok = false;
- int threshold = alternateThreshold.toInt(&ok);
- if (ok)
- m_batchVertexThreshold = threshold;
+ if (Q_UNLIKELY(qEnvironmentVariableIsSet("QSG_RENDERER_BUFFER_STRATEGY"))) {
+ const QByteArray strategy = qgetenv("QSG_RENDERER_BUFFER_STRATEGY");
+ if (strategy == "dynamic")
+ m_bufferStrategy = GL_DYNAMIC_DRAW;
+ else if (strategy == "stream")
+ m_bufferStrategy = GL_STREAM_DRAW;
}
+
+ m_batchNodeThreshold = qt_sg_envInt("QSG_RENDERER_BATCH_NODE_THRESHOLD", 64);
+ m_batchVertexThreshold = qt_sg_envInt("QSG_RENDERER_BATCH_VERTEX_THRESHOLD", 1024);
+
if (Q_UNLIKELY(debug_build() || debug_render())) {
qDebug() << "Batch thresholds: nodes:" << m_batchNodeThreshold << " vertices:" << m_batchVertexThreshold;
qDebug() << "Using buffer strategy:" << (m_bufferStrategy == GL_STATIC_DRAW ? "static" : (m_bufferStrategy == GL_DYNAMIC_DRAW ? "dynamic" : "stream"));
@@ -901,11 +890,11 @@ void Renderer::map(Buffer *buffer, int byteSize, bool isIndexBuf)
if (byteSize > pool.size())
pool.resize(byteSize);
buffer->data = pool.data();
- } else {
+ } else if (buffer->size != byteSize) {
+ free(buffer->data);
buffer->data = (char *) malloc(byteSize);
}
buffer->size = byteSize;
-
}
void Renderer::unmap(Buffer *buffer, bool isIndexBuf)
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
index c68c0b93d2..633cab8078 100644
--- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp
+++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
@@ -64,7 +64,7 @@ const char *QSGMaterialShaderPrivate::loadShaderSource(QOpenGLShader::ShaderType
}
#ifndef QT_NO_DEBUG
-static bool qsg_leak_check = !qgetenv("QML_LEAK_CHECK").isEmpty();
+static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK");
#endif
/*!
diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp
index 51f3976ed9..c09af7c0a3 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgnode.cpp
@@ -42,7 +42,7 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_DEBUG
-static bool qsg_leak_check = !qgetenv("QML_LEAK_CHECK").isEmpty();
+static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK");
static int qt_node_count = 0;
static void qt_print_node_count()
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
index a9752cb9a9..775277e588 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
@@ -40,12 +40,21 @@
QT_BEGIN_NAMESPACE
-static bool qsg_sanity_check = qgetenv("QSG_SANITY_CHECK").toInt();
+static const bool qsg_sanity_check = qEnvironmentVariableIntValue("QSG_SANITY_CHECK");
static QElapsedTimer frameTimer;
static qint64 preprocessTime;
static qint64 updatePassTime;
+int qt_sg_envInt(const char *name, int defaultValue)
+{
+ if (Q_LIKELY(!qEnvironmentVariableIsSet(name)))
+ return defaultValue;
+ bool ok = false;
+ int value = qgetenv(name).toInt(&ok);
+ return ok ? value : defaultValue;
+}
+
void QSGBindable::clear(QSGAbstractRenderer::ClearMode mode) const
{
GLuint bits = 0;
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 150f8475d8..dd6977e42e 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -134,8 +134,8 @@ static bool qsg_useConsistentTiming()
{
static int use = -1;
if (use < 0) {
- QByteArray fixed = qgetenv("QSG_FIXED_ANIMATION_STEP");
- use = !(fixed.isEmpty() || fixed == "no");
+ use = !qEnvironmentVariableIsEmpty("QSG_FIXED_ANIMATION_STEP") && qgetenv("QSG_FIXED_ANIMATION_STEP") != "no"
+ ? 1 : 0;
qCDebug(QSG_LOG_INFO, "Using %s", bool(use) ? "fixed animation steps" : "sg animation driver");
}
return bool(use);
@@ -297,15 +297,16 @@ QSGContext::QSGContext(QObject *parent) :
QObject(*(new QSGContextPrivate), parent)
{
Q_D(QSGContext);
- QByteArray mode = qgetenv("QSG_DISTANCEFIELD_ANTIALIASING");
- if (!mode.isEmpty())
+ if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QSG_DISTANCEFIELD_ANTIALIASING"))) {
+ const QByteArray mode = qgetenv("QSG_DISTANCEFIELD_ANTIALIASING");
d->distanceFieldAntialiasingDecided = true;
- if (mode == "subpixel")
- d->distanceFieldAntialiasing = QSGGlyphNode::HighQualitySubPixelAntialiasing;
- else if (mode == "subpixel-lowq")
- d->distanceFieldAntialiasing = QSGGlyphNode::LowQualitySubPixelAntialiasing;
- else if (mode == "gray")
- d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing;
+ if (mode == "subpixel")
+ d->distanceFieldAntialiasing = QSGGlyphNode::HighQualitySubPixelAntialiasing;
+ else if (mode == "subpixel-lowq")
+ d->distanceFieldAntialiasing = QSGGlyphNode::LowQualitySubPixelAntialiasing;
+ else if (mode == "gray")
+ d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing;
+ }
// Adds compatibility with Qt 5.3 and earlier's QSG_RENDER_TIMING
if (qEnvironmentVariableIsSet("QSG_RENDER_TIMING")) {
@@ -333,12 +334,14 @@ void QSGContext::renderContextInitialized(QSGRenderContext *renderContext)
d->mutex.lock();
if (d->antialiasingMethod == UndecidedAntialiasing) {
- QByteArray aaType = qgetenv("QSG_ANTIALIASING_METHOD");
- if (aaType == "msaa") {
- d->antialiasingMethod = MsaaAntialiasing;
- } else if (aaType == "vertex") {
- d->antialiasingMethod = VertexAntialiasing;
- } else {
+ if (Q_UNLIKELY(qEnvironmentVariableIsSet("QSG_ANTIALIASING_METHOD"))) {
+ const QByteArray aaType = qgetenv("QSG_ANTIALIASING_METHOD");
+ if (aaType == "msaa")
+ d->antialiasingMethod = MsaaAntialiasing;
+ else if (aaType == "vertex")
+ d->antialiasingMethod = VertexAntialiasing;
+ }
+ if (d->antialiasingMethod == UndecidedAntialiasing) {
if (renderContext->openglContext()->format().samples() > 0)
d->antialiasingMethod = MsaaAntialiasing;
else
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 87dd521807..68947d3a3c 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -199,13 +199,15 @@ QSGRenderLoop *QSGRenderLoop::instance()
else if (qmlForceThreadedRenderer())
loopType = ThreadedRenderLoop;
- const QByteArray loopName = qgetenv("QSG_RENDER_LOOP");
- if (loopName == QByteArrayLiteral("windows"))
- loopType = WindowsRenderLoop;
- else if (loopName == QByteArrayLiteral("basic"))
- loopType = BasicRenderLoop;
- else if (loopName == QByteArrayLiteral("threaded"))
- loopType = ThreadedRenderLoop;
+ if (Q_UNLIKELY(qEnvironmentVariableIsSet("QSG_RENDER_LOOP"))) {
+ const QByteArray loopName = qgetenv("QSG_RENDER_LOOP");
+ if (loopName == QByteArrayLiteral("windows"))
+ loopType = WindowsRenderLoop;
+ else if (loopName == QByteArrayLiteral("basic"))
+ loopType = BasicRenderLoop;
+ else if (loopName == QByteArrayLiteral("threaded"))
+ loopType = ThreadedRenderLoop;
+ }
switch (loopType) {
case ThreadedRenderLoop:
diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp
index 8c649fb6bd..8e8e870505 100644
--- a/src/quick/scenegraph/util/qsgatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgatlastexture.cpp
@@ -54,21 +54,13 @@ QT_BEGIN_NAMESPACE
#define GL_BGRA 0x80E1
#endif
+int qt_sg_envInt(const char *name, int defaultValue);
static QElapsedTimer qsg_renderer_timer;
namespace QSGAtlasTexture
{
-static int qsg_envInt(const char *name, int defaultValue)
-{
- QByteArray content = qgetenv(name);
-
- bool ok = false;
- int value = content.toInt(&ok);
- return ok ? value : defaultValue;
-}
-
Manager::Manager()
: m_atlas(0)
{
@@ -79,8 +71,8 @@ Manager::Manager()
int max;
gl->functions()->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max);
- int w = qMin(max, qsg_envInt("QSG_ATLAS_WIDTH", qMax(512U, qNextPowerOfTwo(surfaceSize.width() - 1))));
- int h = qMin(max, qsg_envInt("QSG_ATLAS_HEIGHT", qMax(512U, qNextPowerOfTwo(surfaceSize.height() - 1))));
+ int w = qMin(max, qt_sg_envInt("QSG_ATLAS_WIDTH", qMax(512U, qNextPowerOfTwo(surfaceSize.width() - 1))));
+ int h = qMin(max, qt_sg_envInt("QSG_ATLAS_HEIGHT", qMax(512U, qNextPowerOfTwo(surfaceSize.height() - 1))));
if (surface->surfaceClass() == QSurface::Window) {
QWindow *window = static_cast<QWindow *>(surface);
@@ -91,7 +83,7 @@ Manager::Manager()
}
}
- m_atlas_size_limit = qsg_envInt("QSG_ATLAS_SIZE_LIMIT", qMax(w, h) / 2);
+ m_atlas_size_limit = qt_sg_envInt("QSG_ATLAS_SIZE_LIMIT", qMax(w, h) / 2);
m_atlas_size = QSize(w, h);
qCDebug(QSG_LOG_INFO, "texture atlas dimensions: %dx%d", w, h);
diff --git a/src/quick/scenegraph/util/qsgdistancefieldutil.cpp b/src/quick/scenegraph/util/qsgdistancefieldutil.cpp
index edbe1ecaa2..883657da24 100644
--- a/src/quick/scenegraph/util/qsgdistancefieldutil.cpp
+++ b/src/quick/scenegraph/util/qsgdistancefieldutil.cpp
@@ -39,18 +39,27 @@
QT_BEGIN_NAMESPACE
+static float qt_sg_envFloat(const char *name, float defaultValue)
+{
+ if (Q_LIKELY(!qEnvironmentVariableIsSet(name)))
+ return defaultValue;
+ bool ok = false;
+ const float value = qgetenv(name).toFloat(&ok);
+ return ok ? value : defaultValue;
+}
+
static float defaultThresholdFunc(float glyphScale)
{
- static float base = qgetenv("QT_DF_BASE").isEmpty() ? 0.5f : qgetenv("QT_DF_BASE").toFloat();
- static float baseDev = qgetenv("QT_DF_BASEDEVIATION").isEmpty() ? 0.065f : qgetenv("QT_DF_BASEDEVIATION").toFloat();
- static float devScaleMin = qgetenv("QT_DF_SCALEFORMAXDEV").isEmpty() ? 0.15f : qgetenv("QT_DF_SCALEFORMAXDEV").toFloat();
- static float devScaleMax = qgetenv("QT_DF_SCALEFORNODEV").isEmpty() ? 0.3f : qgetenv("QT_DF_SCALEFORNODEV").toFloat();
+ static const float base = qt_sg_envFloat("QT_DF_BASE", 0.5f);
+ static const float baseDev = qt_sg_envFloat("QT_DF_BASEDEVIATION", 0.065f);
+ static const float devScaleMin = qt_sg_envFloat("QT_DF_SCALEFORMAXDEV", 0.15f);
+ static const float devScaleMax = qt_sg_envFloat("QT_DF_SCALEFORNODEV", 0.3f);
return base - ((qBound(devScaleMin, glyphScale, devScaleMax) - devScaleMin) / (devScaleMax - devScaleMin) * -baseDev + baseDev);
}
static float defaultAntialiasingSpreadFunc(float glyphScale)
{
- static float range = qgetenv("QT_DF_RANGE").isEmpty() ? 0.06f : qgetenv("QT_DF_RANGE").toFloat();
+ static const float range = qt_sg_envFloat("QT_DF_RANGE", 0.06f);
return range / glyphScale;
}
diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp
index c89ad7a608..df9e569ca3 100644
--- a/src/quick/scenegraph/util/qsgtexture.cpp
+++ b/src/quick/scenegraph/util/qsgtexture.cpp
@@ -65,7 +65,7 @@
static QElapsedTimer qsg_renderer_timer;
#ifndef QT_NO_DEBUG
-static bool qsg_leak_check = !qgetenv("QML_LEAK_CHECK").isEmpty();
+static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK");
#endif
diff --git a/src/quick/util/qquickanimator.cpp b/src/quick/util/qquickanimator.cpp
index 61fb7481d9..8a5cad4011 100644
--- a/src/quick/util/qquickanimator.cpp
+++ b/src/quick/util/qquickanimator.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
directly on Qt Quick's scene graph, rather than the QML objects and their
properties like regular Animation types do. This has the benefit that
Animator based animations can animate on the \l
- {Threaded Render Loop}{scene graph's rendering thread} even when the
+ {Threaded Render Loop ("threaded")}{scene graph's rendering thread} even when the
UI thread is blocked.
The value of the QML property will be updated after the animation has
diff --git a/src/quick/util/qquickanimatorcontroller.cpp b/src/quick/util/qquickanimatorcontroller.cpp
index c875e18978..cfb6037d14 100644
--- a/src/quick/util/qquickanimatorcontroller.cpp
+++ b/src/quick/util/qquickanimatorcontroller.cpp
@@ -217,8 +217,8 @@ void QQuickAnimatorController::beforeNodeSync()
void QQuickAnimatorController::afterNodeSync()
{
foreach (QQuickAnimatorJob *job, m_activeLeafAnimations) {
- if (job->isUniform() && job->target())
- static_cast<QQuickUniformAnimatorJob *>(job)->afterNodeSync();
+ if (job->target())
+ job->afterNodeSync();
}
}
diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h
index fd2543ea8a..87f383f754 100644
--- a/src/quick/util/qquickanimatorjob_p.h
+++ b/src/quick/util/qquickanimatorjob_p.h
@@ -136,6 +136,7 @@ public:
virtual void initialize(QQuickAnimatorController *controller);
virtual void writeBack() = 0;
virtual void nodeWasDestroyed() = 0;
+ virtual void afterNodeSync() { }
bool isTransform() const { return m_isTransform; }
bool isUniform() const { return m_isUniform; }
@@ -279,7 +280,7 @@ public:
void setUniform(const QByteArray &uniform) { m_uniform = uniform; }
QByteArray uniform() const { return m_uniform; }
- void afterNodeSync();
+ void afterNodeSync() Q_DECL_OVERRIDE;
void updateCurrentTime(int time);
void writeBack();
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp
index 0b7b5ce9a8..ed6da8ac91 100644
--- a/src/quick/util/qquickpixmapcache.cpp
+++ b/src/quick/util/qquickpixmapcache.cpp
@@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_DEBUG
-static bool qsg_leak_check = !qgetenv("QML_LEAK_CHECK").isEmpty();
+static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK");
#endif
// The cache limit describes the maximum "junk" in the cache.
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index f62d2f3bdb..4b9fbe75ac 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -13,3 +13,5 @@ test_module_includes(
Qml QQmlEngine
Quick QQuickWindow
)
+
+expect_pass(test_plugins)
diff --git a/tests/auto/cmake/test_plugins/CMakeLists.txt b/tests/auto/cmake/test_plugins/CMakeLists.txt
new file mode 100644
index 0000000000..9cbfbb657e
--- /dev/null
+++ b/tests/auto/cmake/test_plugins/CMakeLists.txt
@@ -0,0 +1,14 @@
+project(test_plugins)
+
+cmake_minimum_required(VERSION 2.8)
+cmake_policy(SET CMP0056 NEW)
+
+find_package(Qt5Qml REQUIRED)
+
+# See QTBUG-43438
+if (NOT TARGET Qt5::QTcpServerConnectionFactory)
+ message(SEND_ERROR "Qt5::QTcpServerConnectionFactory does not exist")
+endif()
+if (NOT TARGET Qt5::QLocalClientConnectionFactory)
+ message(SEND_ERROR "Qt5::QLocalClientConnectionFactory does not exist")
+endif()
diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro
index 3a97bf655d..5e798f3b48 100644
--- a/tests/auto/qml/qml.pro
+++ b/tests/auto/qml/qml.pro
@@ -71,7 +71,10 @@ qtHaveModule(widgets) {
SUBDIRS += $$PUBLICTESTS
SUBDIRS += $$METATYPETESTS
-!winrt:!contains(QT_CONFIG, no-qml-debug): SUBDIRS += debugger # no QProcess on winrt
+!winrt { # no QProcess on winrt
+ !contains(QT_CONFIG, no-qml-debug): SUBDIRS += debugger
+ SUBDIRS += qmllint
+}
contains(QT_CONFIG, private_tests) {
SUBDIRS += $$PRIVATETESTS
diff --git a/tests/auto/qml/qmllint/data/QTBUG-45916.js b/tests/auto/qml/qmllint/data/QTBUG-45916.js
new file mode 100644
index 0000000000..1947b5aa80
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/QTBUG-45916.js
@@ -0,0 +1,6 @@
+.pragma library
+.import QtQuick 2.4 as JSQtQuick
+
+function foo(url)
+{
+}
diff --git a/tests/auto/qml/qmllint/data/Simple.qml b/tests/auto/qml/qmllint/data/Simple.qml
new file mode 100644
index 0000000000..db54cff477
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Simple.qml
@@ -0,0 +1,4 @@
+import QtQuick 2.2
+
+Item {
+}
diff --git a/tests/auto/qml/qmllint/data/failure1.js b/tests/auto/qml/qmllint/data/failure1.js
new file mode 100644
index 0000000000..6a62accf06
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/failure1.js
@@ -0,0 +1,5 @@
+function foo()
+{
+ var hello
+ returm 0 // Typo
+}
diff --git a/tests/auto/qml/qmllint/data/failure1.qml b/tests/auto/qml/qmllint/data/failure1.qml
new file mode 100644
index 0000000000..56f0f746a9
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/failure1.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.0
+
+Item {
+ id root # // Missing :
+}
diff --git a/tests/auto/qml/qmllint/data/importing_js.qml b/tests/auto/qml/qmllint/data/importing_js.qml
new file mode 100644
index 0000000000..fa6cf797db
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/importing_js.qml
@@ -0,0 +1,5 @@
+import "QTBUG-45916.js" as JSTest
+
+Item {
+ id: root
+}
diff --git a/tests/auto/qml/qmllint/main.cpp b/tests/auto/qml/qmllint/main.cpp
new file mode 100644
index 0000000000..a6dadd7178
--- /dev/null
+++ b/tests/auto/qml/qmllint/main.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sergio Martins <sergio.martins@kdab.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QProcess>
+#include <QString>
+
+class TestQmllint: public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void initTestCase();
+ void test();
+ void test_data();
+private:
+ QString m_qmllintPath;
+};
+
+void TestQmllint::initTestCase()
+{
+ m_qmllintPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmllint");
+#ifdef Q_OS_WIN
+ m_qmllintPath += QLatin1String(".exe");
+#endif
+ if (!QFileInfo(m_qmllintPath).exists()) {
+ QString message = QStringLiteral("qmllint executable not found (looked for %0)").arg(m_qmllintPath);
+ QFAIL(qPrintable(message));
+ }
+}
+
+void TestQmllint::test_data()
+{
+ QTest::addColumn<QString>("filename");
+ QTest::addColumn<bool>("isValid");
+
+ // Valid files:
+ QTest::newRow("Simple_QML") << QStringLiteral("Simple.qml") << true;
+ QTest::newRow("QML_importing_JS") << QStringLiteral("importing_js.qml") << true;
+ QTest::newRow("QTBUG-45916_JS_with_pragma_and_import") << QStringLiteral("QTBUG-45916.js") << true;
+
+ // Invalid files:
+ QTest::newRow("Invalid_syntax_QML") << QStringLiteral("failure1.qml") << false;
+ QTest::newRow("Invalid_syntax_JS") << QStringLiteral("failure1.js") << false;
+}
+
+void TestQmllint::test()
+{
+ QFETCH(QString, filename);
+ QFETCH(bool, isValid);
+ filename = QStringLiteral("data/") + filename;
+ QStringList args;
+ args << QStringLiteral("--silent") << filename;
+
+ bool success = QProcess::execute(m_qmllintPath, args) == 0;
+ QCOMPARE(success, isValid);
+}
+
+QTEST_MAIN(TestQmllint)
+#include "main.moc"
diff --git a/tests/auto/qml/qmllint/qmllint.pro b/tests/auto/qml/qmllint/qmllint.pro
new file mode 100644
index 0000000000..b53a6f6877
--- /dev/null
+++ b/tests/auto/qml/qmllint/qmllint.pro
@@ -0,0 +1,6 @@
+TEMPLATE = app
+TARGET = testqmllint
+INCLUDEPATH += .
+
+SOURCES += main.cpp
+QT += testlib
diff --git a/tests/auto/qml/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp
index d2e8526896..6d2fba3f46 100644
--- a/tests/auto/qml/qmlmin/tst_qmlmin.cpp
+++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp
@@ -87,6 +87,7 @@ void tst_qmlmin::initTestCase()
excludedDirs << "doc/src/snippets/qtquick1/qtbinding";
excludedDirs << "doc/src/snippets/qtquick1/imports";
excludedDirs << "tests/manual/v4";
+ excludedDirs << "tests/auto/qml/qmllint";
// Add invalid files (i.e. files with syntax errors)
invalidFiles << "tests/auto/quick/qquickloader/data/InvalidSourceComponent.qml";
diff --git a/tests/auto/qml/qqmlengine/data/TypeofQmlProperty.qml b/tests/auto/qml/qqmlengine/data/TypeofQmlProperty.qml
new file mode 100644
index 0000000000..2196543dc8
--- /dev/null
+++ b/tests/auto/qml/qqmlengine/data/TypeofQmlProperty.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.5
+
+Item {
+ property var someProp: 1
+ Component.onCompleted: console.log("typeof someProp:", typeof(someProp));
+}
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
index cb911d0115..486a0b4e87 100644
--- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
+++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
@@ -75,6 +75,8 @@ private slots:
void urlInterceptor_data();
void urlInterceptor();
+ void qmlContextProperties();
+
public slots:
QObject *createAQObjectForOwnershipTest ()
{
@@ -778,6 +780,18 @@ void tst_qqmlengine::urlInterceptor()
QCOMPARE(o->property("absoluteUrl").toString(), expectedAbsoluteUrl);
}
+void tst_qqmlengine::qmlContextProperties()
+{
+ QQmlEngine e;
+
+ QQmlComponent c(&e, testFileUrl("TypeofQmlProperty.qml"));
+ QObject *o = c.create();
+ if (!o) {
+ qDebug() << c.errorString();
+ }
+ QVERIFY(o);
+}
+
QTEST_MAIN(tst_qqmlengine)
#include "tst_qqmlengine.moc"
diff --git a/tests/auto/qml/qqmltypeloader/data/load_synchronous.qml b/tests/auto/qml/qqmltypeloader/data/load_synchronous.qml
new file mode 100644
index 0000000000..5e9c4c2bdc
--- /dev/null
+++ b/tests/auto/qml/qqmltypeloader/data/load_synchronous.qml
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQml 2.2
+
+QtObject {
+ id: top
+
+ Component.onCompleted: {
+ Qt.createQmlObject('QtObject {}', top, 'nonprotocol:');
+ }
+}
diff --git a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
index 77cdaae9f0..4c5b1f7e63 100644
--- a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
+++ b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
@@ -43,6 +43,7 @@ class tst_QQMLTypeLoader : public QQmlDataTest
private slots:
void testLoadComplete();
+ void loadComponentSynchronously();
};
void tst_QQMLTypeLoader::testLoadComplete()
@@ -62,6 +63,16 @@ void tst_QQMLTypeLoader::testLoadComplete()
delete window;
}
+void tst_QQMLTypeLoader::loadComponentSynchronously()
+{
+ QQmlEngine engine;
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression(
+ QLatin1String(".*nonprotocol::1:1: QtObject is not a type.*")));
+ QQmlComponent component(&engine, testFileUrl("load_synchronous.qml"));
+ QObject *o = component.create();
+ QVERIFY(o);
+}
+
QTEST_MAIN(tst_QQMLTypeLoader)
#include "tst_qqmltypeloader.moc"
diff --git a/tests/auto/quick/qquickitem2/data/childrenRectBottomRightCorner.qml b/tests/auto/quick/qquickitem2/data/childrenRectBottomRightCorner.qml
new file mode 100644
index 0000000000..0b83e20b20
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/childrenRectBottomRightCorner.qml
@@ -0,0 +1,47 @@
+import QtQuick 2.0
+
+Item {
+ width: 300
+ height: 300
+
+ Item {
+ anchors.centerIn: parent
+
+ Rectangle {
+ objectName: "childrenRectProxy"
+ x: container.childrenRect.x
+ y: container.childrenRect.y
+ width: container.childrenRect.width
+ height: container.childrenRect.height
+ color: "red"
+ opacity: 0.5
+ }
+
+ Item {
+ id: container
+
+ Rectangle {
+ x: -100
+ y: -100
+ width: 10
+ height: 10
+ color: "red"
+ }
+
+ Rectangle {
+ x: -60
+ y: -60
+ width: 10
+ height: 10
+ color: "red"
+ }
+ }
+
+ Rectangle {
+ id: origin
+ width: 5
+ height: 5
+ color: "black"
+ }
+ }
+}
diff --git a/tests/auto/quick/qquickitem2/data/keynavigationtest_loop.qml b/tests/auto/quick/qquickitem2/data/keynavigationtest_loop.qml
new file mode 100644
index 0000000000..dfac1549f9
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/keynavigationtest_loop.qml
@@ -0,0 +1,37 @@
+import QtQuick 2.0
+
+Column {
+ width: 50; height: 200
+ Rectangle {
+ id: item1
+ objectName: "item1"
+ focus: true
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.down: item2
+ }
+ Rectangle {
+ id: item2
+ objectName: "item2"
+ enabled: false
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.down: item3
+ }
+ Rectangle {
+ id: item3
+ objectName: "item3"
+ enabled: false
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.down: item4
+ }
+ Rectangle {
+ id: item4
+ objectName: "item4"
+ enabled: false
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.down: item3
+ }
+}
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index f3351fcc4e..c7717b9cca 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -87,6 +87,7 @@ private slots:
void keyNavigation_skipNotVisible();
void keyNavigation_implicitSetting();
void keyNavigation_focusReason();
+ void keyNavigation_loop();
void layoutMirroring();
void layoutMirroringIllegalParent();
void smooth();
@@ -103,6 +104,7 @@ private slots:
void childrenRectBug();
void childrenRectBug2();
void childrenRectBug3();
+ void childrenRectBottomRightCorner();
void childrenProperty();
void resourcesProperty();
@@ -2102,6 +2104,31 @@ void tst_QQuickItem::keyNavigation_focusReason()
delete window;
}
+void tst_QQuickItem::keyNavigation_loop()
+{
+ // QTBUG-47229
+ QQuickView *window = new QQuickView(0);
+ window->setBaseSize(QSize(240,320));
+
+ window->setSource(testFileUrl("keynavigationtest_loop.qml"));
+ window->show();
+ window->requestActivate();
+
+ QVERIFY(QTest::qWaitForWindowActive(window));
+ QCOMPARE(QGuiApplication::focusWindow(), window);
+
+ QQuickItem *item = findItem<QQuickItem>(window->rootObject(), "item1");
+ QVERIFY(item);
+ QVERIFY(item->hasActiveFocus());
+
+ QKeyEvent key = QKeyEvent(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier, "", false, 1);
+ QGuiApplication::sendEvent(window, &key);
+ QVERIFY(key.isAccepted());
+ QVERIFY(item->hasActiveFocus());
+
+ delete window;
+}
+
void tst_QQuickItem::smooth()
{
QQmlComponent component(&engine);
@@ -2569,6 +2596,22 @@ void tst_QQuickItem::childrenRectBug3()
delete window;
}
+// QTBUG-38732
+void tst_QQuickItem::childrenRectBottomRightCorner()
+{
+ QQuickView *window = new QQuickView(0);
+ window->setSource(testFileUrl("childrenRectBottomRightCorner.qml"));
+ window->show();
+
+ QQuickItem *rect = window->rootObject()->findChild<QQuickItem*>("childrenRectProxy");
+ QCOMPARE(rect->x(), qreal(-100));
+ QCOMPARE(rect->y(), qreal(-100));
+ QCOMPARE(rect->width(), qreal(50));
+ QCOMPARE(rect->height(), qreal(50));
+
+ delete window;
+}
+
// QTBUG-13893
void tst_QQuickItem::transformCrash()
{
@@ -2721,7 +2764,10 @@ void tst_QQuickItem::parentLoop()
{
QQuickView *window = new QQuickView(0);
- QTest::ignoreMessage(QtWarningMsg, "QQuickItem::setParentItem: Parent is already part of this items subtree.");
+#ifndef QT_NO_REGULAREXPRESSION
+ QRegularExpression msgRegexp = QRegularExpression("QQuickItem::setParentItem: Parent QQuickItem\\(.*\\) is already part of the subtree of QQuickItem\\(.*\\)");
+ QTest::ignoreMessage(QtWarningMsg, msgRegexp);
+#endif
window->setSource(testFileUrl("parentLoop.qml"));
QQuickItem *root = qobject_cast<QQuickItem*>(window->rootObject());
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index eed947bfcd..fc5dd3bbca 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -1113,6 +1113,15 @@ void tst_QQuickPathView::setCurrentIndex()
QCOMPARE(pathview->currentItem(), firstItem);
QCOMPARE(firstItem->property("onPath"), QVariant(true));
+ // check for bogus currentIndexChanged() signals
+ QSignalSpy currentIndexSpy(pathview, SIGNAL(currentIndexChanged()));
+ QVERIFY(currentIndexSpy.isValid());
+ pathview->setHighlightMoveDuration(100);
+ pathview->setHighlightRangeMode(QQuickPathView::StrictlyEnforceRange);
+ pathview->setSnapMode(QQuickPathView::SnapToItem);
+ pathview->setCurrentIndex(3);
+ QTRY_COMPARE(pathview->currentIndex(), 3);
+ QCOMPARE(currentIndexSpy.count(), 1);
}
void tst_QQuickPathView::resetModel()
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index 6042c08891..3f37cf233b 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -38,6 +38,7 @@
#include <QtQuick/private/qquicktext_p.h>
#include <QtQuick/private/qquickmousearea_p.h>
#include <private/qquicktext_p_p.h>
+#include <private/qquicktextdocument_p.h>
#include <private/qquickvaluetypes_p.h>
#include <QFontMetrics>
#include <qmath.h>
diff --git a/tests/auto/quick/qquicktextdocument/tst_qquicktextdocument.cpp b/tests/auto/quick/qquicktextdocument/tst_qquicktextdocument.cpp
index 27a02377bd..12fcbfda0e 100644
--- a/tests/auto/quick/qquicktextdocument/tst_qquicktextdocument.cpp
+++ b/tests/auto/quick/qquicktextdocument/tst_qquicktextdocument.cpp
@@ -36,6 +36,7 @@
#include <QtQuick/QQuickTextDocument>
#include <QtQuick/QQuickItem>
#include <QtQuick/private/qquicktextedit_p.h>
+#include <QtQuick/private/qquicktextdocument_p.h>
#include <QtGui/QTextDocument>
#include <QtGui/QTextDocumentWriter>
#include <QtQml/QQmlEngine>
@@ -47,6 +48,7 @@ class tst_qquicktextdocument : public QQmlDataTest
Q_OBJECT
private slots:
void textDocumentWriter();
+ void textDocumentWithImage();
};
QString text = QStringLiteral("foo bar");
@@ -74,6 +76,20 @@ void tst_qquicktextdocument::textDocumentWriter()
delete o;
}
+void tst_qquicktextdocument::textDocumentWithImage()
+{
+ QQuickTextDocumentWithImageResources document(0);
+ QImage image(1, 1, QImage::Format_Mono);
+ image.fill(1);
+
+ QString name = "image";
+ document.addResource(QTextDocument::ImageResource, name, image);
+ QTextImageFormat format;
+ format.setName(name);
+ QCOMPARE(image, document.image(format));
+ QCOMPARE(image, document.resource(QTextDocument::ImageResource, name).value<QImage>());
+}
+
QTEST_MAIN(tst_qquicktextdocument)
#include "tst_qquicktextdocument.moc"
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index e4473b9540..b0ab58538a 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -43,7 +43,8 @@
#include <QtGui/qguiapplication.h>
#include <private/qquicktextedit_p.h>
#include <private/qquicktextedit_p_p.h>
-#include <private/qquicktext_p_p.h>
+#include <private/qquicktext_p.h>
+#include <private/qquicktextdocument_p.h>
#include <QFontMetrics>
#include <QtQuick/QQuickView>
#include <QDir>
diff --git a/tools/fdegen/main.cpp b/tools/fdegen/main.cpp
index 1fb7a5b076..1906037989 100644
--- a/tools/fdegen/main.cpp
+++ b/tools/fdegen/main.cpp
@@ -140,7 +140,7 @@ static int createSectionCallback(
}
static unsigned char cie_init_instructions[] = {
- DW_CFA_def_cfa, StackPointerRegister, /*offset in bytes */QT_POINTER_SIZE,
+ DW_CFA_def_cfa, StackPointerRegister, /*offset in bytes */sizeof(void*),
DW_CFA_offset | InstructionPointerRegister, 1,
};
@@ -158,8 +158,8 @@ int main()
Dwarf_Unsigned cie = dwarf_add_frame_cie(dw,
"",
- /* code alignment factor */QT_POINTER_SIZE,
- /* data alignment factor */-QT_POINTER_SIZE,
+ /* code alignment factor */sizeof(void*),
+ /* data alignment factor */-sizeof(void*),
/* return address reg*/InstructionPointerRegister,
cie_init_instructions,
sizeof(cie_init_instructions),
@@ -270,7 +270,7 @@ int main()
printf("static const int fde_offset = %d;\n", fde_offset);
printf("static const int initial_location_offset = %d;\n", fde_offset + 8);
- printf("static const int address_range_offset = %d;\n", fde_offset + 8 + QT_POINTER_SIZE);
+ printf("static const int address_range_offset = %d;\n", fde_offset + 8 + sizeof(void*));
#ifdef DEBUG
{
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 0f16c62320..240ddde6f1 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -332,7 +332,9 @@ void printUsage()
printf("\t-desktop.......................Force use of desktop GL (AA_UseDesktopOpenGL)\n");
printf("\t-gles..........................Force use of GLES (AA_UseOpenGLES)\n");
printf("\t-software......................Force use of software rendering (AA_UseOpenGLES)\n");
+#if 0 // FIXME: 5.6: Re-enable once attribute naming is final (QTBUG-46615)
printf("\t-no-scaling....................Disable High DPI scaling (AA_NoHighDpiScaling)\n");
+#endif
printf("\tDebugging options:\n");
printf("\t-verbose ..................... Print information about what qml is doing, like specific file urls being loaded.\n");
printf("\t-translation [file] .......... Load the given file as the translations file.\n");
@@ -504,8 +506,10 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
} else if (arg == QLatin1String("-desktop")) {
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
+#if 0 // FIXME: 5.6: Re-enable once attribute naming is final (QTBUG-46615)
} else if (arg == QLatin1String("-no-scaling")) {
QCoreApplication::setAttribute(Qt::AA_NoHighDpiScaling);
+#endif
} else {
files << arg;
}
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 9bf1c200e4..53bd0bfbad 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -356,7 +356,9 @@ static void usage()
puts(" --desktop..........................Force use of desktop GL (AA_UseDesktopOpenGL)");
puts(" --gles.............................Force use of GLES (AA_UseOpenGLES)");
puts(" --software.........................Force use of software rendering (AA_UseOpenGLES)");
+#if 0 // FIXME: 5.6: Re-enable once attribute naming is final (QTBUG-46615)
puts(" --no-scaling.......................Disable High DPI scaling (AA_NoHighDpiScaling)");
+#endif
puts(" --verbose..........................Print version and graphical diagnostics for the run-time");
puts(" -I <path> ........................ Add <path> to the list of import paths");
puts(" -P <path> ........................ Add <path> to the list of plugin paths");
@@ -451,8 +453,10 @@ int main(int argc, char ** argv)
options.applicationAttributes.append(Qt::AA_UseSoftwareOpenGL);
else if (!qstrcmp(arg, "--desktop"))
options.applicationAttributes.append(Qt::AA_UseDesktopOpenGL);
+#if 0 // FIXME: 5.6: Re-enable once attribute naming is final (QTBUG-46615)
else if (!qstrcmp(arg, "--no-scaling"))
options.applicationAttributes.append(Qt::AA_NoHighDpiScaling);
+#endif
}
foreach (Qt::ApplicationAttribute a, options.applicationAttributes)