From 182469fc85257fccfa8024e132ad40a50b03c0f5 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 9 Mar 2017 13:59:40 +0100 Subject: Build fix for -no-feature-quick-shadereffect Change-Id: Ie1f601c6ae4c6c5d8d23b14a6670979d9c24e209 Reviewed-by: Simon Hausmann --- src/imports/imports.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports') diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 45719df874..0ba949f070 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -20,7 +20,7 @@ qtHaveModule(quick) { sharedimage \ testlib - qtConfig(quick-sprite):qtConfig(opengl(es1|es2)?): \ + qtConfig(quick-shadereffect):qtConfig(quick-sprite):qtConfig(opengl(es1|es2)?): \ SUBDIRS += particles } -- cgit v1.2.3 From 323d8aafbf0fbe1911fbc8b286b2a05455dd4861 Mon Sep 17 00:00:00 2001 From: Marco Benelli Date: Fri, 24 Feb 2017 16:07:34 +0100 Subject: Update plugins.qmltypes for 5.9 Change-Id: I5e6dbd2012718890f5fcc92beebcd1829dc53a57 Reviewed-by: Thomas Hartmann --- src/imports/builtins/builtins.qmltypes | 32 ++++++++- src/imports/particles/plugins.qmltypes | 6 +- src/imports/qtquick2/plugins.qmltypes | 114 ++++++++++++++++++++++++--------- src/imports/testlib/plugins.qmltypes | 42 +++++++++++- src/imports/window/plugins.qmltypes | 56 ++++++++++------ 5 files changed, 197 insertions(+), 53 deletions(-) (limited to 'src/imports') diff --git a/src/imports/builtins/builtins.qmltypes b/src/imports/builtins/builtins.qmltypes index 88e3ac6634..ac95a8837b 100644 --- a/src/imports/builtins/builtins.qmltypes +++ b/src/imports/builtins/builtins.qmltypes @@ -149,6 +149,25 @@ Module { "AlignCenter": 132 } } + Enum { + name: "TextFlag" + values: { + "TextSingleLine": 256, + "TextDontClip": 512, + "TextExpandTabs": 1024, + "TextShowMnemonic": 2048, + "TextWordWrap": 4096, + "TextWrapAnywhere": 8192, + "TextDontPrint": 16384, + "TextIncludeTrailingSpaces": 134217728, + "TextHideMnemonic": 32768, + "TextJustificationForced": 65536, + "TextForceLeftToRight": 131072, + "TextForceRightToLeft": 262144, + "TextLongestVariant": 524288, + "TextBypassShaping": 1048576 + } + } Enum { name: "TextElideMode" values: { @@ -440,7 +459,8 @@ Module { "AA_SynthesizeMouseForUnhandledTabletEvents": 24, "AA_CompressHighFrequencyEvents": 25, "AA_DontCheckOpenGLContextThreadAffinity": 26, - "AA_AttributeCount": 27 + "AA_DisableShaderDiskCache": 27, + "AA_AttributeCount": 28 } } Enum { @@ -1096,7 +1116,8 @@ Module { "SystemLocaleLongDate": 5, "DefaultLocaleShortDate": 6, "DefaultLocaleLongDate": 7, - "RFC2822Date": 8 + "RFC2822Date": 8, + "ISODateWithMs": 9 } } Enum { @@ -1607,6 +1628,13 @@ Module { "MouseEventFlagMask": 255 } } + Enum { + name: "ChecksumType" + values: { + "ChecksumIso3309": 0, + "ChecksumItuV41": 1 + } + } } Component { name: "QEasingCurve"; prototype: "QQmlEasingValueType" } } diff --git a/src/imports/particles/plugins.qmltypes b/src/imports/particles/plugins.qmltypes index 5c4bd01980..6c7c98cc71 100644 --- a/src/imports/particles/plugins.qmltypes +++ b/src/imports/particles/plugins.qmltypes @@ -275,11 +275,11 @@ Module { Parameter { name: "arg"; type: "double" } } Method { - name: "setAcceleration" + name: "setMagnitude" Parameter { name: "arg"; type: "double" } } Method { - name: "setMagnitude" + name: "setAcceleration" Parameter { name: "arg"; type: "double" } } Method { @@ -552,7 +552,7 @@ Module { Parameter { name: "arg"; type: "bool" } } Method { - name: "setmirrored" + name: "setMirrored" Parameter { name: "arg"; type: "bool" } } } diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes index 441cd743aa..a9534b5ccc 100644 --- a/src/imports/qtquick2/plugins.qmltypes +++ b/src/imports/qtquick2/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable -noforceqtquick QtQuick 2.8' +// 'qmlplugindump -nonrelocatable -noforceqtquick QtQuick 2.9' Module { dependencies: [] @@ -439,6 +439,13 @@ Module { } } } + Component { + name: "QPointingDeviceUniqueId" + exports: ["QtQuick/PointingDeviceUniqueId 2.9"] + isCreatable: false + exportMetaObjectRevisions: [0] + Property { name: "numericId"; type: "qlonglong"; isReadonly: true } + } Component { name: "QQmlApplication" prototype: "QObject" @@ -1159,6 +1166,8 @@ Module { Property { name: "supportsMultipleWindows"; type: "bool"; isReadonly: true } Property { name: "state"; type: "Qt::ApplicationState"; isReadonly: true } Property { name: "font"; type: "QFont"; isReadonly: true } + Property { name: "displayName"; type: "string" } + Property { name: "screens"; type: "QQuickScreenInfo"; isList: true; isReadonly: true } Signal { name: "stateChanged" Parameter { name: "state"; type: "Qt::ApplicationState" } @@ -1168,9 +1177,13 @@ Module { name: "QQuickBasePositioner" defaultProperty: "data" prototype: "QQuickImplicitSizeItem" - exports: ["QtQuick/Positioner 2.0", "QtQuick/Positioner 2.6"] + exports: [ + "QtQuick/Positioner 2.0", + "QtQuick/Positioner 2.6", + "QtQuick/Positioner 2.9" + ] isCreatable: false - exportMetaObjectRevisions: [0, 6] + exportMetaObjectRevisions: [0, 6, 9] attachedType: "QQuickPositionerAttached" Property { name: "spacing"; type: "double" } Property { name: "populate"; type: "QQuickTransition"; isPointer: true } @@ -1186,6 +1199,8 @@ Module { Signal { name: "leftPaddingChanged"; revision: 6 } Signal { name: "rightPaddingChanged"; revision: 6 } Signal { name: "bottomPaddingChanged"; revision: 6 } + Signal { name: "positioningComplete"; revision: 9 } + Method { name: "forceLayout"; revision: 9 } } Component { name: "QQuickBehavior" @@ -1502,8 +1517,8 @@ Module { name: "QQuickFlickable" defaultProperty: "flickableData" prototype: "QQuickItem" - exports: ["QtQuick/Flickable 2.0"] - exportMetaObjectRevisions: [0] + exports: ["QtQuick/Flickable 2.0", "QtQuick/Flickable 2.9"] + exportMetaObjectRevisions: [0, 9] Enum { name: "BoundsBehavior" values: { @@ -1563,6 +1578,8 @@ Module { isPointer: true } Property { name: "pixelAligned"; type: "bool" } + Property { name: "horizontalOvershoot"; revision: 9; type: "double"; isReadonly: true } + Property { name: "verticalOvershoot"; revision: 9; type: "double"; isReadonly: true } Property { name: "flickableData"; type: "QObject"; isList: true; isReadonly: true } Property { name: "flickableChildren"; type: "QQuickItem"; isList: true; isReadonly: true } Signal { name: "isAtBoundaryChanged" } @@ -1572,6 +1589,8 @@ Module { Signal { name: "flickEnded" } Signal { name: "dragStarted" } Signal { name: "dragEnded" } + Signal { name: "horizontalOvershootChanged"; revision: 9 } + Signal { name: "verticalOvershootChanged"; revision: 9 } Method { name: "resizeContent" Parameter { name: "w"; type: "double" } @@ -2084,8 +2103,13 @@ Module { name: "QQuickItem" defaultProperty: "data" prototype: "QObject" - exports: ["QtQuick/Item 2.0", "QtQuick/Item 2.1", "QtQuick/Item 2.4"] - exportMetaObjectRevisions: [0, 1, 2] + exports: [ + "QtQuick/Item 2.0", + "QtQuick/Item 2.1", + "QtQuick/Item 2.4", + "QtQuick/Item 2.7" + ] + exportMetaObjectRevisions: [0, 1, 2, 7] Enum { name: "TransformOrigin" values: { @@ -2210,23 +2234,21 @@ Module { Parameter { name: "point"; type: "QPointF" } } Method { - name: "mapToGlobal" - revision: 7 - type: "QPointF" - Parameter { name: "point"; type: "QPointF" } + name: "mapFromItem" + Parameter { type: "QQmlV4Function"; isPointer: true } } Method { - name: "mapFromGlobal" - revision: 7 - type: "QPointF" - Parameter { name: "point"; type: "QPointF" } + name: "mapToItem" + Parameter { type: "QQmlV4Function"; isPointer: true } } Method { - name: "mapFromItem" + name: "mapFromGlobal" + revision: 7 Parameter { type: "QQmlV4Function"; isPointer: true } } Method { - name: "mapToItem" + name: "mapToGlobal" + revision: 7 Parameter { type: "QQmlV4Function"; isPointer: true } } Method { name: "forceActiveFocus" } @@ -2259,6 +2281,11 @@ Module { type: "bool" Parameter { name: "fileName"; type: "string" } } + Method { + name: "saveToFile" + type: "bool" + Parameter { name: "fileName"; type: "string" } + } } Component { name: "QQuickItemLayer" @@ -2318,9 +2345,13 @@ Module { name: "QQuickItemView" defaultProperty: "flickableData" prototype: "QQuickFlickable" - exports: ["QtQuick/ItemView 2.1", "QtQuick/ItemView 2.3"] + exports: [ + "QtQuick/ItemView 2.1", + "QtQuick/ItemView 2.3", + "QtQuick/ItemView 2.7" + ] isCreatable: false - exportMetaObjectRevisions: [1, 2] + exportMetaObjectRevisions: [1, 2, 7] Enum { name: "LayoutDirection" values: { @@ -2494,6 +2525,10 @@ Module { name: "released" Parameter { name: "event"; type: "QQuickKeyEvent"; isPointer: true } } + Signal { + name: "shortcutOverride" + Parameter { name: "event"; type: "QQuickKeyEvent"; isPointer: true } + } Signal { name: "digit0Pressed" Parameter { name: "event"; type: "QQuickKeyEvent"; isPointer: true } @@ -2757,9 +2792,10 @@ Module { exports: [ "QtQuick/MouseArea 2.0", "QtQuick/MouseArea 2.4", - "QtQuick/MouseArea 2.5" + "QtQuick/MouseArea 2.5", + "QtQuick/MouseArea 2.9" ] - exportMetaObjectRevisions: [0, 1, 2] + exportMetaObjectRevisions: [0, 1, 2, 9] Property { name: "mouseX"; type: "double"; isReadonly: true } Property { name: "mouseY"; type: "double"; isReadonly: true } Property { name: "containsMouse"; type: "bool"; isReadonly: true } @@ -2774,6 +2810,7 @@ Module { Property { name: "propagateComposedEvents"; type: "bool" } Property { name: "cursorShape"; type: "Qt::CursorShape" } Property { name: "containsPress"; revision: 1; type: "bool"; isReadonly: true } + Property { name: "pressAndHoldInterval"; revision: 9; type: "int" } Signal { name: "hoveredChanged" } Signal { name: "scrollGestureEnabledChanged"; revision: 2 } Signal { @@ -2816,6 +2853,7 @@ Module { Signal { name: "exited" } Signal { name: "canceled" } Signal { name: "containsPressChanged"; revision: 1 } + Signal { name: "pressAndHoldIntervalChanged"; revision: 9 } } Component { name: "QQuickMultiPointTouchArea" @@ -3600,14 +3638,20 @@ Module { Component { name: "QQuickShortcut" prototype: "QObject" - exports: ["QtQuick/Shortcut 2.5", "QtQuick/Shortcut 2.6"] - exportMetaObjectRevisions: [0, 1] + exports: [ + "QtQuick/Shortcut 2.5", + "QtQuick/Shortcut 2.6", + "QtQuick/Shortcut 2.9" + ] + exportMetaObjectRevisions: [0, 1, 9] Property { name: "sequence"; type: "QVariant" } + Property { name: "sequences"; revision: 9; type: "QVariantList" } Property { name: "nativeText"; revision: 1; type: "string"; isReadonly: true } Property { name: "portableText"; revision: 1; type: "string"; isReadonly: true } Property { name: "enabled"; type: "bool" } Property { name: "autoRepeat"; type: "bool" } Property { name: "context"; type: "Qt::ShortcutContext" } + Signal { name: "sequencesChanged"; revision: 9 } Signal { name: "activated" } Signal { name: "activatedAmbiguously" } } @@ -3926,9 +3970,10 @@ Module { "QtQuick/Text 2.0", "QtQuick/Text 2.2", "QtQuick/Text 2.3", - "QtQuick/Text 2.6" + "QtQuick/Text 2.6", + "QtQuick/Text 2.9" ] - exportMetaObjectRevisions: [0, 2, 3, 6] + exportMetaObjectRevisions: [0, 2, 3, 6, 9] Enum { name: "HAlignment" values: { @@ -4038,6 +4083,7 @@ Module { Property { name: "leftPadding"; revision: 6; type: "double" } Property { name: "rightPadding"; revision: 6; type: "double" } Property { name: "bottomPadding"; revision: 6; type: "double" } + Property { name: "fontInfo"; revision: 9; type: "QJSValue"; isReadonly: true } Signal { name: "textChanged" Parameter { name: "text"; type: "string" } @@ -4093,7 +4139,9 @@ Module { Signal { name: "leftPaddingChanged"; revision: 6 } Signal { name: "rightPaddingChanged"; revision: 6 } Signal { name: "bottomPaddingChanged"; revision: 6 } + Signal { name: "fontInfoChanged"; revision: 9 } Method { name: "doLayout" } + Method { name: "forceLayout"; revision: 9 } Method { name: "linkAt" revision: 3 @@ -4390,9 +4438,10 @@ Module { "QtQuick/TextInput 2.2", "QtQuick/TextInput 2.4", "QtQuick/TextInput 2.6", - "QtQuick/TextInput 2.7" + "QtQuick/TextInput 2.7", + "QtQuick/TextInput 2.9" ] - exportMetaObjectRevisions: [0, 2, 3, 6, 7] + exportMetaObjectRevisions: [0, 2, 3, 6, 7, 9] Enum { name: "EchoMode" values: { @@ -4497,6 +4546,7 @@ Module { Property { name: "bottomPadding"; revision: 6; type: "double" } Signal { name: "accepted" } Signal { name: "editingFinished"; revision: 2 } + Signal { name: "textEdited"; revision: 9 } Signal { name: "fontChanged" Parameter { name: "font"; type: "QFont" } @@ -4657,13 +4707,16 @@ Module { Component { name: "QQuickTouchPoint" prototype: "QObject" - exports: ["QtQuick/TouchPoint 2.0"] - exportMetaObjectRevisions: [0] + exports: ["QtQuick/TouchPoint 2.0", "QtQuick/TouchPoint 2.9"] + exportMetaObjectRevisions: [0, 0] Property { name: "pointId"; type: "int"; isReadonly: true } + Property { name: "uniqueId"; revision: 9; type: "QPointingDeviceUniqueId"; isReadonly: true } Property { name: "pressed"; type: "bool"; isReadonly: true } Property { name: "x"; type: "double"; isReadonly: true } Property { name: "y"; type: "double"; isReadonly: true } + Property { name: "ellipseDiameters"; revision: 9; type: "QSizeF"; isReadonly: true } Property { name: "pressure"; type: "double"; isReadonly: true } + Property { name: "rotation"; revision: 9; type: "double"; isReadonly: true } Property { name: "velocity"; type: "QVector2D"; isReadonly: true } Property { name: "area"; type: "QRectF"; isReadonly: true } Property { name: "startX"; type: "double"; isReadonly: true } @@ -4672,6 +4725,9 @@ Module { Property { name: "previousY"; type: "double"; isReadonly: true } Property { name: "sceneX"; type: "double"; isReadonly: true } Property { name: "sceneY"; type: "double"; isReadonly: true } + Signal { name: "uniqueIdChanged"; revision: 9 } + Signal { name: "ellipseDiametersChanged"; revision: 9 } + Signal { name: "rotationChanged"; revision: 9 } } Component { name: "QQuickTransform"; prototype: "QObject" } Component { diff --git a/src/imports/testlib/plugins.qmltypes b/src/imports/testlib/plugins.qmltypes index 563778e55e..5d7ca51adc 100644 --- a/src/imports/testlib/plugins.qmltypes +++ b/src/imports/testlib/plugins.qmltypes @@ -4,10 +4,44 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable -noforceqtquick QtTest 1.1' +// 'qmlplugindump -nonrelocatable -noforceqtquick QtTest 1.2' Module { dependencies: ["QtQuick 2.0"] + Component { + name: "QQuickTouchEventSequence" + prototype: "QObject" + Method { + name: "press" + type: "QObject*" + Parameter { name: "touchId"; type: "int" } + Parameter { name: "item"; type: "QObject"; isPointer: true } + Parameter { name: "x"; type: "double" } + Parameter { name: "y"; type: "double" } + } + Method { + name: "move" + type: "QObject*" + Parameter { name: "touchId"; type: "int" } + Parameter { name: "item"; type: "QObject"; isPointer: true } + Parameter { name: "x"; type: "double" } + Parameter { name: "y"; type: "double" } + } + Method { + name: "release" + type: "QObject*" + Parameter { name: "touchId"; type: "int" } + Parameter { name: "item"; type: "QObject"; isPointer: true } + Parameter { name: "x"; type: "double" } + Parameter { name: "y"; type: "double" } + } + Method { + name: "stationary" + type: "QObject*" + Parameter { name: "touchId"; type: "int" } + } + Method { name: "commit"; type: "QObject*" } + } Component { name: "QuickTestEvent" prototype: "QObject" @@ -127,6 +161,12 @@ Module { Parameter { name: "yDelta"; type: "int" } Parameter { name: "delay"; type: "int" } } + Method { + name: "touchEvent" + type: "QQuickTouchEventSequence*" + Parameter { name: "item"; type: "QObject"; isPointer: true } + } + Method { name: "touchEvent"; type: "QQuickTouchEventSequence*" } } Component { name: "QuickTestResult" diff --git a/src/imports/window/plugins.qmltypes b/src/imports/window/plugins.qmltypes index a79bd8c332..cea2a910a7 100644 --- a/src/imports/window/plugins.qmltypes +++ b/src/imports/window/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQuick.Window 2.2' +// 'qmlplugindump -nonrelocatable QtQuick.Window 2.3' Module { dependencies: ["QtQuick 2.8"] @@ -24,14 +24,28 @@ Module { Component { name: "QQuickScreen" prototype: "QObject" - exports: ["QtQuick.Window/Screen 2.0"] + exports: ["QtQuick.Window/Screen 2.0", "QtQuick.Window/Screen 2.3"] isCreatable: false - exportMetaObjectRevisions: [0] + exportMetaObjectRevisions: [0, 1] attachedType: "QQuickScreenAttached" } Component { name: "QQuickScreenAttached" + prototype: "QQuickScreenInfo" + Property { name: "orientationUpdateMask"; type: "Qt::ScreenOrientations" } + Method { + name: "angleBetween" + type: "int" + Parameter { name: "a"; type: "int" } + Parameter { name: "b"; type: "int" } + } + } + Component { + name: "QQuickScreenInfo" prototype: "QObject" + exports: ["QtQuick.Window/ScreenInfo 2.3"] + isCreatable: false + exportMetaObjectRevisions: [2] Property { name: "name"; type: "string"; isReadonly: true } Property { name: "width"; type: "int"; isReadonly: true } Property { name: "height"; type: "int"; isReadonly: true } @@ -42,25 +56,18 @@ Module { Property { name: "devicePixelRatio"; type: "double"; isReadonly: true } Property { name: "primaryOrientation"; type: "Qt::ScreenOrientation"; isReadonly: true } Property { name: "orientation"; type: "Qt::ScreenOrientation"; isReadonly: true } - Property { name: "orientationUpdateMask"; type: "Qt::ScreenOrientations" } + Property { name: "virtualX"; revision: 1; type: "int"; isReadonly: true } + Property { name: "virtualY"; revision: 1; type: "int"; isReadonly: true } Signal { name: "desktopGeometryChanged" } - Method { - name: "angleBetween" - type: "int" - Parameter { name: "a"; type: "int" } - Parameter { name: "b"; type: "int" } - } + Signal { name: "virtualXChanged"; revision: 1 } + Signal { name: "virtualYChanged"; revision: 1 } } Component { name: "QQuickWindow" defaultProperty: "data" prototype: "QWindow" - exports: [ - "QtQuick.Window/Window 2.0", - "QtQuick.Window/Window 2.1", - "QtQuick.Window/Window 2.2" - ] - exportMetaObjectRevisions: [0, 1, 2] + exports: ["QtQuick.Window/Window 2.0"] + exportMetaObjectRevisions: [0] Enum { name: "SceneGraphError" values: { @@ -125,11 +132,16 @@ Module { name: "QQuickWindowQmlImpl" defaultProperty: "data" prototype: "QQuickWindow" - exports: ["QtQuick.Window/Window 2.1", "QtQuick.Window/Window 2.2"] - exportMetaObjectRevisions: [0, 1] + exports: [ + "QtQuick.Window/Window 2.1", + "QtQuick.Window/Window 2.2", + "QtQuick.Window/Window 2.3" + ] + exportMetaObjectRevisions: [0, 1, 2] attachedType: "QQuickWindowAttached" Property { name: "visible"; type: "bool" } Property { name: "visibility"; type: "Visibility" } + Property { name: "screen"; revision: 2; type: "QObject"; isPointer: true } Signal { name: "visibleChanged" Parameter { name: "arg"; type: "bool" } @@ -138,6 +150,7 @@ Module { name: "visibilityChanged" Parameter { name: "visibility"; type: "QWindow::Visibility" } } + Signal { name: "screenChanged"; revision: 2 } } Component { name: "QWindow" @@ -153,6 +166,13 @@ Module { "FullScreen": 5 } } + Enum { + name: "AncestorMode" + values: { + "ExcludeTransients": 0, + "IncludeTransients": 1 + } + } Property { name: "title"; type: "string" } Property { name: "modality"; type: "Qt::WindowModality" } Property { name: "flags"; type: "Qt::WindowFlags" } -- cgit v1.2.3 From 9180241819a9ea5e517977efc5bb031521a56cc6 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 9 Mar 2017 14:50:19 +0100 Subject: Add features.quick-particles Change-Id: I78b30d254ed64acadcb2acc278ad1dfde55216ac Reviewed-by: Lars Knoll --- src/imports/imports.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports') diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 0ba949f070..d16ac05669 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -20,7 +20,7 @@ qtHaveModule(quick) { sharedimage \ testlib - qtConfig(quick-shadereffect):qtConfig(quick-sprite):qtConfig(opengl(es1|es2)?): \ + qtConfig(quick-particles): \ SUBDIRS += particles } -- cgit v1.2.3 From 638e00e4379b9c5e0662ad1cb77ff3221429841b Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Tue, 4 Apr 2017 11:25:10 +0200 Subject: Fix warning for -no-feature-settings Change-Id: I286336660581ea616a7f5949fe74cfdc6aa7c792 Reviewed-by: Simon Hausmann --- src/imports/localstorage/plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/imports') diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index 8679750842..40682dd6a8 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -770,6 +770,8 @@ void QQuickLocalStorage::openDatabaseSync(QQmlV4Function *args) } args->setReturnValue(db.asReturnedValue()); +#else + Q_UNUSED(args) #endif // settings } -- cgit v1.2.3 From fdb822613989c5975ba282b775e6d194467bdef4 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 27 Jan 2017 17:13:34 +0100 Subject: TestCase: Use the new instanceof support for QML types to ensure we have an Item Using !item is not enough in a loosely-typed language like QML. Previously, passing numbers to these methods (for example) would have worked in misleading ways, or not at all. We allow Window here too as for the most part it is useful, and some tests actually use it. Change-Id: I99de081798d1c503d0b01dc99ca095654cf58aa4 Reported-by: Albert Astals Cid Reviewed-by: Simon Hausmann --- src/imports/testlib/TestCase.qml | 58 ++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 20 deletions(-) (limited to 'src/imports') diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 18c70e1169..3e6eb64311 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -38,6 +38,7 @@ ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Window 2.0 // used for qtest_verifyItem import QtTest 1.1 import "testlogger.js" as TestLogger import Qt.test.qtestroot 1.0 @@ -1085,8 +1086,8 @@ Item { function waitForRendering(item, timeout) { if (timeout === undefined) timeout = 5000 - if (!item) - qtest_fail("No item given to waitForRendering", 1) + if (!qtest_verifyItem(item, "waitForRendering")) + return return qtest_results.waitForRendering(item, timeout) } @@ -1198,8 +1199,8 @@ Item { \sa mouseRelease(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel() */ function mousePress(item, x, y, button, modifiers, delay) { - if (!item) - qtest_fail("No item given to mousePress", 1) + if (!qtest_verifyItem(item, "mousePress")) + return if (button === undefined) button = Qt.LeftButton @@ -1232,8 +1233,8 @@ Item { \sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel() */ function mouseRelease(item, x, y, button, modifiers, delay) { - if (!item) - qtest_fail("No item given to mouseRelease", 1) + if (!qtest_verifyItem(item, "mouseRelease")) + return if (button === undefined) button = Qt.LeftButton @@ -1268,8 +1269,8 @@ Item { \sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseRelease(), mouseWheel() */ function mouseDrag(item, x, y, dx, dy, button, modifiers, delay) { - if (!item) - qtest_fail("No item given to mouseDrag", 1) + if (!qtest_verifyItem(item, "mouseDrag")) + return if (item.x === undefined || item.y === undefined) return @@ -1319,8 +1320,8 @@ Item { \sa mousePress(), mouseRelease(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel() */ function mouseClick(item, x, y, button, modifiers, delay) { - if (!item) - qtest_fail("No item given to mouseClick", 1) + if (!qtest_verifyItem(item, "mouseClick")) + return if (button === undefined) button = Qt.LeftButton @@ -1353,8 +1354,8 @@ Item { \sa mouseDoubleClickSequence(), mousePress(), mouseRelease(), mouseClick(), mouseMove(), mouseDrag(), mouseWheel() */ function mouseDoubleClick(item, x, y, button, modifiers, delay) { - if (!item) - qtest_fail("No item given to mouseDoubleClick", 1) + if (!qtest_verifyItem(item, "mouseDoubleClick")) + return if (button === undefined) button = Qt.LeftButton @@ -1394,8 +1395,8 @@ Item { \sa mouseDoubleClick(), mousePress(), mouseRelease(), mouseClick(), mouseMove(), mouseDrag(), mouseWheel() */ function mouseDoubleClickSequence(item, x, y, button, modifiers, delay) { - if (!item) - qtest_fail("No item given to mouseDoubleClickSequence", 1) + if (!qtest_verifyItem(item, "mouseDoubleClickSequence")) + return if (button === undefined) button = Qt.LeftButton @@ -1426,8 +1427,8 @@ Item { \sa mousePress(), mouseRelease(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseDrag(), mouseWheel() */ function mouseMove(item, x, y, delay, buttons) { - if (!item) - qtest_fail("No item given to mouseMove", 1) + if (!qtest_verifyItem(item, "mouseMove")) + return if (delay == undefined) delay = -1 @@ -1454,8 +1455,8 @@ Item { \sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseRelease(), mouseDrag(), QWheelEvent::angleDelta() */ function mouseWheel(item, x, y, xDelta, yDelta, buttons, modifiers, delay) { - if (!item) - qtest_fail("No item given to mouseWheel", 1) + if (!qtest_verifyItem(item, "mouseWheel")) + return if (delay == undefined) delay = -1 @@ -1515,8 +1516,8 @@ Item { */ function touchEvent(item) { - if (!item) - qtest_fail("No item given to touchEvent", 1) + if (!qtest_verifyItem(item, "touchEvent")) + return return { _defaultItem: item, @@ -1624,6 +1625,23 @@ Item { */ function cleanup() {} + /*! \internal */ + function qtest_verifyItem(item, method) { + try { + if (!(item instanceof Item) && + !(item instanceof Window)) { + // it's a QObject, but not a type + qtest_fail("TypeError: %1 requires an Item or Window type".arg(method), 2); + return false; + } + } catch (e) { // it's not a QObject + qtest_fail("TypeError: %1 requires an Item or Window type".arg(method), 3); + return false; + } + + return true; + } + /*! \internal */ function qtest_runInternal(prop, arg) { try { -- cgit v1.2.3 From 492303fde683262ea94fad04751b303877e90924 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Wed, 5 Apr 2017 10:50:17 +0900 Subject: Fix build without features.systemsemaphore Change-Id: I3924c3193cc0c5b8def860879cd29f5dcb2c2314 Reviewed-by: Simon Hausmann --- src/imports/imports.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports') diff --git a/src/imports/imports.pro b/src/imports/imports.pro index d16ac05669..a32c35e771 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -17,9 +17,9 @@ qtHaveModule(quick) { layouts \ qtquick2 \ window \ - sharedimage \ testlib + qtConfig(systemsemaphore): SUBDIRS += sharedimage qtConfig(quick-particles): \ SUBDIRS += particles } -- cgit v1.2.3 From af72231fe4a91226d945db9a526fb755332548eb Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 4 Apr 2017 16:26:20 +0200 Subject: Error out if TestCase.verify receives more than 2 parameters Change-Id: I3299f602970067aaef290d4f1c7449d3ab03fb3c Reviewed-by: Simon Hausmann Reviewed-by: Mitch Curtis --- src/imports/testlib/TestCase.qml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/imports') diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 3e6eb64311..8c1744a2b2 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -444,6 +444,9 @@ Item { or \c{QVERIFY2(condition, message)} in C++. */ function verify(cond, msg) { + if (arguments.length > 2) + qtest_fail("More than two arguments given to verify(). Did you mean tryVerify() or tryCompare()?", 1) + if (msg === undefined) msg = ""; if (!qtest_results.verify(cond, msg, util.callerFile(), util.callerLine())) -- cgit v1.2.3 From f2281a5339a4ce744c1832f19d0ec5e364907e38 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 3 Apr 2017 16:36:23 +0900 Subject: Fix build without features.sql Change-Id: Ia2bf444da6056e3a87ebd5245aeb8c3f819251ce Reviewed-by: Simon Hausmann --- src/imports/imports.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports') diff --git a/src/imports/imports.pro b/src/imports/imports.pro index a32c35e771..c03224958c 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -6,9 +6,9 @@ SUBDIRS += \ builtins \ qtqml \ folderlistmodel \ - localstorage \ models +qtHaveModule(sql): SUBDIRS += localstorage qtConfig(settings): SUBDIRS += settings qtConfig(statemachine): SUBDIRS += statemachine -- cgit v1.2.3