diff options
Diffstat (limited to 'src/imports/testlib')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 16 | ||||
-rw-r--r-- | src/imports/testlib/plugins.qmltypes | 21 |
2 files changed, 32 insertions, 5 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 039ee63f07..8bedad40e9 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -613,12 +613,19 @@ Item { \li blue(x, y) Returns the blue channel value of the pixel at \a x, \a y position \li alpha(x, y) Returns the alpha channel value of the pixel at \a x, \a y position \li pixel(x, y) Returns the color value of the pixel at \a x, \a y position + \li equals(image) Returns \c true if this image is identical to \a image - + see \l QImage::operator== (since 5.6) + For example: \code var image = grabImage(rect); compare(image.red(10, 10), 255); compare(image.pixel(20, 20), Qt.rgba(255, 0, 0, 255)); + + rect.width += 10; + var newImage = grabImage(rect); + verify(!newImage.equals(image)); \endcode \endlist @@ -869,6 +876,9 @@ Item { focused item. If \a delay is larger than 0, the test will wait for \a delay milliseconds. + The event will be sent to the TestCase window or, in case of multiple windows, + to the current active window. See \l QGuiApplication::focusWindow() for more details. + \b{Note:} At some point you should release the key using keyRelease(). \sa keyRelease(), keyClick() @@ -894,6 +904,9 @@ Item { focused item. If \a delay is larger than 0, the test will wait for \a delay milliseconds. + The event will 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(), keyClick() */ function keyRelease(key, modifiers, delay) { @@ -917,6 +930,9 @@ Item { focused item. If \a delay is larger than 0, the test will wait for \a delay milliseconds. + The event will 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() */ function keyClick(key, modifiers, delay) { 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 } |