diff options
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/builtins/builtins.qmltypes | 5 | ||||
-rw-r--r-- | src/imports/qtquick2/plugins.qmltypes | 13 | ||||
-rw-r--r-- | src/imports/shapes/plugin.cpp | 2 | ||||
-rw-r--r-- | src/imports/shapes/plugins.qmltypes | 24 | ||||
-rw-r--r-- | src/imports/shapes/qquickshape.cpp | 27 | ||||
-rw-r--r-- | src/imports/shapes/qquickshape_p_p.h | 7 | ||||
-rw-r--r-- | src/imports/shapes/qtquickshapesplugin.qrc (renamed from src/imports/shapes/shapes.qrc) | 0 | ||||
-rw-r--r-- | src/imports/shapes/shapes.pro | 2 | ||||
-rw-r--r-- | src/imports/testlib/TestCase.qml | 26 | ||||
-rw-r--r-- | src/imports/testlib/main.cpp | 1 | ||||
-rw-r--r-- | src/imports/testlib/plugins.qmltypes | 12 | ||||
-rw-r--r-- | src/imports/window/plugins.qmltypes | 33 |
12 files changed, 135 insertions, 17 deletions
diff --git a/src/imports/builtins/builtins.qmltypes b/src/imports/builtins/builtins.qmltypes index c2f8f5b521..5fb68d15d9 100644 --- a/src/imports/builtins/builtins.qmltypes +++ b/src/imports/builtins/builtins.qmltypes @@ -461,7 +461,10 @@ Module { "AA_CompressHighFrequencyEvents": 25, "AA_DontCheckOpenGLContextThreadAffinity": 26, "AA_DisableShaderDiskCache": 27, - "AA_AttributeCount": 28 + "AA_DontShowShortcutsInContextMenus": 28, + "AA_CompressTabletEvents": 29, + "AA_DisableWindowContextHelpButton": 30, + "AA_AttributeCount": 31 } } Enum { diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes index d23d6cc311..0fce98a212 100644 --- a/src/imports/qtquick2/plugins.qmltypes +++ b/src/imports/qtquick2/plugins.qmltypes @@ -1808,6 +1808,7 @@ Module { Property { name: "wordSpacing"; type: "double" } Property { name: "hintingPreference"; type: "HintingPreference" } Property { name: "kerning"; type: "bool" } + Property { name: "preferShaping"; type: "bool" } Method { name: "toString"; type: "string" } } Component { @@ -3994,12 +3995,13 @@ Module { prototype: "QQuickImplicitSizeItem" exports: [ "QtQuick/Text 2.0", + "QtQuick/Text 2.10", "QtQuick/Text 2.2", "QtQuick/Text 2.3", "QtQuick/Text 2.6", "QtQuick/Text 2.9" ] - exportMetaObjectRevisions: [0, 2, 3, 6, 9] + exportMetaObjectRevisions: [0, 10, 2, 3, 6, 9] Enum { name: "HAlignment" values: { @@ -4185,12 +4187,13 @@ Module { exports: [ "QtQuick/TextEdit 2.0", "QtQuick/TextEdit 2.1", + "QtQuick/TextEdit 2.10", "QtQuick/TextEdit 2.2", "QtQuick/TextEdit 2.3", "QtQuick/TextEdit 2.6", "QtQuick/TextEdit 2.7" ] - exportMetaObjectRevisions: [0, 1, 2, 3, 6, 7] + exportMetaObjectRevisions: [0, 1, 10, 2, 3, 6, 7] Enum { name: "HAlignment" values: { @@ -4292,6 +4295,7 @@ Module { Property { name: "rightPadding"; revision: 6; type: "double" } Property { name: "bottomPadding"; revision: 6; type: "double" } Property { name: "preeditText"; revision: 7; type: "string"; isReadonly: true } + Property { name: "tabStopDistance"; revision: 10; type: "double" } Signal { name: "preeditTextChanged"; revision: 7 } Signal { name: "contentSizeChanged" } Signal { @@ -4374,6 +4378,11 @@ Module { Signal { name: "leftPaddingChanged"; revision: 6 } Signal { name: "rightPaddingChanged"; revision: 6 } Signal { name: "bottomPaddingChanged"; revision: 6 } + Signal { + name: "tabStopDistanceChanged" + revision: 10 + Parameter { name: "distance"; type: "double" } + } Method { name: "selectAll" } Method { name: "selectWord" } Method { diff --git a/src/imports/shapes/plugin.cpp b/src/imports/shapes/plugin.cpp index c509d28e33..e24826ee55 100644 --- a/src/imports/shapes/plugin.cpp +++ b/src/imports/shapes/plugin.cpp @@ -47,7 +47,7 @@ static void initResources() #ifdef QT_STATIC Q_INIT_RESOURCE(qmake_QtQuick_Shapes); #endif - Q_INIT_RESOURCE(shapes); + Q_INIT_RESOURCE(qtquickshapesplugin); } QT_BEGIN_NAMESPACE diff --git a/src/imports/shapes/plugins.qmltypes b/src/imports/shapes/plugins.qmltypes index b8a7c532e0..39aab42401 100644 --- a/src/imports/shapes/plugins.qmltypes +++ b/src/imports/shapes/plugins.qmltypes @@ -36,6 +36,17 @@ Module { Property { name: "vendorExtensionsEnabled"; type: "bool" } Property { name: "status"; type: "Status"; isReadonly: true } Property { name: "data"; type: "QObject"; isList: true; isReadonly: true } + Signal { name: "rendererChanged" } + } + Component { + name: "QQuickShapeConicalGradient" + defaultProperty: "stops" + prototype: "QQuickShapeGradient" + exports: ["QtQuick.Shapes/ConicalGradient 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "centerX"; type: "double" } + Property { name: "centerY"; type: "double" } + Property { name: "angle"; type: "double" } } Component { name: "QQuickShapeGradient" @@ -114,4 +125,17 @@ Module { Property { name: "fillGradient"; type: "QQuickShapeGradient"; isPointer: true } Signal { name: "shapePathChanged" } } + Component { + name: "QQuickShapeRadialGradient" + defaultProperty: "stops" + prototype: "QQuickShapeGradient" + exports: ["QtQuick.Shapes/RadialGradient 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "centerX"; type: "double" } + Property { name: "centerY"; type: "double" } + Property { name: "centerRadius"; type: "double" } + Property { name: "focalX"; type: "double" } + Property { name: "focalY"; type: "double" } + Property { name: "focalRadius"; type: "double" } + } } diff --git a/src/imports/shapes/qquickshape.cpp b/src/imports/shapes/qquickshape.cpp index 6a76743242..c749357cc5 100644 --- a/src/imports/shapes/qquickshape.cpp +++ b/src/imports/shapes/qquickshape.cpp @@ -46,9 +46,12 @@ #include <private/qquicksvgparser_p.h> #include <QtGui/private/qdrawhelper_p.h> #include <QOpenGLFunctions> +#include <QLoggingCategory> QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(QQSHAPE_LOG_TIME_DIRTY_SYNC, "qt.shape.time.sync") + /*! \qmlmodule QtQuick.Shapes 1.0 \title Qt Quick Shapes QML Types @@ -968,18 +971,26 @@ QSGNode *QQuickShapePrivate::createNode() return node; } -static void q_asyncShapeReady(void *data) +void QQuickShapePrivate::asyncShapeReady(void *data) { QQuickShapePrivate *self = static_cast<QQuickShapePrivate *>(data); self->setStatus(QQuickShape::Ready); + if (self->syncTimingActive) + qDebug("[Shape %p] [%d] [dirty=0x%x] async update took %lld ms", + self->q_func(), self->syncTimeCounter, self->syncTimingTotalDirty, self->syncTimer.elapsed()); } void QQuickShapePrivate::sync() { + syncTimingTotalDirty = 0; + syncTimingActive = QQSHAPE_LOG_TIME_DIRTY_SYNC().isDebugEnabled(); + if (syncTimingActive) + syncTimer.start(); + const bool useAsync = async && renderer->flags().testFlag(QQuickAbstractPathRenderer::SupportsAsync); if (useAsync) { setStatus(QQuickShape::Processing); - renderer->setAsyncCallback(q_asyncShapeReady, this); + renderer->setAsyncCallback(asyncShapeReady, this); } const int count = sp.count(); @@ -988,6 +999,7 @@ void QQuickShapePrivate::sync() for (int i = 0; i < count; ++i) { QQuickShapePath *p = sp[i]; int &dirty(QQuickShapePathPrivate::get(p)->dirty); + syncTimingTotalDirty |= dirty; if (dirty & QQuickShapePathPrivate::DirtyPath) renderer->setPath(i, p); @@ -1011,10 +1023,19 @@ void QQuickShapePrivate::sync() dirty = 0; } + if (syncTimingTotalDirty) + ++syncTimeCounter; + else + syncTimingActive = false; + renderer->endSync(useAsync); - if (!useAsync) + if (!useAsync) { setStatus(QQuickShape::Ready); + if (syncTimingActive) + qDebug("[Shape %p] [%d] [dirty=0x%x] update took %lld ms", + q_func(), syncTimeCounter, syncTimingTotalDirty, syncTimer.elapsed()); + } } // ***** gradient support ***** diff --git a/src/imports/shapes/qquickshape_p_p.h b/src/imports/shapes/qquickshape_p_p.h index bbe9a81d4a..f43831516a 100644 --- a/src/imports/shapes/qquickshape_p_p.h +++ b/src/imports/shapes/qquickshape_p_p.h @@ -56,6 +56,7 @@ #include <QPainterPath> #include <QColor> #include <QBrush> +#include <QElapsedTimer> #include <private/qopenglcontext_p.h> QT_BEGIN_NAMESPACE @@ -167,6 +168,8 @@ public: static QQuickShapePrivate *get(QQuickShape *item) { return item->d_func(); } + static void asyncShapeReady(void *data); + bool spChanged; QQuickShape::RendererType rendererType; bool async; @@ -174,6 +177,10 @@ public: QQuickAbstractPathRenderer *renderer; QVector<QQuickShapePath *> sp; bool enableVendorExts; + bool syncTimingActive = false; + int syncTimingTotalDirty; + int syncTimeCounter = 0; + QElapsedTimer syncTimer; }; #if QT_CONFIG(opengl) diff --git a/src/imports/shapes/shapes.qrc b/src/imports/shapes/qtquickshapesplugin.qrc index f139861693..f139861693 100644 --- a/src/imports/shapes/shapes.qrc +++ b/src/imports/shapes/qtquickshapesplugin.qrc diff --git a/src/imports/shapes/shapes.pro b/src/imports/shapes/shapes.pro index 60cc61e974..fee950a529 100644 --- a/src/imports/shapes/shapes.pro +++ b/src/imports/shapes/shapes.pro @@ -28,6 +28,6 @@ qtConfig(opengl) { qquickshapenvprrenderer.cpp } -RESOURCES += shapes.qrc +RESOURCES += qtquickshapesplugin.qrc load(qml_plugin) diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 0e7e09c65c..4bcc95df89 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -39,7 +39,7 @@ import QtQuick 2.0 import QtQuick.Window 2.0 // used for qtest_verifyItem -import QtTest 1.1 +import QtTest 1.2 import "testlogger.js" as TestLogger import Qt.test.qtestroot 1.0 @@ -57,7 +57,7 @@ import Qt.test.qtestroot 1.0 \code import QtQuick 2.0 - import QtTest 1.0 + import QtTest 1.2 TestCase { name: "MathTests" @@ -108,7 +108,7 @@ import Qt.test.qtestroot 1.0 \code import QtQuick 2.0 - import QtTest 1.1 + import QtTest 1.2 TestCase { name: "DataTests" @@ -1212,6 +1212,26 @@ Item { } /*! + \since 5.10 + \qmlmethod TestCase::keySequence(keySequence) + + Simulates typing of \a keySequence. The key sequence can be set + to one of the \l{QKeySequence::StandardKey}{standard keyboard shortcuts}, or + it can be described with a string containing a sequence of up to four key + presses. + + Each event shall be sent to the TestCase window or, in case of multiple windows, + to the current active window. See \l QGuiApplication::focusWindow() for more details. + + \sa keyPress(), keyRelease(), {GNU Emacs Style Key Sequences}, + {QtQuick::Shortcut::sequence}{Shortcut.sequence} + */ + function keySequence(keySequence) { + if (!qtest_events.keySequence(keySequence)) + qtest_fail("window not shown", 2) + } + + /*! \qmlmethod TestCase::mousePress(item, x = item.width / 2, y = item.height / 2, button = Qt.LeftButton, modifiers = Qt.NoModifier, delay = -1) Simulates pressing a mouse \a button with an optional \a modifier diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp index 2dbe8e08dc..00e9592557 100644 --- a/src/imports/testlib/main.cpp +++ b/src/imports/testlib/main.cpp @@ -157,6 +157,7 @@ public: qmlRegisterType<QuickTestResult, 0>(uri,1,0,"TestResult"); qmlRegisterType<QuickTestResult, 1>(uri,1,1,"TestResult"); qmlRegisterType<QuickTestEvent>(uri,1,0,"TestEvent"); + qmlRegisterType<QuickTestEvent>(uri,1,2,"TestEvent"); qmlRegisterType<QuickTestUtil>(uri,1,0,"TestUtil"); qmlRegisterType<QQuickTouchEventSequence>(); } diff --git a/src/imports/testlib/plugins.qmltypes b/src/imports/testlib/plugins.qmltypes index 5d7ca51adc..7f3140d86b 100644 --- a/src/imports/testlib/plugins.qmltypes +++ b/src/imports/testlib/plugins.qmltypes @@ -7,7 +7,7 @@ import QtQuick.tooling 1.2 // 'qmlplugindump -nonrelocatable -noforceqtquick QtTest 1.2' Module { - dependencies: ["QtQuick 2.0"] + dependencies: ["QtQuick 2.0", "QtQuick.Window 2.0"] Component { name: "QQuickTouchEventSequence" prototype: "QObject" @@ -45,8 +45,8 @@ Module { Component { name: "QuickTestEvent" prototype: "QObject" - exports: ["QtTest/TestEvent 1.0"] - exportMetaObjectRevisions: [0] + exports: ["QtTest/TestEvent 1.0", "QtTest/TestEvent 1.2"] + exportMetaObjectRevisions: [0, 0] Property { name: "defaultMouseDelay"; type: "int"; isReadonly: true } Method { name: "keyPress" @@ -91,6 +91,12 @@ Module { Parameter { name: "delay"; type: "int" } } Method { + name: "keySequence" + revision: 2 + type: "bool" + Parameter { name: "keySequence"; type: "QVariant" } + } + Method { name: "mousePress" type: "bool" Parameter { name: "item"; type: "QObject"; isPointer: true } diff --git a/src/imports/window/plugins.qmltypes b/src/imports/window/plugins.qmltypes index cea2a910a7..4ae23a093e 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.3' +// 'qmlplugindump -nonrelocatable QtQuick.Window 2.10' Module { dependencies: ["QtQuick 2.8"] @@ -43,10 +43,16 @@ Module { Component { name: "QQuickScreenInfo" prototype: "QObject" - exports: ["QtQuick.Window/ScreenInfo 2.3"] + exports: [ + "QtQuick.Window/ScreenInfo 2.10", + "QtQuick.Window/ScreenInfo 2.3" + ] isCreatable: false - exportMetaObjectRevisions: [2] + exportMetaObjectRevisions: [10, 2] Property { name: "name"; type: "string"; isReadonly: true } + Property { name: "manufacturer"; revision: 10; type: "string"; isReadonly: true } + Property { name: "model"; revision: 10; type: "string"; isReadonly: true } + Property { name: "serialNumber"; revision: 10; type: "string"; isReadonly: true } Property { name: "width"; type: "int"; isReadonly: true } Property { name: "height"; type: "int"; isReadonly: true } Property { name: "desktopAvailableWidth"; type: "int"; isReadonly: true } @@ -58,6 +64,9 @@ Module { Property { name: "orientation"; type: "Qt::ScreenOrientation"; isReadonly: true } Property { name: "virtualX"; revision: 1; type: "int"; isReadonly: true } Property { name: "virtualY"; revision: 1; type: "int"; isReadonly: true } + Signal { name: "manufacturerChanged"; revision: 10 } + Signal { name: "modelChanged"; revision: 10 } + Signal { name: "serialNumberChanged"; revision: 10 } Signal { name: "desktopGeometryChanged" } Signal { name: "virtualXChanged"; revision: 1 } Signal { name: "virtualYChanged"; revision: 1 } @@ -74,6 +83,13 @@ Module { "ContextNotAvailable": 1 } } + Enum { + name: "TextRenderType" + values: { + "QtTextRendering": 0, + "NativeTextRendering": 1 + } + } Property { name: "data"; type: "QObject"; isList: true; isReadonly: true } Property { name: "color"; type: "QColor" } Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } @@ -296,6 +312,17 @@ Module { Parameter { name: "arg"; type: "int" } } Method { + name: "setGeometry" + Parameter { name: "posx"; type: "int" } + Parameter { name: "posy"; type: "int" } + Parameter { name: "w"; type: "int" } + Parameter { name: "h"; type: "int" } + } + Method { + name: "setGeometry" + Parameter { name: "rect"; type: "QRect" } + } + Method { name: "setMinimumWidth" Parameter { name: "w"; type: "int" } } |