diff options
author | Iikka Eklund <iikka.eklund@digia.com> | 2014-05-20 13:26:14 +0300 |
---|---|---|
committer | Iikka Eklund <iikka.eklund@digia.com> | 2014-05-20 13:26:15 +0300 |
commit | 3ed6361bbaa711c9f3441704659ccb971751b44e (patch) | |
tree | be1e4f03b558b08481a333adb048028b2fa4ff42 /src | |
parent | 009ad875f89d7d7bc4447e18c2fbbd485a75e0b5 (diff) | |
parent | 073cde9d21f95a896ffff3abfcc9a9da89175e28 (diff) |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I939d6b9d10b3f50d9024b80d7a215b8fd04e8d56
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/qtquick2/plugins.qmltypes | 277 | ||||
-rw-r--r-- | src/imports/window/plugins.qmltypes | 36 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 11 | ||||
-rw-r--r-- | src/qml/compiler/qv4compiler.cpp | 6 | ||||
-rw-r--r-- | src/qml/jsapi/qjsengine.cpp | 13 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 11 | ||||
-rw-r--r-- | src/quick/items/qquickimage_p.h | 2 | ||||
-rw-r--r-- | src/quick/items/qquickitemsmodule.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickwindowmodule.cpp | 1 |
9 files changed, 317 insertions, 42 deletions
diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes index cadef10370..dd41871e45 100644 --- a/src/imports/qtquick2/plugins.qmltypes +++ b/src/imports/qtquick2/plugins.qmltypes @@ -176,6 +176,7 @@ Module { name: "QInputMethod" prototype: "QObject" exports: ["QtQuick/InputMethod 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "Action" @@ -225,6 +226,7 @@ Module { Component { name: "QKeySequence" exports: ["QtQuick/StandardKey 2.2"] + isCreatable: false exportMetaObjectRevisions: [2] Enum { name: "StandardKey" @@ -514,6 +516,7 @@ Module { name: "QQmlEasingValueType" prototype: "QQmlValueType" exports: ["QtQuick/Easing 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "Type" @@ -677,6 +680,7 @@ Module { Component { name: "QQmlLocale" exports: ["QtQml/Locale 2.2", "QtQuick/Locale 2.0"] + isCreatable: false exportMetaObjectRevisions: [0, 0] Enum { name: "MeasurementSystem" @@ -750,6 +754,7 @@ Module { name: "QQuickAbstractAnimation" prototype: "QObject" exports: ["QtQuick/Animation 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "Loops" @@ -790,10 +795,81 @@ Module { name: "QQuickAccessibleAttached" prototype: "QObject" exports: ["QtQuick/Accessible 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Property { name: "role"; type: "QAccessible::Role" } Property { name: "name"; type: "string" } Property { name: "description"; type: "string" } + Property { name: "checkable"; type: "bool" } + Property { name: "checked"; type: "bool" } + Property { name: "editable"; type: "bool" } + Property { name: "focusable"; type: "bool" } + Property { name: "focused"; type: "bool" } + Property { name: "multiLine"; type: "bool" } + Property { name: "readOnly"; type: "bool" } + Property { name: "selected"; type: "bool" } + Property { name: "selectable"; type: "bool" } + Property { name: "pressed"; type: "bool" } + Property { name: "checkStateMixed"; type: "bool" } + Property { name: "defaultButton"; type: "bool" } + Property { name: "passwordEdit"; type: "bool" } + Property { name: "selectableText"; type: "bool" } + Signal { + name: "checkableChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "checkedChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "editableChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "focusableChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "focusedChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "multiLineChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "readOnlyChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "selectedChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "selectableChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "pressedChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "checkStateMixedChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "defaultButtonChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "passwordEditChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "selectableTextChanged" + Parameter { name: "arg"; type: "bool" } + } Method { name: "valueChanged" } Method { name: "cursorPositionChanged" } } @@ -1051,6 +1127,7 @@ Module { name: "QQuickAnimator" prototype: "QQuickAbstractAnimation" exports: ["QtQuick/Animator 2.2"] + isCreatable: false exportMetaObjectRevisions: [0] Property { name: "target"; type: "QQuickItem"; isPointer: true } Property { name: "easing"; type: "QEasingCurve" } @@ -1082,6 +1159,7 @@ Module { name: "QQuickApplication" prototype: "QQmlApplication" exports: ["QtQuick/Application 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Property { name: "active"; type: "bool"; isReadonly: true } Property { name: "layoutDirection"; type: "Qt::LayoutDirection"; isReadonly: true } @@ -1097,6 +1175,7 @@ Module { defaultProperty: "data" prototype: "QQuickImplicitSizeItem" exports: ["QtQuick/Positioner 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] attachedType: "QQuickPositionerAttached" Property { name: "spacing"; type: "double" } @@ -1221,6 +1300,11 @@ Module { Method { name: "toDataURL"; type: "string" } } Component { + name: "QQuickCloseEvent" + prototype: "QObject" + Property { name: "accepted"; type: "bool" } + } + Component { name: "QQuickColorAnimation" prototype: "QQuickPropertyAnimation" exports: ["QtQuick/ColorAnimation 2.0"] @@ -1255,6 +1339,7 @@ Module { name: "QQuickDrag" prototype: "QObject" exports: ["QtQuick/Drag 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] attachedType: "QQuickDragAttached" Enum { @@ -1345,6 +1430,39 @@ Module { Signal { name: "positionChanged" } } Component { + name: "QQuickDropEvent" + prototype: "QObject" + Property { name: "x"; type: "double"; isReadonly: true } + Property { name: "y"; type: "double"; isReadonly: true } + Property { name: "source"; type: "QObject"; isReadonly: true; isPointer: true } + Property { name: "keys"; type: "QStringList"; isReadonly: true } + Property { name: "supportedActions"; type: "Qt::DropActions"; isReadonly: true } + Property { name: "proposedAction"; type: "Qt::DropActions"; isReadonly: true } + Property { name: "action"; type: "Qt::DropAction" } + Property { name: "accepted"; type: "bool" } + Property { name: "hasColor"; type: "bool"; isReadonly: true } + Property { name: "hasHtml"; type: "bool"; isReadonly: true } + Property { name: "hasText"; type: "bool"; isReadonly: true } + Property { name: "hasUrls"; type: "bool"; isReadonly: true } + Property { name: "colorData"; type: "QVariant"; isReadonly: true } + Property { name: "html"; type: "string"; isReadonly: true } + Property { name: "text"; type: "string"; isReadonly: true } + Property { name: "urls"; type: "QList<QUrl>"; isReadonly: true } + Property { name: "formats"; type: "QStringList"; isReadonly: true } + Method { + name: "getDataAsString" + Parameter { type: "QQmlV4Function"; isPointer: true } + } + Method { + name: "acceptProposedAction" + Parameter { type: "QQmlV4Function"; isPointer: true } + } + Method { + name: "accept" + Parameter { type: "QQmlV4Function"; isPointer: true } + } + } + Component { name: "QQuickFlickable" defaultProperty: "flickableData" prototype: "QQuickItem" @@ -1517,6 +1635,7 @@ Module { name: "QQuickFontValueType" prototype: "QQmlValueType" exports: ["QtQuick/Font 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "FontWeight" @@ -1552,6 +1671,13 @@ Module { Property { name: "wordSpacing"; type: "double" } } Component { + name: "QQuickGrabGestureEvent" + prototype: "QObject" + Property { name: "touchPoints"; type: "QObject"; isList: true; isReadonly: true } + Property { name: "dragThreshold"; type: "double"; isReadonly: true } + Method { name: "grab" } + } + Component { name: "QQuickGradient" defaultProperty: "stops" prototype: "QObject" @@ -1667,17 +1793,13 @@ Module { Method { name: "moveCurrentIndexLeft" } Method { name: "moveCurrentIndexRight" } } - Component { - name: "QQuickGridViewAttached" - prototype: "QQuickItemViewAttached" - Property { name: "view"; type: "QQuickGridView"; isReadonly: true; isPointer: true } - } + Component { name: "QQuickGridViewAttached"; prototype: "QQuickItemViewAttached" } Component { name: "QQuickImage" defaultProperty: "data" prototype: "QQuickImageBase" - exports: ["QtQuick/Image 2.0"] - exportMetaObjectRevisions: [0] + exports: ["QtQuick/Image 2.0", "QtQuick/Image 2.3"] + exportMetaObjectRevisions: [0, 1] Enum { name: "HAlignment" values: { @@ -1711,6 +1833,7 @@ Module { Property { name: "paintedHeight"; type: "double"; isReadonly: true } Property { name: "horizontalAlignment"; type: "HAlignment" } Property { name: "verticalAlignment"; type: "VAlignment" } + Property { name: "mipmap"; revision: 1; type: "bool" } Signal { name: "paintedGeometryChanged" } Signal { name: "horizontalAlignmentChanged" @@ -1720,6 +1843,11 @@ Module { name: "verticalAlignmentChanged" Parameter { name: "alignment"; type: "VAlignment" } } + Signal { + name: "mipmapChanged" + revision: 1 + Parameter { type: "bool" } + } } Component { name: "QQuickImageBase" @@ -1967,8 +2095,9 @@ Module { name: "QQuickItemView" defaultProperty: "flickableData" prototype: "QQuickFlickable" - exports: ["QtQuick/ItemView 2.1"] - exportMetaObjectRevisions: [1] + exports: ["QtQuick/ItemView 2.1", "QtQuick/ItemView 2.3"] + isCreatable: false + exportMetaObjectRevisions: [1, 2] Enum { name: "LayoutDirection" values: { @@ -2011,6 +2140,8 @@ Module { Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "keyNavigationWraps"; type: "bool" } Property { name: "cacheBuffer"; type: "int" } + Property { name: "displayMarginBeginning"; revision: 2; type: "int" } + Property { name: "displayMarginEnd"; revision: 2; type: "int" } Property { name: "layoutDirection"; type: "Qt::LayoutDirection" } Property { name: "effectiveLayoutDirection"; type: "Qt::LayoutDirection"; isReadonly: true } Property { name: "verticalLayoutDirection"; type: "VerticalLayoutDirection" } @@ -2065,6 +2196,7 @@ Module { Component { name: "QQuickItemViewAttached" prototype: "QObject" + Property { name: "view"; type: "QQuickItemView"; isReadonly: true; isPointer: true } Property { name: "isCurrentItem"; type: "bool"; isReadonly: true } Property { name: "delayRemove"; type: "bool" } Property { name: "section"; type: "string"; isReadonly: true } @@ -2076,9 +2208,27 @@ Module { Signal { name: "prevSectionChanged" } } Component { + name: "QQuickKeyEvent" + prototype: "QObject" + Property { name: "key"; type: "int"; isReadonly: true } + Property { name: "text"; type: "string"; isReadonly: true } + Property { name: "modifiers"; type: "int"; isReadonly: true } + Property { name: "isAutoRepeat"; type: "bool"; isReadonly: true } + Property { name: "count"; type: "int"; isReadonly: true } + Property { name: "nativeScanCode"; type: "uint"; isReadonly: true } + Property { name: "accepted"; type: "bool" } + Method { + name: "matches" + revision: 2 + type: "bool" + Parameter { name: "key"; type: "QKeySequence::StandardKey" } + } + } + Component { name: "QQuickKeyNavigationAttached" prototype: "QObject" exports: ["QtQuick/KeyNavigation 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "Priority" @@ -2099,6 +2249,7 @@ Module { name: "QQuickKeysAttached" prototype: "QObject" exports: ["QtQuick/Keys 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "Priority" @@ -2275,6 +2426,7 @@ Module { name: "QQuickLayoutMirroringAttached" prototype: "QObject" exports: ["QtQuick/LayoutMirroring 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Property { name: "enabled"; type: "bool" } Property { name: "childrenInherit"; type: "bool" } @@ -2312,11 +2464,7 @@ Module { Method { name: "incrementCurrentIndex" } Method { name: "decrementCurrentIndex" } } - Component { - name: "QQuickListViewAttached" - prototype: "QQuickItemViewAttached" - Property { name: "view"; type: "QQuickListView"; isReadonly: true; isPointer: true } - } + Component { name: "QQuickListViewAttached"; prototype: "QQuickItemViewAttached" } Component { name: "QQuickLoader" defaultProperty: "data" @@ -2346,6 +2494,13 @@ Module { } } Component { + name: "QQuickMatrix4x4" + prototype: "QQuickTransform" + exports: ["QtQuick/Matrix4x4 2.3"] + exportMetaObjectRevisions: [0] + Property { name: "matrix"; type: "QMatrix4x4" } + } + Component { name: "QQuickMouseArea" defaultProperty: "data" prototype: "QQuickItem" @@ -2425,6 +2580,7 @@ Module { Property { name: "touchPoints"; type: "QQuickTouchPoint"; isList: true; isReadonly: true } Property { name: "minimumTouchPoints"; type: "int" } Property { name: "maximumTouchPoints"; type: "int" } + Property { name: "mouseEnabled"; type: "bool" } Signal { name: "pressed" Parameter { name: "touchPoints"; type: "QList<QObject*>" } @@ -2483,6 +2639,7 @@ Module { defaultProperty: "data" prototype: "QQuickItem" exports: ["QtQuick/PaintedItem 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "RenderTarget" @@ -2844,6 +3001,24 @@ Module { } } Component { + name: "QQuickPinchEvent" + prototype: "QObject" + Property { name: "center"; type: "QPointF"; isReadonly: true } + Property { name: "startCenter"; type: "QPointF"; isReadonly: true } + Property { name: "previousCenter"; type: "QPointF"; isReadonly: true } + Property { name: "scale"; type: "double"; isReadonly: true } + Property { name: "previousScale"; type: "double"; isReadonly: true } + Property { name: "angle"; type: "double"; isReadonly: true } + Property { name: "previousAngle"; type: "double"; isReadonly: true } + Property { name: "rotation"; type: "double"; isReadonly: true } + Property { name: "point1"; type: "QPointF"; isReadonly: true } + Property { name: "startPoint1"; type: "QPointF"; isReadonly: true } + Property { name: "point2"; type: "QPointF"; isReadonly: true } + Property { name: "startPoint2"; type: "QPointF"; isReadonly: true } + Property { name: "pointCount"; type: "int"; isReadonly: true } + Property { name: "accepted"; type: "bool" } + } + Component { name: "QQuickPositionerAttached" prototype: "QObject" Property { name: "index"; type: "int"; isReadonly: true } @@ -3081,6 +3256,7 @@ Module { name: "QQuickShaderEffectMesh" prototype: "QObject" exports: ["QtQuick/ShaderEffectMesh 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Signal { name: "geometryChanged" } } @@ -3430,8 +3606,8 @@ Module { name: "QQuickText" defaultProperty: "data" prototype: "QQuickImplicitSizeItem" - exports: ["QtQuick/Text 2.0", "QtQuick/Text 2.2"] - exportMetaObjectRevisions: [0, 2] + exports: ["QtQuick/Text 2.0", "QtQuick/Text 2.2", "QtQuick/Text 2.3"] + exportMetaObjectRevisions: [0, 2, 3] Enum { name: "HAlignment" values: { @@ -3587,6 +3763,13 @@ Module { Parameter { name: "line"; type: "QQuickTextLine"; isPointer: true } } Method { name: "doLayout" } + Method { + name: "linkAt" + revision: 3 + type: "string" + Parameter { name: "x"; type: "double" } + Parameter { name: "y"; type: "double" } + } } Component { name: "QQuickTextDocument"; prototype: "QObject" } Component { @@ -3596,9 +3779,10 @@ Module { exports: [ "QtQuick/TextEdit 2.0", "QtQuick/TextEdit 2.1", - "QtQuick/TextEdit 2.2" + "QtQuick/TextEdit 2.2", + "QtQuick/TextEdit 2.3" ] - exportMetaObjectRevisions: [0, 1, 2] + exportMetaObjectRevisions: [0, 1, 2, 3] Enum { name: "HAlignment" values: { @@ -3830,13 +4014,20 @@ Module { Parameter { name: "start"; type: "int" } Parameter { name: "end"; type: "int" } } + Method { + name: "linkAt" + revision: 3 + type: "string" + Parameter { name: "x"; type: "double" } + Parameter { name: "y"; type: "double" } + } } Component { name: "QQuickTextInput" defaultProperty: "data" prototype: "QQuickImplicitSizeItem" - exports: ["QtQuick/TextInput 2.0"] - exportMetaObjectRevisions: [0] + exports: ["QtQuick/TextInput 2.0", "QtQuick/TextInput 2.2"] + exportMetaObjectRevisions: [0, 2] Enum { name: "EchoMode" values: { @@ -3932,6 +4123,7 @@ Module { Property { name: "contentHeight"; type: "double"; isReadonly: true } Property { name: "renderType"; type: "RenderType" } Signal { name: "accepted" } + Signal { name: "editingFinished"; revision: 2 } Signal { name: "fontChanged" Parameter { name: "font"; type: "QFont" } @@ -4036,6 +4228,15 @@ Module { } } Component { + name: "QQuickTextLine" + prototype: "QObject" + Property { name: "number"; type: "int"; isReadonly: true } + Property { name: "width"; type: "double" } + Property { name: "height"; type: "double" } + Property { name: "x"; type: "double" } + Property { name: "y"; type: "double" } + } + Component { name: "QQuickTouchPoint" prototype: "QObject" exports: ["QtQuick/TouchPoint 2.0"] @@ -4125,6 +4326,7 @@ Module { name: "QQuickViewTransitionAttached" prototype: "QObject" exports: ["QtQuick/ViewTransition 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] Property { name: "index"; type: "int"; isReadonly: true } Property { name: "item"; type: "QQuickItem"; isReadonly: true; isPointer: true } @@ -4133,6 +4335,17 @@ Module { Property { name: "targetItems"; type: "QObject"; isList: true; isReadonly: true } } Component { + name: "QQuickWheelEvent" + prototype: "QObject" + Property { name: "x"; type: "double"; isReadonly: true } + Property { name: "y"; type: "double"; isReadonly: true } + Property { name: "angleDelta"; type: "QPoint"; isReadonly: true } + Property { name: "pixelDelta"; type: "QPoint"; isReadonly: true } + Property { name: "buttons"; type: "int"; isReadonly: true } + Property { name: "modifiers"; type: "int"; isReadonly: true } + Property { name: "accepted"; type: "bool" } + } + Component { name: "QQuickWorkerScript" prototype: "QObject" exports: ["QtQuick/WorkerScript 2.0"] @@ -4585,7 +4798,10 @@ Module { "AA_SynthesizeTouchForUnhandledMouseEvents": 11, "AA_SynthesizeMouseForUnhandledTouchEvents": 12, "AA_UseHighDpiPixmaps": 13, - "AA_AttributeCount": 14 + "AA_ForceRasterWidgets": 14, + "AA_UseDesktopOpenGL": 15, + "AA_UseOpenGLES": 16, + "AA_AttributeCount": 17 } } Enum { @@ -5027,6 +5243,9 @@ Module { "Key_Blue": 16777495, "Key_ChannelUp": 16777496, "Key_ChannelDown": 16777497, + "Key_Guide": 16777498, + "Key_Info": 16777499, + "Key_Settings": 16777500, "Key_MediaLast": 16842751, "Key_Select": 16842752, "Key_Yes": 16842753, @@ -5037,6 +5256,7 @@ Module { "Key_Sleep": 16908292, "Key_Play": 16908293, "Key_Zoom": 16908294, + "Key_Exit": 16908298, "Key_Context1": 17825792, "Key_Context2": 17825793, "Key_Context3": 17825794, @@ -5288,6 +5508,15 @@ Module { } } Enum { + name: "Edges" + values: { + "TopEdge": 1, + "LeftEdge": 2, + "RightEdge": 4, + "BottomEdge": 8 + } + } + Enum { name: "ConnectionType" values: { "AutoConnection": 0, @@ -5376,6 +5605,9 @@ Module { "ImAnchorPosition": 128, "ImHints": 256, "ImPreferredLanguage": 512, + "ImAbsolutePosition": 1024, + "ImTextBeforeCursor": 2048, + "ImTextAfterCursor": 4096, "ImPlatformData": -2147483648, "ImQueryInput": 186, "ImQueryAll": -1 @@ -5395,6 +5627,9 @@ Module { "ImAnchorPosition": 128, "ImHints": 256, "ImPreferredLanguage": 512, + "ImAbsolutePosition": 1024, + "ImTextBeforeCursor": 2048, + "ImTextAfterCursor": 4096, "ImPlatformData": -2147483648, "ImQueryInput": 186, "ImQueryAll": -1 diff --git a/src/imports/window/plugins.qmltypes b/src/imports/window/plugins.qmltypes index 1e3577acda..f69359b125 100644 --- a/src/imports/window/plugins.qmltypes +++ b/src/imports/window/plugins.qmltypes @@ -24,6 +24,7 @@ Module { name: "QQuickScreen" prototype: "QObject" exports: ["QtQuick.Window/Screen 2.0"] + isCreatable: false exportMetaObjectRevisions: [0] attachedType: "QQuickScreenAttached" } @@ -56,6 +57,12 @@ Module { prototype: "QWindow" exports: ["QtQuick.Window/Window 2.0"] exportMetaObjectRevisions: [0] + Enum { + name: "SceneGraphError" + values: { + "ContextNotAvailable": 1 + } + } Property { name: "data"; type: "QObject"; isList: true; isReadonly: true } Property { name: "color"; type: "QColor" } Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } @@ -67,11 +74,19 @@ Module { isPointer: true } Signal { name: "frameSwapped" } + Signal { + name: "openglContextCreated" + revision: 2 + Parameter { name: "context"; type: "QOpenGLContext"; isPointer: true } + } Signal { name: "sceneGraphInitialized" } Signal { name: "sceneGraphInvalidated" } Signal { name: "beforeSynchronizing" } + Signal { name: "afterSynchronizing"; revision: 2 } Signal { name: "beforeRendering" } Signal { name: "afterRendering" } + Signal { name: "afterAnimating"; revision: 2 } + Signal { name: "sceneGraphAboutToStop"; revision: 2 } Signal { name: "closing" revision: 1 @@ -82,6 +97,12 @@ Module { Parameter { type: "QColor" } } Signal { name: "activeFocusItemChanged"; revision: 1 } + Signal { + name: "sceneGraphError" + revision: 2 + Parameter { name: "error"; type: "QQuickWindow::SceneGraphError" } + Parameter { name: "message"; type: "string" } + } Method { name: "update" } Method { name: "releaseResources" } } @@ -91,6 +112,16 @@ Module { prototype: "QQuickWindow" exports: ["QtQuick.Window/Window 2.1"] exportMetaObjectRevisions: [0] + Property { name: "visible"; type: "bool" } + Property { name: "visibility"; type: "Visibility" } + Signal { + name: "visibleChanged" + Parameter { name: "arg"; type: "bool" } + } + Signal { + name: "visibilityChanged" + Parameter { name: "visibility"; type: "QWindow::Visibility" } + } } Component { name: "QWindow" @@ -135,6 +166,11 @@ Module { Parameter { name: "windowState"; type: "Qt::WindowState" } } Signal { + name: "windowTitleChanged" + revision: 2 + Parameter { name: "title"; type: "string" } + } + Signal { name: "xChanged" Parameter { name: "arg"; type: "int" } } diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 1fba6c0d3c..6ee23690a6 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -151,7 +151,7 @@ struct JSClass struct String { quint32 flags; // isArrayIndex - QArrayData str; + qint32 size; // uint16 strdata[] static int calculateSize(const QString &str) { @@ -195,13 +195,12 @@ struct Unit const uint *offsetTable = reinterpret_cast<const uint*>((reinterpret_cast<const char *>(this)) + offsetToStringTable); const uint offset = offsetTable[idx]; const String *str = reinterpret_cast<const String*>(reinterpret_cast<const char *>(this) + offset); - if (str->str.size == 0) + if (str->size == 0) return QString(); - QStringDataPtr holder = { const_cast<QStringData *>(static_cast<const QStringData*>(&str->str)) }; - QString qstr(holder); + const QChar *characters = reinterpret_cast<const QChar *>(str + 1); if (flags & StaticData) - return qstr; - return QString(qstr.constData(), qstr.length()); + return QString::fromRawData(characters, str->size); + return QString(characters, str->size); } const uint *functionOffsetTable() const { return reinterpret_cast<const uint*>((reinterpret_cast<const char *>(this)) + offsetToFunctionTable); } diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp index 65ef5c4b5e..144ef8a79e 100644 --- a/src/qml/compiler/qv4compiler.cpp +++ b/src/qml/compiler/qv4compiler.cpp @@ -82,11 +82,7 @@ void QV4::Compiler::StringTableGenerator::serialize(uint *stringTable, char *dat QV4::CompiledData::String *s = (QV4::CompiledData::String*)(stringData); s->flags = 0; // ### - s->str.ref.atomic.store(-1); - s->str.size = qstr.length(); - s->str.alloc = 0; - s->str.capacityReserved = false; - s->str.offset = sizeof(QArrayData); + s->size = qstr.length(); memcpy(s + 1, qstr.constData(), (qstr.length() + 1)*sizeof(ushort)); stringData += QV4::CompiledData::String::calculateSize(qstr); diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp index d05ada481a..9cb727dd63 100644 --- a/src/qml/jsapi/qjsengine.cpp +++ b/src/qml/jsapi/qjsengine.cpp @@ -235,7 +235,7 @@ void QJSEngine::collectGarbage() Evaluates \a program, using \a lineNumber as the base line number, and returns the result of the evaluation. - The script code will be evaluated in the current context. + The script code will be evaluated in the context of the global object. The evaluation of \a program can cause an exception in the engine; in this case the return value will be the exception @@ -261,8 +261,11 @@ void QJSEngine::collectGarbage() */ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, int lineNumber) { - QV4::Scope scope(d->m_v4Engine); - QV4::ExecutionContext *ctx = d->m_v4Engine->currentContext(); + QV4::ExecutionEngine *v4 = d->m_v4Engine; + QV4::Scope scope(v4); + QV4::ExecutionContext *ctx = v4->currentContext(); + if (ctx != v4->rootContext) + ctx = v4->pushGlobalContext(); QV4::ScopedValue result(scope); QV4::Script script(ctx, program, fileName, lineNumber); @@ -273,7 +276,9 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in result = script.run(); if (scope.engine->hasException) result = ctx->catchException(); - return new QJSValuePrivate(d->m_v4Engine, result); + if (ctx != v4->rootContext) + v4->popContext(); + return new QJSValuePrivate(v4, result); } /*! diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index 7c38ae4f01..f1e51703a8 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -508,21 +508,24 @@ ReturnedValue StringPrototype::method_replace(CallContext *ctx) Scoped<RegExpObject> regExp(scope, searchValue); if (regExp) { uint offset = 0; + + // We extract the pointer here to work around a compiler bug on Android. + Scoped<RegExp> re(scope, regExp->value); while (true) { int oldSize = nMatchOffsets; - if (allocatedMatchOffsets < nMatchOffsets + regExp->value->captureCount() * 2) { - allocatedMatchOffsets = qMax(allocatedMatchOffsets * 2, nMatchOffsets + regExp->value->captureCount() * 2); + if (allocatedMatchOffsets < nMatchOffsets + re->captureCount() * 2) { + allocatedMatchOffsets = qMax(allocatedMatchOffsets * 2, nMatchOffsets + re->captureCount() * 2); uint *newOffsets = (uint *)malloc(allocatedMatchOffsets*sizeof(uint)); memcpy(newOffsets, matchOffsets, nMatchOffsets*sizeof(uint)); if (matchOffsets != _matchOffsets) free(matchOffsets); matchOffsets = newOffsets; } - if (regExp->value->match(string, offset, matchOffsets + oldSize) == JSC::Yarr::offsetNoMatch) { + if (re->match(string, offset, matchOffsets + oldSize) == JSC::Yarr::offsetNoMatch) { nMatchOffsets = oldSize; break; } - nMatchOffsets += regExp->value->captureCount() * 2; + nMatchOffsets += re->captureCount() * 2; if (!regExp->global) break; offset = qMax(offset + 1, matchOffsets[oldSize + 1]); diff --git a/src/quick/items/qquickimage_p.h b/src/quick/items/qquickimage_p.h index 902e613b04..56b064f525 100644 --- a/src/quick/items/qquickimage_p.h +++ b/src/quick/items/qquickimage_p.h @@ -100,7 +100,7 @@ Q_SIGNALS: void paintedGeometryChanged(); void horizontalAlignmentChanged(HAlignment alignment); void verticalAlignmentChanged(VAlignment alignment); - void mipmapChanged(bool); + Q_REVISION(1) void mipmapChanged(bool); protected: QQuickImage(QQuickImagePrivate &dd, QQuickItem *parent); diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index 4c2028b53d..10c1780799 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -177,7 +177,7 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickTranslate>(uri,major,minor,"Translate"); qmlRegisterType<QQuickRotation>(uri,major,minor,"Rotation"); qmlRegisterType<QQuickScale>(uri,major,minor,"Scale"); - qmlRegisterType<QQuickMatrix4x4>(uri,2,4,"Matrix4x4"); + qmlRegisterType<QQuickMatrix4x4>(uri,2,3,"Matrix4x4"); qmlRegisterType<QQuickText>(uri,major,minor,"Text"); qmlRegisterType<QQuickTextEdit>(uri,major,minor,"TextEdit"); qmlRegisterType<QQuickTextEdit,1>(uri,2,1,"TextEdit"); diff --git a/src/quick/items/qquickwindowmodule.cpp b/src/quick/items/qquickwindowmodule.cpp index d06fff8c3e..91388ea30f 100644 --- a/src/quick/items/qquickwindowmodule.cpp +++ b/src/quick/items/qquickwindowmodule.cpp @@ -175,6 +175,7 @@ void QQuickWindowModule::defineModule() qmlRegisterType<QQuickWindow>(uri, 2, 0, "Window"); qmlRegisterRevision<QWindow,1>(uri, 2, 1); + qmlRegisterRevision<QWindow,2>(uri, 2, 2); qmlRegisterRevision<QQuickWindow,1>(uri, 2, 1);//Type moved to a subclass, but also has new members qmlRegisterRevision<QQuickWindow,2>(uri, 2, 2); qmlRegisterType<QQuickWindowQmlImpl>(uri, 2, 1, "Window"); |