summaryrefslogtreecommitdiffstats
path: root/Include/marshal.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/marshal.h')
0 files changed, 0 insertions, 0 deletions
28fb51c92d30c684eb1cea01145'>tests/arthur/common/paintcommands.cpp20
-rw-r--r--tests/arthur/common/paintcommands.h1
-rw-r--r--tests/auto/declarative/declarative.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativedebugjs/app/app.pro12
-rw-r--r--tests/auto/declarative/qdeclarativedebugjs/app/main.cpp72
-rw-r--r--tests/auto/declarative/qdeclarativedebugjs/data/backtrace1.js28
-rw-r--r--tests/auto/declarative/qdeclarativedebugjs/data/backtrace1.qml41
-rw-r--r--tests/auto/declarative/qdeclarativedebugjs/qdeclarativedebugjs.pro4
-rw-r--r--tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp1341
-rw-r--r--tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.pro (renamed from tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro)10
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/NestedComponentRoot.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nestedComponentRoots.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp7
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.js11
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml27
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/tst_qdeclarativescriptdebugging.cpp154
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp10
-rw-r--r--tests/auto/declarative/qmlshadersplugin/main.qml80
-rw-r--r--tests/auto/declarative/qmlshadersplugin/qmlshadersplugin.pro18
-rw-r--r--tests/auto/declarative/qmlshadersplugin/tst_qmlshadersplugin.cpp205
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.pngbin1450 -> 1454 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.pngbin1188 -> 1189 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.0.pngbin1747 -> 1199 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.0.pngbin950 -> 941 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.1.pngbin983 -> 975 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.2.pngbin1243 -> 1235 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.3.pngbin1235 -> 1225 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.4.pngbin1253 -> 1247 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.5.pngbin1249 -> 1243 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.6.pngbin1241 -> 1234 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.7.pngbin1251 -> 1242 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.0.pngbin801 -> 2388 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.0.pngbin791 -> 762 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.0.pngbin1313 -> 1313 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.pngbin322 -> 1640 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.pngbin322 -> 625 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.0.pngbin465 -> 303 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.1.pngbin465 -> 303 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.1.pngbin581 -> 483 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.0.pngbin1187 -> 1189 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.1.pngbin1066 -> 1068 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.1.pngbin967 -> 814 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.2.pngbin962 -> 809 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.3.pngbin678 -> 527 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.4.pngbin676 -> 526 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.5.pngbin542 -> 399 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.0.pngbin1563 -> 3481 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.0.pngbin6348 -> 53503 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.pngbin13194 -> 13140 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.pngbin1510 -> 1503 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.pngbin9415 -> 9297 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.pngbin10671 -> 10626 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.0.pngbin1362 -> 5123 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.1.pngbin1377 -> 5500 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.10.pngbin2037 -> 8641 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.11.pngbin2037 -> 8641 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.2.pngbin1461 -> 6163 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.3.pngbin1577 -> 6785 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.4.pngbin1704 -> 6943 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.5.pngbin1778 -> 7043 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.6.pngbin1797 -> 7428 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.7.pngbin1859 -> 6860 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.8.pngbin1835 -> 8659 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.9.pngbin2028 -> 8641 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.0.pngbin3756 -> 11626 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.1.pngbin3891 -> 11869 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.2.pngbin3964 -> 12264 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.3.pngbin4054 -> 12607 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.4.pngbin4132 -> 13243 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.5.pngbin4234 -> 13260 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.6.pngbin4238 -> 13260 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.0.pngbin855 -> 688 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.1.pngbin863 -> 693 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.2.pngbin865 -> 695 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.3.pngbin862 -> 694 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.4.pngbin855 -> 688 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.10.pngbin2032 -> 2020 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.11.pngbin2032 -> 2020 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.12.pngbin2032 -> 2020 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.7.pngbin1843 -> 1836 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.9.pngbin2024 -> 2008 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.7.pngbin3930 -> 3943 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.0.pngbin256 -> 703 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.1.pngbin343 -> 1360 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.2.pngbin461 -> 2031 bytes-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.11.pngbin1468 -> 1455 bytes-rw-r--r--tests/auto/lancelot/scripts/statictext.qps122
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp63
-rw-r--r--tests/auto/qcomplextext/bidireorderstring.h1
-rw-r--r--tests/auto/qcssparser/qcssparser.pro2
-rw-r--r--tests/auto/qdatetime/qdatetime.pro1
-rw-r--r--tests/auto/qfont/tst_qfont.cpp13
-rw-r--r--tests/auto/qglyphrun/tst_qglyphrun.cpp79
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp11
-rw-r--r--tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp265
-rw-r--r--tests/auto/qheaderview/tst_qheaderview.cpp12
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp4
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp10
-rw-r--r--tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp44
-rw-r--r--tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp41
-rw-r--r--tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp29
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp6
-rw-r--r--tests/auto/qpluginloader/tst_qpluginloader.cpp2
-rw-r--r--tests/auto/qstatictext/tst_qstatictext.cpp4
-rw-r--r--tests/auto/qstring/tst_qstring.cpp4
-rw-r--r--tests/auto/qtextdocument/tst_qtextdocument.cpp26
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp42
-rw-r--r--tests/auto/qtoolbutton/tst_qtoolbutton.cpp2
-rw-r--r--tests/auto/qtreewidget/tst_qtreewidget.cpp20
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp14
-rw-r--r--tests/benchmarks/declarative/declarative.pro2
-rw-r--r--tests/benchmarks/declarative/qmlshadersplugin/GaussianBlur.qml84
-rw-r--r--tests/benchmarks/declarative/qmlshadersplugin/GaussianDirectionalBlur.qml209
-rw-r--r--tests/benchmarks/declarative/qmlshadersplugin/GaussianDropShadow.qml82
-rwxr-xr-xtests/benchmarks/declarative/qmlshadersplugin/TestGaussianDropShadow.qml107
-rwxr-xr-xtests/benchmarks/declarative/qmlshadersplugin/TestWater.qml60
-rw-r--r--tests/benchmarks/declarative/qmlshadersplugin/Water.qml126
-rw-r--r--tests/benchmarks/declarative/qmlshadersplugin/bg.jpgbin0 -> 10189 bytes-rwxr-xr-xtests/benchmarks/declarative/qmlshadersplugin/drop_shadow_small.pngbin0 -> 46081 bytes-rw-r--r--tests/benchmarks/declarative/qmlshadersplugin/qmlshadersplugin.pro23
-rw-r--r--tests/benchmarks/declarative/qmlshadersplugin/sky.jpgbin0 -> 36734 bytes-rw-r--r--tests/benchmarks/declarative/qmlshadersplugin/tst_performance.cpp110
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro2
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp41
-rw-r--r--tests/manual/declarative/declarative.pro3
-rw-r--r--tests/manual/declarative/qmlshadersplugin/main.cpp67
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestActive.qml83
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestBasic.qml57
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestBlending.qml82
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestBlendingModes.qml267
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestEffectHierarchy.qml133
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestEffectInsideAnotherEffect.qml119
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestFormat.qml89
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestFragmentShader.qml91
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestGrab.qml89
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestHideOriginal.qml97
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestHorizontalWrap.qml93
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageFiltering.qml84
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMargins.qml98
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMarginsWithTextureSize.qml96
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMipmap.qml95
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestItemMargins.qml102
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestItemMarginsWithTextureSize.qml101
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestLive.qml104
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestMeshResolution.qml108
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestOneSource.qml74
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestOpacity.qml98
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestRotation.qml95
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestScale.qml95
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestTextureSize.qml85
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestTwiceOnSameSource.qml92
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestTwoSources.qml95
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestVertexShader.qml109
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestVerticalWrap.qml92
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestWrapRepeat.qml92
-rwxr-xr-xtests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/back.svg11
-rwxr-xr-xtests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/green_image_transparent.pngbin0 -> 1153 bytes-rwxr-xr-xtests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/image.pngbin0 -> 219220 bytes-rwxr-xr-xtests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/image_opaque.pngbin0 -> 293803 bytes-rwxr-xr-xtests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/image_small.pngbin0 -> 40220 bytes-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/main.qml236
-rwxr-xr-xtests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/wallpaper.jpgbin0 -> 337569 bytes-rw-r--r--tests/manual/declarative/qmlshadersplugin/qmlapplicationviewer/qmlapplicationviewer.cpp168
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qmlapplicationviewer/qmlapplicationviewer.h69
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qmlapplicationviewer/qmlapplicationviewer.pri152
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qmlshadersplugin.pro29
168 files changed, 7064 insertions, 309 deletions
diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp
index 184fbb9..298c699 100644
--- a/tests/arthur/common/paintcommands.cpp
+++ b/tests/arthur/common/paintcommands.cpp
@@ -48,6 +48,7 @@
#include <qtextstream.h>
#include <qtextlayout.h>
#include <qdebug.h>
+#include <QStaticText>
#ifdef QT3_SUPPORT
#include <q3painter.h>
@@ -464,6 +465,10 @@ void PaintCommands::staticInit()
"^drawText\\s+(-?\\w*)\\s+(-?\\w*)\\s+\"(.*)\"$",
"drawText <x> <y> <text>",
"drawText 10 10 \"my text\"");
+ DECL_PAINTCOMMAND("drawStaticText", command_drawStaticText,
+ "^drawStaticText\\s+(-?\\w*)\\s+(-?\\w*)\\s+\"(.*)\"$",
+ "drawStaticText <x> <y> <text>",
+ "drawStaticText 10 10 \"my text\"");
DECL_PAINTCOMMAND("drawTiledPixmap", command_drawTiledPixmap,
"^drawTiledPixmap\\s+([\\w.:\\/]*)"
"\\s+(-?\\w*)\\s+(-?\\w*)\\s*(-?\\w*)\\s*(-?\\w*)"
@@ -1404,6 +1409,21 @@ void PaintCommands::command_drawText(QRegExp re)
m_painter->drawText(x, y, txt);
}
+void PaintCommands::command_drawStaticText(QRegExp re)
+{
+ if (!m_shouldDrawText)
+ return;
+ QStringList caps = re.capturedTexts();
+ int x = convertToInt(caps.at(1));
+ int y = convertToInt(caps.at(2));
+ QString txt = caps.at(3);
+
+ if (m_verboseMode)
+ printf(" -(lance) drawStaticText(%d, %d, %s)\n", x, y, qPrintable(txt));
+
+ m_painter->drawStaticText(x, y, QStaticText(txt));
+}
+
/***************************************************************************************************/
void PaintCommands::command_noop(QRegExp)
{
diff --git a/tests/arthur/common/paintcommands.h b/tests/arthur/common/paintcommands.h
index 6cc0889..04492ea 100644
--- a/tests/arthur/common/paintcommands.h
+++ b/tests/arthur/common/paintcommands.h
@@ -209,6 +209,7 @@ private:
void command_drawRoundedRect(QRegExp re);
void command_drawRoundRect(QRegExp re);
void command_drawText(QRegExp re);
+ void command_drawStaticText(QRegExp re);
void command_drawTiledPixmap(QRegExp re);
void command_path_addEllipse(QRegExp re);
void command_path_addPolygon(QRegExp re);
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 98e15e8..72c32cb 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -78,5 +78,7 @@ contains(QT_CONFIG, private_tests) {
qpacketprotocol
}
+contains(QT_CONFIG, opengl): SUBDIRS += qmlshadersplugin
+
# Tests which should run in Pulse
PULSE_TESTS = $$SUBDIRS
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
index 3a626bf..541d9a1 100644
--- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -58,7 +58,6 @@
Q_DECLARE_METATYPE(QDeclarativeAnchors::Anchor)
Q_DECLARE_METATYPE(QDeclarativeAnchorLine::AnchorLine)
-
class tst_qdeclarativeanchors : public QObject
{
Q_OBJECT
@@ -291,7 +290,7 @@ void tst_qdeclarativeanchors::basicAnchorsRTL()
QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(view->rootObject());
foreach(QObject *child, rootItem->children()) {
- bool mirrored = QDeclarativeItemPrivate::get(qobject_cast<QDeclarativeItem*>(child))->anchors()->property("mirrored").toBool();
+ bool mirrored = QDeclarativeItemPrivate::get(qobject_cast<QDeclarativeItem*>(child))->anchors()->mirrored();
QCOMPARE(mirrored, false);
}
@@ -299,7 +298,7 @@ void tst_qdeclarativeanchors::basicAnchorsRTL()
mirrorAnchors(qobject_cast<QDeclarativeItem*>(child));
foreach(QObject *child, rootItem->children()) {
- bool mirrored = QDeclarativeItemPrivate::get(qobject_cast<QDeclarativeItem*>(child))->anchors()->property("mirrored").toBool();
+ bool mirrored = QDeclarativeItemPrivate::get(qobject_cast<QDeclarativeItem*>(child))->anchors()->mirrored();
QCOMPARE(mirrored, true);
}
diff --git a/tests/auto/declarative/qdeclarativedebugjs/app/app.pro b/tests/auto/declarative/qdeclarativedebugjs/app/app.pro
new file mode 100644
index 0000000..800c033
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugjs/app/app.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+
+QT += declarative
+
+CONFIG += console
+CONFIG -= app_bundle
+
+DESTDIR = ./
+
+INSTALLS =
+
+SOURCES += main.cpp
diff --git a/tests/auto/declarative/qdeclarativedebugjs/app/main.cpp b/tests/auto/declarative/qdeclarativedebugjs/app/main.cpp
new file mode 100644
index 0000000..f5b830e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugjs/app/main.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QDebug>
+#include <QDeclarativeComponent>
+#include <QDeclarativeEngine>
+#include <QStringList>
+#include <QtDeclarative/private/qdeclarativedebughelper_p.h>
+#include <QtDeclarative/private/qdeclarativedebugservice_p.h>
+
+int main(int argc, char *argv[])
+{
+ QDeclarativeDebugHelper::enableDebugging();
+
+ QApplication app(argc, argv);
+
+ const QUrl path = QUrl::fromLocalFile(app.arguments().last());
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, path);
+
+ if (!component.isReady()) {
+ qWarning() << component.errorString();
+ return -1;
+ }
+
+ QObject *obj = component.create();
+
+// printf("%u\n", QDeclarativeDebugService::idForObject(obj));
+// fflush(stdout);
+
+ return app.exec();
+}
diff --git a/tests/auto/declarative/qdeclarativedebugjs/data/backtrace1.js b/tests/auto/declarative/qdeclarativedebugjs/data/backtrace1.js
new file mode 100644
index 0000000..f96f8e9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugjs/data/backtrace1.js
@@ -0,0 +1,28 @@
+function function2InScript(a)
+{
+ logger("return function2InScript");
+ root.result = a;
+}
+
+function functionInScript(a, b)
+{
+ logger("enter functionInScript");
+ var names = ["Clark Kent", "Peter Parker", "Bruce Wayne"];
+ var aliases = ["Superman", "Spiderman", "Batman"];
+ var details = {
+ category: "Superheroes",
+ names: names,
+ aliases: aliases
+ };
+ function2InScript(a + b);
+ logger("return functionInScript");
+ return details;
+}
+
+function logger(msg)
+{
+ //console.log(msg);
+ return true;
+}
+
+//DO NOT CHANGE CODE ABOVE THIS LINE
diff --git a/tests/auto/declarative/qdeclarativedebugjs/data/backtrace1.qml b/tests/auto/declarative/qdeclarativedebugjs/data/backtrace1.qml
new file mode 100644
index 0000000..f062bb9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugjs/data/backtrace1.qml
@@ -0,0 +1,41 @@
+import QtQuick 1.0
+import "backtrace1.js" as Script
+
+Item {
+ id: root
+
+ property int result:0
+
+ Component.onCompleted:
+ {
+ root.result = 10;
+ Script.functionInScript(4,5);
+ root.name = "nemo";
+ Script.logger(root.simpleBinding);
+ }
+
+ //DO NOT CHANGE CODE ABOVE
+ //ADD CODE FROM HERE
+
+ property string name
+ property int simpleBinding: result
+
+ VisualItemModel {
+ id: itemModel
+ Rectangle { height: 30; width: 80; color: "red" }
+ Rectangle { height: 30; width: 80; color: "green" }
+ Rectangle { height: 30; width: 80; color: "blue" }
+ }
+
+ ListView {
+ anchors.fill: parent
+ model: itemModel
+
+ Component.onCompleted:
+ {
+ Script.logger("List Loaded");
+ }
+ }
+
+}
+
diff --git a/tests/auto/declarative/qdeclarativedebugjs/qdeclarativedebugjs.pro b/tests/auto/declarative/qdeclarativedebugjs/qdeclarativedebugjs.pro
new file mode 100644
index 0000000..720de19
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugjs/qdeclarativedebugjs.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+
+SUBDIRS = tst_qdeclarativedebugjs.pro \
+ app
diff --git a/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp b/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp
new file mode 100644
index 0000000..a40bcc0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp
@@ -0,0 +1,1341 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QtDeclarative/QDeclarativeEngine>
+#include <QtDeclarative/private/qdeclarativedebugclient_p.h>
+#include <QtDeclarative/private/qdeclarativedebugservice_p.h>
+#include <QtDeclarative/private/qdeclarativedebug_p.h>
+#include <QtDeclarative/private/qjsdebuggeragent_p.h>
+#include <QtCore/QFileInfo>
+#include <QtCore/QDir>
+#include <QtCore/QProcess>
+#include "../../../shared/util.h"
+#include "../shared/debugutil_p.h"
+
+class QJSDebugClient : public QDeclarativeDebugClient
+{
+ Q_OBJECT
+public:
+ QJSDebugClient(QDeclarativeDebugConnection *connection) : QDeclarativeDebugClient(QLatin1String("JSDebugger"), connection) {}
+
+ void ping();
+ void exec(const QByteArray &debuggerId, const QString &expr);
+ void setBreakpoints(const QSet<JSAgentBreakpointData> &breakpoints);
+ void setWatchExpressions(const QStringList &watchExpressions);
+ void stepOver();
+ void stepInto();
+ void interrupt();
+ void stepOut();
+ void continueExecution();
+ void expandObjectById(const QByteArray& objectName, quint64 objectId);
+ void setProperty(const QByteArray& id, qint64 objectId, const QString &property, const QString &value);
+ void activateFrame(int frameId);
+
+ // info from last exec
+ JSAgentWatchData exec_data;
+ QByteArray exec_iname;
+
+ QByteArray object_name;
+ QList<JSAgentWatchData> object_children;
+
+ int frame_id;
+
+ // info from last stop
+ QList<JSAgentStackData> break_stackFrames;
+ QList<JSAgentWatchData> break_watches;
+ QList<JSAgentWatchData> break_locals;
+ bool break_becauseOfException;
+ QString break_error;
+
+signals:
+ void statusHasChanged();
+
+ void pong();
+ void result();
+ void stopped();
+ void expanded();
+ void watchTriggered();
+
+protected:
+ virtual void statusChanged(Status status);
+ virtual void messageReceived(const QByteArray &data);
+
+private:
+ int m_ping;
+};
+
+class QJSDebugProcess : public QObject
+{
+ Q_OBJECT
+public:
+ QJSDebugProcess();
+ ~QJSDebugProcess();
+
+ void start(const QStringList &arguments);
+ bool waitForStarted();
+
+private slots:
+ void processAppOutput();
+
+private:
+ QProcess m_process;
+ QTimer m_timer;
+ QEventLoop m_eventLoop;
+ bool m_started;
+};
+
+class tst_QDeclarativeDebugJS : public QObject
+{
+ Q_OBJECT
+private:
+ QDeclarativeDebugConnection *m_conn;
+ QDeclarativeEngine *m_engine;
+ QJSDebugClient *m_client;
+
+private slots:
+ void pingPong();
+ void exec();
+ void setBreakpoint();
+ void stepOver();
+ void stepInto();
+ void interrupt();
+ void stepOut();
+ void continueExecution();
+ void expandObject();
+ void setProperty();
+ void setProperty2();
+ void watchExpression();
+ void activateFrame();
+ void setBreakpoint2();
+ void stepOver2();
+ void stepInto2();
+ void interrupt2();
+ void stepOut2();
+ void continueExecution2();
+ void expandObject2();
+ void setProperty3();
+ void setProperty4();
+ void activateFrame2();
+ void verifyQMLOptimizerDisabled();
+};
+
+
+void QJSDebugClient::ping()
+{
+ m_ping++;
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "PING";
+ rs << cmd;
+ rs << m_ping;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::exec(const QByteArray &debuggerId, const QString &expr)
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "EXEC";
+ rs << cmd;
+ rs << debuggerId;
+ rs << expr;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::setBreakpoints(const QSet<JSAgentBreakpointData> &breakpoints)
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "BREAKPOINTS";
+ rs << cmd
+ << breakpoints;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::setWatchExpressions(const QStringList &watchExpressions)
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "WATCH_EXPRESSIONS";
+ rs << cmd
+ << watchExpressions;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::stepOver()
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "STEPOVER";
+ rs << cmd;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::stepInto()
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "STEPINTO";
+ rs << cmd;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::interrupt()
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "INTERRUPT";
+ rs << cmd;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::stepOut()
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "STEPOUT";
+ rs << cmd;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::continueExecution()
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "CONTINUE";
+ rs << cmd;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::expandObjectById(const QByteArray& objectName, quint64 objectId)
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "EXPAND";
+ rs << cmd
+ << objectName
+ << objectId;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::setProperty(const QByteArray& id, qint64 objectId, const QString &property, const QString &value)
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "SET_PROPERTY";
+ rs << cmd
+ << id
+ << objectId
+ << property
+ << value;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::activateFrame(int frameId)
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ QByteArray cmd = "ACTIVATE_FRAME";
+ rs << cmd
+ << frameId;
+ sendMessage(reply);
+}
+
+void QJSDebugClient::statusChanged(Status /*status*/)
+{
+ emit statusHasChanged();
+}
+
+void QJSDebugClient::messageReceived(const QByteArray &data)
+{
+ QByteArray rwData = data;
+ QDataStream stream(&rwData, QIODevice::ReadOnly);
+
+ QByteArray command;
+ stream >> command;
+
+ if (command == "STOPPED") {
+ stream >> break_stackFrames >> break_watches >> break_locals >> break_becauseOfException >> break_error;
+ if (!break_becauseOfException) {
+ break_error.clear();
+ }
+ emit stopped();
+ } else if (command == "RESULT") {
+ stream >> exec_iname;
+ stream >> exec_data;
+ emit result();
+ } else if (command == "EXPANDED") {
+ stream >> object_name >> object_children;
+ emit expanded();
+ } else if (command == "LOCALS") {
+ stream >> frame_id >> break_locals;
+ if (!stream.atEnd()) { // compatibility with jsdebuggeragent from 2.1, 2.2
+ stream >> break_watches;
+ }
+ emit watchTriggered();
+ } else if (command == "PONG") {
+ int ping;
+ stream >> ping;
+ QCOMPARE(ping, m_ping);
+ emit pong();
+ } else {
+ QFAIL("Unknown message :" + command);
+ }
+ QVERIFY(stream.atEnd());
+}
+
+QJSDebugProcess::QJSDebugProcess()
+ : m_started(false)
+{
+ m_process.setProcessChannelMode(QProcess::MergedChannels);
+ connect(&m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(processAppOutput()));
+ connect(&m_timer, SIGNAL(timeout()), &m_eventLoop, SLOT(quit()));
+ m_timer.setSingleShot(true);
+ m_timer.setInterval(5000);
+ QStringList environment = QProcess::systemEnvironment();
+ environment.append("QML_DISABLE_OPTIMIZER=1");
+ m_process.setEnvironment(environment);
+}
+
+QJSDebugProcess::~QJSDebugProcess()
+{
+ if (m_process.state() != QProcess::NotRunning) {
+ m_process.kill();
+ m_process.waitForFinished(5000);
+ }
+}
+
+void QJSDebugProcess::start(const QStringList &arguments)
+{
+ QString currentDir = QFileInfo(__FILE__).absoluteDir().absolutePath();
+ m_process.start(currentDir + "/app/app", arguments);
+ m_timer.start();
+}
+
+bool QJSDebugProcess::waitForStarted()
+{
+ m_eventLoop.exec(QEventLoop::ExcludeUserInputEvents);
+
+ return m_started;
+}
+
+void QJSDebugProcess::processAppOutput()
+{
+ const QString appOutput = m_process.readAll();
+ static QRegExp newline("[\n\r]{1,2}");
+ QStringList lines = appOutput.split(newline);
+ foreach (const QString &line, lines) {
+ if (line.isEmpty())
+ continue;
+ if (line.startsWith("Qml debugging is enabled")) // ignore
+ continue;
+ if (line.startsWith("QDeclarativeDebugServer:")) {
+ if (line.contains("Waiting for connection ")) {
+ m_started = true;
+ m_eventLoop.quit();
+ continue;
+ }
+ if (line.contains("Connection established")) {
+ continue;
+ }
+ }
+ qDebug() << line;
+ }
+}
+
+inline QString TEST_FILE(const QString &filename)
+{
+ QFileInfo fileInfo(__FILE__);
+ return fileInfo.absoluteDir().filePath("data/" + filename);
+}
+
+void tst_QDeclarativeDebugJS::pingPong()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QJSDebugClient client(&connection);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ client.ping();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(pong())));
+}
+
+void tst_QDeclarativeDebugJS::exec()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QJSDebugClient client(&connection);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ // Evaluate script without context
+ client.exec("queryid", "1+1");
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(result())));
+ QCOMPARE(client.exec_iname, QByteArray("queryid"));
+ QCOMPARE(client.exec_data.exp, QByteArray("1+1"));
+ QCOMPARE(client.exec_data.name, QByteArray("1+1"));
+ QCOMPARE(client.exec_data.hasChildren, false);
+ QCOMPARE(client.exec_data.type, QByteArray("Number"));
+ QCOMPARE(client.exec_data.value, QByteArray("2"));
+
+ // TODO: Test access to context after breakpoint is hit
+}
+
+
+void tst_QDeclarativeDebugJS::setBreakpoint()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 11;
+
+ //TEST LINE
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.fileUrl, bp1.fileUrl);
+ QCOMPARE(data.lineNumber, bp1.lineNumber);
+
+}
+
+void tst_QDeclarativeDebugJS::stepOver()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 11;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.stepOver();
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.fileUrl, bp1.fileUrl);
+ QCOMPARE(data.lineNumber, bp1.lineNumber +1);
+}
+
+void tst_QDeclarativeDebugJS::stepInto()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 12;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.stepInto();
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ QByteArray functionName("functionInScript");
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.functionName, functionName);
+ QCOMPARE(data.fileUrl, QByteArray(QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded()));
+}
+
+void tst_QDeclarativeDebugJS::interrupt()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 12;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.interrupt();
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ QByteArray functionName("functionInScript");
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.functionName, functionName);
+ QCOMPARE(data.fileUrl, QByteArray(QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded()));
+}
+
+void tst_QDeclarativeDebugJS::stepOut()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1,bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 12;
+
+ bp2.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp2.lineNumber = 13;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1 << bp2);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.stepInto();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.stepOut();
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+ JSAgentStackData data = client.break_stackFrames.at(0);
+
+ QCOMPARE(data.fileUrl, bp2.fileUrl);
+ QCOMPARE(data.lineNumber, bp2.lineNumber);
+
+}
+
+void tst_QDeclarativeDebugJS::continueExecution()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1, bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 11;
+
+ bp2.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp2.lineNumber = 13;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1 << bp2);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.continueExecution();
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.fileUrl, bp2.fileUrl);
+ QCOMPARE(data.lineNumber, bp2.lineNumber);
+}
+
+void tst_QDeclarativeDebugJS::expandObject()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 17;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ foreach ( JSAgentWatchData data, client.break_locals)
+ {
+ if( data.name == "details")
+ {
+ //TEST LINE
+ client.expandObjectById(data.name,data.objectId);
+ }
+ }
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(expanded())));
+ QCOMPARE(client.object_name,QByteArray("details"));
+ QCOMPARE(client.object_children.at(0).name,QByteArray("category"));
+ QCOMPARE(client.object_children.at(0).type,QByteArray("String"));
+ QCOMPARE(client.object_children.at(1).name,QByteArray("names"));
+ QCOMPARE(client.object_children.at(1).type,QByteArray("Array"));
+ QCOMPARE(client.object_children.at(2).name,QByteArray("aliases"));
+ QCOMPARE(client.object_children.at(2).type,QByteArray("Array"));
+
+}
+
+void tst_QDeclarativeDebugJS::setProperty()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1, bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 17;
+ bp2.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp2.lineNumber = 18;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1 << bp2);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ quint64 objectId;
+ QByteArray objectName;
+
+ foreach ( JSAgentWatchData data, client.break_locals)
+ {
+ if( data.name == "details")
+ {
+ objectId = data.objectId;
+ objectName = data.name;
+ //TEST LINE
+ client.setProperty(data.name, data.objectId, "total", "names.length");
+ }
+ }
+
+ client.continueExecution();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+ client.expandObjectById(objectName,objectId);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(expanded())));
+
+ QCOMPARE(client.object_name,QByteArray("details"));
+ QCOMPARE(client.object_children.at(0).name,QByteArray("category"));
+ QCOMPARE(client.object_children.at(0).type,QByteArray("String"));
+ QCOMPARE(client.object_children.at(0).value,QByteArray("Superheroes"));
+ QCOMPARE(client.object_children.at(1).name,QByteArray("names"));
+ QCOMPARE(client.object_children.at(1).type,QByteArray("Array"));
+ QCOMPARE(client.object_children.at(2).name,QByteArray("aliases"));
+ QCOMPARE(client.object_children.at(2).type,QByteArray("Array"));
+ QCOMPARE(client.object_children.at(3).name,QByteArray("total"));
+ QCOMPARE(client.object_children.at(3).type,QByteArray("Number"));
+ // foreach ( JSAgentWatchData data, client.object_children)
+ // {
+ // qDebug() << data.name << data.type << data.value;
+ // }
+}
+
+void tst_QDeclarativeDebugJS::setProperty2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1, bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 17;
+ bp2.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp2.lineNumber = 18;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1 << bp2);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ quint64 objectId;
+ QByteArray objectName;
+
+ foreach ( JSAgentWatchData data, client.break_locals)
+ {
+ if( data.name == "details")
+ {
+ objectId = data.objectId;
+ objectName = data.name;
+ //TEST LINE
+ client.setProperty(data.name, data.objectId, "category", data.name + ".category = 'comic characters'");
+ }
+ }
+
+ client.continueExecution();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+ client.expandObjectById(objectName,objectId);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(expanded())));
+
+ QCOMPARE(client.object_name,QByteArray("details"));
+ QCOMPARE(client.object_children.at(0).name,QByteArray("category"));
+ QCOMPARE(client.object_children.at(0).type,QByteArray("String"));
+ QCOMPARE(client.object_children.at(0).value,QByteArray("comic characters"));
+ QCOMPARE(client.object_children.at(1).name,QByteArray("names"));
+ QCOMPARE(client.object_children.at(1).type,QByteArray("Array"));
+ QCOMPARE(client.object_children.at(2).name,QByteArray("aliases"));
+ QCOMPARE(client.object_children.at(2).type,QByteArray("Array"));
+
+ // foreach ( JSAgentWatchData data, client.object_children)
+ // {
+ // qDebug() << data.name << data.type << data.value;
+ // }
+}
+
+void tst_QDeclarativeDebugJS::watchExpression()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ QByteArray watchExpression("root.result = 20");
+ QStringList watchList;
+ watchList.append(QString(watchExpression));
+
+ //TEST LINE
+ client.setWatchExpressions(watchList);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 11;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ JSAgentWatchData data = client.break_watches.at(0);
+ QCOMPARE(data.exp, watchExpression);
+ QCOMPARE(data.value.toInt(), 20);
+ QCOMPARE(data.type, QByteArray("Number"));
+}
+
+void tst_QDeclarativeDebugJS::activateFrame()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1, bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 3;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.stepInto();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.activateFrame(2);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(watchTriggered())));
+
+ QCOMPARE(client.break_locals.at(1).name,QByteArray("names"));
+ QCOMPARE(client.break_locals.at(1).type,QByteArray("Array"));
+ QCOMPARE(client.break_locals.at(2).name,QByteArray("a"));
+ QCOMPARE(client.break_locals.at(2).type,QByteArray("Number"));
+ QCOMPARE(client.break_locals.at(2).value,QByteArray("4"));
+ QCOMPARE(client.break_locals.at(3).name,QByteArray("b"));
+ QCOMPARE(client.break_locals.at(3).type,QByteArray("Number"));
+ QCOMPARE(client.break_locals.at(3).value,QByteArray("5"));
+
+ // foreach ( JSAgentWatchData data, client.break_locals)
+ // {
+ // qDebug() << data.name << data.type << data.value;
+ // }
+
+}
+
+void tst_QDeclarativeDebugJS::setBreakpoint2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 40;
+
+ //TEST LINE
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(!QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+}
+
+void tst_QDeclarativeDebugJS::stepOver2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 11;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.stepOver();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.stepOver();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.fileUrl, bp1.fileUrl);
+ QCOMPARE(data.lineNumber, bp1.lineNumber +2);
+}
+
+void tst_QDeclarativeDebugJS::stepInto2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 17;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.stepInto();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.stepInto();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ QByteArray functionName("logger");
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.functionName, functionName);
+ QCOMPARE(data.fileUrl, QByteArray(QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded()));
+}
+
+void tst_QDeclarativeDebugJS::interrupt2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 17;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.interrupt();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.interrupt();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ QByteArray functionName("logger");
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.functionName, functionName);
+ QCOMPARE(data.fileUrl, QByteArray(QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded()));
+}
+
+void tst_QDeclarativeDebugJS::stepOut2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1,bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 12;
+
+ bp2.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp2.lineNumber = 13;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1 << bp2);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.stepInto();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.stepInto();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.stepOut();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.stepOut();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ JSAgentStackData data = client.break_stackFrames.at(0);
+
+ QCOMPARE(data.fileUrl, bp2.fileUrl);
+ QCOMPARE(data.lineNumber, bp2.lineNumber);
+
+}
+
+void tst_QDeclarativeDebugJS::continueExecution2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1, bp2, bp3;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 11;
+
+ bp2.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp2.lineNumber = 12;
+
+ bp3.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp3.lineNumber = 13;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1 << bp2 << bp3);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.continueExecution();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.continueExecution();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ JSAgentStackData data = client.break_stackFrames.at(0);
+ QCOMPARE(data.fileUrl, bp3.fileUrl);
+ QCOMPARE(data.lineNumber, bp3.lineNumber);
+}
+
+void tst_QDeclarativeDebugJS::expandObject2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 17;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.expandObjectById(QByteArray("details"),123);
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(expanded())));
+ QCOMPARE(client.object_name,QByteArray("details"));
+
+ QEXPECT_FAIL("", "", Continue);
+ QCOMPARE(client.object_children.length(),0);
+
+}
+
+void tst_QDeclarativeDebugJS::setProperty3()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1, bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 17;
+ bp2.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp2.lineNumber = 18;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1 << bp2);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ quint64 objectId;
+ QByteArray objectName;
+
+ foreach ( JSAgentWatchData data, client.break_locals)
+ {
+ if( data.name == "details")
+ {
+ objectId = data.objectId;
+ objectName = data.name;
+ //TEST LINE
+ client.setProperty(data.name, 123, "total", "names.length");
+ }
+ }
+
+ client.continueExecution();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+ client.expandObjectById(objectName,objectId);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(expanded())));
+
+ QCOMPARE(client.object_name,QByteArray("details"));
+ QCOMPARE(client.object_children.length(),3);
+
+ // foreach ( JSAgentWatchData data, client.object_children)
+ // {
+ // qDebug() << data.name << data.type << data.value;
+ // }
+}
+
+void tst_QDeclarativeDebugJS::setProperty4()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1, bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 17;
+ bp2.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp2.lineNumber = 18;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1 << bp2);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ quint64 objectId;
+ QByteArray objectName;
+
+ foreach ( JSAgentWatchData data, client.break_locals)
+ {
+ if( data.name == "details")
+ {
+ objectId = data.objectId;
+ objectName = data.name;
+ //TEST LINE
+ client.setProperty(data.name, 123, "category", data.name + ".category = 'comic characters'");
+ }
+ }
+
+ client.continueExecution();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+ client.expandObjectById(objectName,objectId);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(expanded())));
+
+ QCOMPARE(client.object_name,QByteArray("details"));
+ QCOMPARE(client.object_children.at(0).name,QByteArray("category"));
+ QCOMPARE(client.object_children.at(0).type,QByteArray("String"));
+ QCOMPARE(client.object_children.at(0).value,QByteArray("Superheroes"));
+ QCOMPARE(client.object_children.at(1).name,QByteArray("names"));
+ QCOMPARE(client.object_children.at(1).type,QByteArray("Array"));
+ QCOMPARE(client.object_children.at(2).name,QByteArray("aliases"));
+ QCOMPARE(client.object_children.at(2).type,QByteArray("Array"));
+
+ // foreach ( JSAgentWatchData data, client.object_children)
+ // {
+ // qDebug() << data.name << data.type << data.value;
+ // }
+}
+
+void tst_QDeclarativeDebugJS::activateFrame2()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1, bp2;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.js")).toEncoded();
+ bp1.lineNumber = 4;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ client.stepInto();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+ //TEST LINE
+ client.activateFrame(5);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(watchTriggered())));
+
+ QCOMPARE(client.break_locals.length(),0);
+
+ // foreach ( JSAgentWatchData data, client.break_locals)
+ // {
+ // qDebug() << data.name << data.type << data.value;
+ // }
+
+}
+
+void tst_QDeclarativeDebugJS::verifyQMLOptimizerDisabled()
+{
+ QJSDebugProcess process;
+ process.start(QStringList() << "-qmljsdebugger=port:3771,block" << TEST_FILE("backtrace1.qml"));
+ QVERIFY(process.waitForStarted());
+
+ QDeclarativeDebugConnection connection;
+ QJSDebugClient client(&connection);
+
+ connection.connectToHost("127.0.0.1", 3771);
+ QVERIFY(connection.waitForConnected());
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ if (client.status() == QJSDebugClient::Unavailable)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())));
+ QCOMPARE(client.status(), QJSDebugClient::Enabled);
+
+ JSAgentBreakpointData bp1;
+ bp1.fileUrl = QUrl::fromLocalFile(TEST_FILE("backtrace1.qml")).toEncoded();
+ bp1.lineNumber = 21;
+
+ client.setBreakpoints(QSet<JSAgentBreakpointData>() << bp1);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(stopped())));
+
+}
+QTEST_MAIN(tst_QDeclarativeDebugJS)
+
+#include "tst_qdeclarativedebugjs.moc"
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro b/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.pro
index 171f308..8aea1b5 100644
--- a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
+++ b/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.pro
@@ -1,8 +1,12 @@
load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative script
+contains(QT_CONFIG,declarative): QT += declarative network script
macx:CONFIG -= app_bundle
-SOURCES += tst_qdeclarativescriptdebugging.cpp
+HEADERS += ../shared/debugutil_p.h
+
+SOURCES += tst_qdeclarativedebugjs.cpp \
+ ../shared/debugutil.cpp
+
INCLUDEPATH += ../shared
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
@@ -16,5 +20,7 @@ symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
+OTHER_FILES = data/backtrace1.js data/backtrace1.qml
+
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedComponentRoot.qml b/tests/auto/declarative/qdeclarativelanguage/data/NestedComponentRoot.qml
new file mode 100644
index 0000000..785a27d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/NestedComponentRoot.qml
@@ -0,0 +1,6 @@
+import QtQuick 1.0
+
+Component {
+ Item {
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nestedComponentRoots.qml b/tests/auto/declarative/qdeclarativelanguage/data/nestedComponentRoots.qml
new file mode 100644
index 0000000..361bcbc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nestedComponentRoots.qml
@@ -0,0 +1,4 @@
+import QtQuick 1.0
+
+NestedComponentRoot {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index d6e6a4a..7f186b3 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -135,6 +135,7 @@ private slots:
void reservedWords_data();
void reservedWords();
void inlineAssignmentsOverrideBindings();
+ void nestedComponentRoots();
void basicRemote_data();
void basicRemote();
@@ -1425,6 +1426,12 @@ void tst_qdeclarativelanguage::inlineAssignmentsOverrideBindings()
delete o;
}
+// QTBUG-19354
+void tst_qdeclarativelanguage::nestedComponentRoots()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("nestedComponentRoots.qml"));
+}
+
// Import tests (QT-558)
void tst_qdeclarativelanguage::importsBuiltin_data()
{
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index d75960c..0d581d4 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -174,7 +174,7 @@ void tst_qdeclarativeqt::rect()
QCOMPARE(qvariant_cast<QRectF>(object->property("test2")), QRectF(-10, 13, 100, 109.6));
QCOMPARE(qvariant_cast<QRectF>(object->property("test3")), QRectF());
QCOMPARE(qvariant_cast<QRectF>(object->property("test4")), QRectF());
- QCOMPARE(qvariant_cast<QRectF>(object->property("test5")), QRectF());
+ QCOMPARE(qvariant_cast<QRectF>(object->property("test5")), QRectF(10, 13, 100, -109));
delete object;
}
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.js b/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.js
deleted file mode 100644
index 8decbf0..0000000
--- a/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.js
+++ /dev/null
@@ -1,11 +0,0 @@
-
-function function2InScript(a)
-{
- mainRectangle.foo = a;
-}
-
-
-function functionInScript(a , b)
-{
- function2InScript(a + b);
-}
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml b/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml
deleted file mode 100644
index 9096c32..0000000
--- a/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml
+++ /dev/null
@@ -1,27 +0,0 @@
-import QtQuick 1.0
-import Qt.test 1.0
-import "backtrace1.js" as Script
-
-Rectangle {
- id: mainRectangle
-
- property string foo: "Default";
- width: 200
- height: 200
-
-
- MyTestObject {
-
- function append(a, b) {
- return a + " " + b;
- }
-
-
- id: testObject;
- someProperty: append("Hello", mainRectangle.foo)
-
- onSignaled: {
- Script.functionInScript(value , "b");
- }
- }
-}
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/tst_qdeclarativescriptdebugging.cpp b/tests/auto/declarative/qdeclarativescriptdebugging/tst_qdeclarativescriptdebugging.cpp
deleted file mode 100644
index 4301174..0000000
--- a/tests/auto/declarative/qdeclarativescriptdebugging/tst_qdeclarativescriptdebugging.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qtest.h>
-#include <QtDeclarative/qdeclarativecomponent.h>
-#include <QtDeclarative/qdeclarativeengine.h>
-#include <QtDeclarative/qdeclarativeitem.h>
-#include <QtDeclarative/qdeclarativecontext.h>
-#include <QtCore/QDir>
-#include <QtScript/QScriptEngineAgent>
-#include <private/qdeclarativeengine_p.h>
-
-class MyTestObject : public QObject {
- Q_OBJECT
- Q_PROPERTY(QString someProperty READ someProperty WRITE setSomeProperty NOTIFY somePropertyChanged)
-
-public:
- QString someProperty() { return _someProperty; }
- void setSomeProperty(const QString &p) { _someProperty = p; }
- QString _someProperty;
-
- void emitSignal(const QString &value) { emit signaled(value); }
-
-signals:
- void signaled(const QString &value);
- void somePropertyChanged();
-};
-
-
-class BtAgent : public QScriptEngineAgent {
-public:
- BtAgent(QScriptEngine *engine) : QScriptEngineAgent(engine)
- { count = 0; engine->setAgent(this); }
-
- QStringList bt;
- int count;
- int breakpoint;
- void positionChange(qint64 , int lineNumber, int )
- {
- if(lineNumber == breakpoint) {
- count++;
- bt = engine()->currentContext()->backtrace();
- }
- }
-};
-
-
-
-/*
-This test covers evaluation of ECMAScript expressions and bindings from within
-QML. This does not include static QML language issues.
-
-Static QML language issues are covered in qmllanguage
-*/
-inline QUrl TEST_FILE(const QString &filename)
-{
- QFileInfo fileInfo(__FILE__);
- return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath("data/" + filename));
-}
-
-inline QUrl TEST_FILE(const char *filename)
-{
- return TEST_FILE(QLatin1String(filename));
-}
-
-class tst_qdeclarativescriptdebugging : public QObject
-{
- Q_OBJECT
-public:
- tst_qdeclarativescriptdebugging() {}
-
-private slots:
- void initTestCase();
- void backtrace1();
-};
-
-void tst_qdeclarativescriptdebugging::initTestCase()
-{
- qmlRegisterType<MyTestObject>("Qt.test", 1,0, "MyTestObject");
-}
-
-void tst_qdeclarativescriptdebugging::backtrace1()
-{
- {
- QDeclarativeEngine engine;
- QUrl file = TEST_FILE("backtrace1.qml");
- QDeclarativeComponent component(&engine, file);
- QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(component.create());
- QVERIFY(item);
- MyTestObject *obj = item->findChild<MyTestObject *>();
- QVERIFY(obj);
- QCOMPARE(obj->someProperty(), QString("Hello Default"));
-
- QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(&engine);
- BtAgent agent(&ep->scriptEngine);
- agent.breakpoint = 16;
-
- obj->emitSignal("blah");
- QCOMPARE(obj->someProperty(), QString("Hello blahb"));
- QCOMPARE(agent.count, 1);
-
- QStringList expected;
- expected << "append(a = 'Hello', b = 'blahb') at @PREFIX@/backtrace1.qml:16"
- << "$someProperty() at @PREFIX@/backtrace1.qml:21"
- << "function2InScript(a = 'blahb') at @PREFIX@/backtrace1.js:4"
- << "functionInScript(a = 'blah', b = 'b') at @PREFIX@/backtrace1.js:10"
- << "onSignaled() at @PREFIX@/backtrace1.qml:24"
- << "<global>() at -1";
- expected.replaceInStrings("@PREFIX@", file.toString().section('/', 0, -2));
- QCOMPARE(agent.bt, expected);
- }
-}
-
-
-QTEST_MAIN(tst_qdeclarativescriptdebugging)
-
-#include "tst_qdeclarativescriptdebugging.moc"
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 1720c33..19b7a76 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -2431,15 +2431,20 @@ void tst_qdeclarativetextinput::preeditAutoScroll()
QTest::qWaitForWindowShown(&view);
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
+ QSignalSpy cursorRectangleSpy(&input, SIGNAL(cursorRectangleChanged()));
+ int cursorRectangleChanges = 0;
+
// test the text is scrolled so the preedit is visible.
ic.sendPreeditText(preeditText.mid(0, 3), 1);
QVERIFY(input.positionAt(0) != 0);
QVERIFY(input.cursorRectangle().left() < input.boundingRect().width());
+ QCOMPARE(cursorRectangleSpy.count(), ++cursorRectangleChanges);
// test the text is scrolled back when the preedit is removed.
ic.sendEvent(QInputMethodEvent());
QCOMPARE(input.positionAt(0), 0);
QCOMPARE(input.positionAt(input.width()), 5);
+ QCOMPARE(cursorRectangleSpy.count(), ++cursorRectangleChanges);
// some tolerance for different fonts.
#ifdef Q_OS_LINUX
@@ -2455,26 +2460,31 @@ void tst_qdeclarativetextinput::preeditAutoScroll()
ic.sendPreeditText(preeditText, i + 1);
QVERIFY(input.cursorRectangle().right() >= fm.width(preeditText.at(i)) - error);
QVERIFY(input.positionToRectangle(0).x() < x);
+ QCOMPARE(cursorRectangleSpy.count(), ++cursorRectangleChanges);
x = input.positionToRectangle(0).x();
}
for (int i = 1; i >= 0; --i) {
ic.sendPreeditText(preeditText, i + 1);
QVERIFY(input.cursorRectangle().right() >= fm.width(preeditText.at(i)) - error);
QVERIFY(input.positionToRectangle(0).x() > x);
+ QCOMPARE(cursorRectangleSpy.count(), ++cursorRectangleChanges);
x = input.positionToRectangle(0).x();
}
// Test incrementing the preedit cursor doesn't cause further
// scrolling when right most text is visible.
ic.sendPreeditText(preeditText, preeditText.length() - 3);
+ QCOMPARE(cursorRectangleSpy.count(), ++cursorRectangleChanges);
x = input.positionToRectangle(0).x();
for (int i = 2; i >= 0; --i) {
ic.sendPreeditText(preeditText, preeditText.length() - i);
QCOMPARE(input.positionToRectangle(0).x(), x);
+ QCOMPARE(cursorRectangleSpy.count(), ++cursorRectangleChanges);
}
for (int i = 1; i < 3; ++i) {
ic.sendPreeditText(preeditText, preeditText.length() - i);
QCOMPARE(input.positionToRectangle(0).x(), x);
+ QCOMPARE(cursorRectangleSpy.count(), ++cursorRectangleChanges);
}
// Test disabling auto scroll.
diff --git a/tests/auto/declarative/qmlshadersplugin/main.qml b/tests/auto/declarative/qmlshadersplugin/main.qml
new file mode 100644
index 0000000..fc80b39
--- /dev/null
+++ b/tests/auto/declarative/qmlshadersplugin/main.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QML Shaders plugin of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import Qt.labs.shaders 1.0
+
+ Rectangle {
+ width: 300
+ height: 300
+
+ Text {
+ id: textLabel
+ text: "Hello World"
+ anchors.centerIn: parent
+ font.pixelSize: 48
+ }
+
+ ShaderEffectItem {
+ objectName: "effectItem"
+ property variant source: ShaderEffectSource { objectName: "effectSource"; sourceItem: textLabel; hideSource: true }
+ property real wiggleAmount: 0.01
+ anchors.fill: textLabel
+
+ SequentialAnimation on wiggleAmount {
+ loops: Animation.Infinite
+ NumberAnimation { to: -0.01; duration: 500 }
+ NumberAnimation { to: 0.01; duration: 500 }
+ }
+
+ fragmentShader: "
+ varying highp vec2 qt_TexCoord0;
+ uniform sampler2D source;
+ uniform highp float wiggleAmount;
+ void main(void)
+ {
+ highp vec2 wiggledTexCoord = qt_TexCoord0;
+ wiggledTexCoord.s += sin(4.0 * 3.141592653589 * wiggledTexCoord.t) * wiggleAmount;
+ gl_FragColor = texture2D(source, wiggledTexCoord.st);
+ }
+ "
+ }
+ }
diff --git a/tests/auto/declarative/qmlshadersplugin/qmlshadersplugin.pro b/tests/auto/declarative/qmlshadersplugin/qmlshadersplugin.pro
new file mode 100644
index 0000000..aa0e07a
--- /dev/null
+++ b/tests/auto/declarative/qmlshadersplugin/qmlshadersplugin.pro
@@ -0,0 +1,18 @@
+load(qttest_p4)
+
+QT += opengl declarative
+SOURCES += tst_qmlshadersplugin.cpp
+
+SOURCES += \
+ ../../../../src/imports/shaders/shadereffectitem.cpp \
+ ../../../../src/imports/shaders/shadereffectsource.cpp \
+ ../../../../src/imports/shaders/shadereffect.cpp \
+ ../../../../src/imports/shaders/shadereffectbuffer.cpp \
+ ../../../../src/imports/shaders/scenegraph/qsggeometry.cpp
+
+HEADERS += \
+ ../../../../src/imports/shaders/shadereffectitem.h \
+ ../../../../src/imports/shaders/shadereffectsource.h \
+ ../../../../src/imports/shaders/shadereffect.h \
+ ../../../../src/imports/shaders/shadereffectbuffer.h \
+ ../../../../src/imports/shaders/scenegraph/qsggeometry.h
diff --git a/tests/auto/declarative/qmlshadersplugin/tst_qmlshadersplugin.cpp b/tests/auto/declarative/qmlshadersplugin/tst_qmlshadersplugin.cpp
new file mode 100644
index 0000000..a904a88
--- /dev/null
+++ b/tests/auto/declarative/qmlshadersplugin/tst_qmlshadersplugin.cpp
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QML Shaders plugin of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QtDeclarative>
+#include "../../../../src/imports/shaders/shadereffectitem.h"
+#include "../../../../src/imports/shaders/shadereffectsource.h"
+#include "../../../../src/imports/shaders/shadereffect.h"
+
+static const char qt_default_vertex_code[] =
+ "uniform highp mat4 qt_ModelViewProjectionMatrix;\n"
+ "attribute highp vec4 qt_Vertex;\n"
+ "attribute highp vec2 qt_MultiTexCoord0;\n"
+ "varying highp vec2 qt_TexCoord0;\n"
+ "void main(void)\n"
+ "{\n"
+ "qt_TexCoord0 = qt_MultiTexCoord0;\n"
+ "gl_Position = qt_ModelViewProjectionMatrix * qt_Vertex;\n"
+ "}\n";
+
+static const char qt_default_fragment_code[] =
+ "varying highp vec2 qt_TexCoord0;\n"
+ "uniform lowp sampler2D source;\n"
+ "void main(void)\n"
+ "{\n"
+ "gl_FragColor = texture2D(source, qt_TexCoord0.st);\n"
+ "}\n";
+
+class tst_qmlshadersplugin : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void initTestCase();
+ void shaderEffectItemAPI();
+ void shaderEffectSourceAPI();
+ void combined();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+void tst_qmlshadersplugin::initTestCase()
+{
+ const char *uri ="Qt.labs.shaders";
+ qmlRegisterType<ShaderEffectItem>(uri, 1, 0, "ShaderEffectItem");
+ qmlRegisterType<ShaderEffectSource>(uri, 1, 0, "ShaderEffectSource");
+}
+
+
+void tst_qmlshadersplugin::shaderEffectItemAPI()
+{
+ // Creation
+ QString componentStr = "import QtQuick 1.0\n"
+ "import Qt.labs.shaders 1.0\n"
+ "ShaderEffectItem {\n"
+ "property variant source\n"
+ "width: 200; height: 300\n"
+ "}";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+
+ QObject *obj = component.create();
+ QTest::qWait(100);
+ QVERIFY(obj != 0);
+
+ // Default values
+ QCOMPARE(obj->property("width").toDouble(), 200.);
+ QCOMPARE(obj->property("height").toDouble(), 300.);
+ QCOMPARE(obj->property("fragmentShader").toString(), QString(""));
+ QCOMPARE(obj->property("vertexShader").toString(), QString(""));
+ QCOMPARE(obj->property("blending").toBool(), true);
+ QCOMPARE(obj->property("meshResolution").toSize(), QSize(1, 1));
+ QCOMPARE(obj->property("visible").toBool(), true);
+
+ // Seting the values
+ QVERIFY(obj->setProperty("fragmentShader", QString(qt_default_fragment_code)));
+ QVERIFY(obj->setProperty("vertexShader", QString(qt_default_vertex_code)));
+ QVERIFY(obj->setProperty("blending", false));
+ QVERIFY(obj->setProperty("meshResolution", QSize(20, 10)));
+ QVERIFY(obj->setProperty("visible", false));
+
+ QCOMPARE(obj->property("fragmentShader").toString(), QString(qt_default_fragment_code));
+ QCOMPARE(obj->property("vertexShader").toString(), QString(qt_default_vertex_code));
+ QCOMPARE(obj->property("blending").toBool(), false);
+ QCOMPARE(obj->property("meshResolution").toSize(), QSize(20, 10));
+ QCOMPARE(obj->property("visible").toBool(), false);
+
+ delete obj;
+}
+
+void tst_qmlshadersplugin::shaderEffectSourceAPI()
+{
+ // Creation
+ QString componentStr = "import QtQuick 1.0\n"
+ "import Qt.labs.shaders 1.0\n"
+ "ShaderEffectSource {}";
+ QDeclarativeComponent shaderEffectSourceComponent(&engine);
+ shaderEffectSourceComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+
+ QObject *obj = shaderEffectSourceComponent.create();
+ QTest::qWait(100);
+ QVERIFY(obj != 0);
+
+ // Default values
+ QCOMPARE(obj->property("sourceRect").toRect(), QRect(0, 0, 0, 0));
+ QCOMPARE(obj->property("textureSize").toSize(), QSize(0, 0));
+ QCOMPARE(obj->property("live").toBool(), true);
+ QCOMPARE(obj->property("hideSource").toBool(), false);
+ QCOMPARE(obj->property("wrapMode").toUInt(), static_cast<unsigned int>(ShaderEffectSource::ClampToEdge));
+
+ // Seting the values
+ componentStr = "import QtQuick 1.0\n"
+ "Item {}";
+ QDeclarativeComponent itemComponent(&engine);
+ itemComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem *> (itemComponent.create());
+ QVERIFY(item != 0);
+
+ QVERIFY(obj->setProperty("sourceItem", QVariant::fromValue(item)));
+ QVERIFY(obj->setProperty("sourceRect", QRect(10, 20, 30, 40)));
+ QVERIFY(obj->setProperty("textureSize", QSize(50, 100)));
+ QVERIFY(obj->setProperty("live", false));
+ QVERIFY(obj->setProperty("hideSource", true));
+ QVERIFY(obj->setProperty("wrapMode", static_cast<unsigned int>(ShaderEffectSource::Repeat)));
+
+ QCOMPARE(obj->property("sourceItem"), QVariant::fromValue(item));
+ QCOMPARE(obj->property("sourceRect").toRect(), QRect(10, 20, 30, 40));
+ QCOMPARE(obj->property("textureSize").toSize(), QSize(50, 100));
+ QCOMPARE(obj->property("live").toBool(), false);
+ QCOMPARE(obj->property("hideSource").toBool(), true);
+ QCOMPARE(obj->property("wrapMode").toUInt(), static_cast<unsigned int>(ShaderEffectSource::Repeat));
+
+ delete item;
+ delete obj;
+}
+
+void tst_qmlshadersplugin::combined()
+{
+ QGLFormat format = QGLFormat::defaultFormat();
+ format.setSampleBuffers(false);
+ format.setSwapInterval(1);
+
+ QGLWidget* glWidget = new QGLWidget(format);
+ glWidget->setAutoFillBackground(false);
+
+ QDeclarativeView view;
+ view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
+ view.setAttribute(Qt::WA_OpaquePaintEvent);
+ view.setAttribute(Qt::WA_NoSystemBackground);
+ view.setViewport(glWidget);
+ view.setSource(QUrl::fromLocalFile("main.qml"));
+ view.show();
+ QTest::qWait(1000);
+
+ QObject *item = view.rootObject()->findChild<QDeclarativeItem*>("effectItem");
+ QVERIFY(item != 0);
+
+ QObject *src = view.rootObject()->findChild<QDeclarativeItem*>("effectSource");
+ QVERIFY(src != 0);
+
+ QCOMPARE(item->property("source"), QVariant::fromValue(src));
+}
+
+QTEST_MAIN(tst_qmlshadersplugin)
+
+#include "tst_qmlshadersplugin.moc"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png
index bc65634..4c4d17c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png
index be041d8..d7b5943 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.0.png b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.0.png
index 0efb20a..75a6c49 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.0.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.0.png
index 6525dbb..ae89849 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.1.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.1.png
index 5b8d209..7b7db05 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.2.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.2.png
index cf012ba..7c1442f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.3.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.3.png
index 57e77a4..c01c980 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.4.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.4.png
index 24d26bd..8806e4c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.5.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.5.png
index a540734..b331119 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.6.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.6.png
index 17da643..76e3c6f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.7.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.7.png
index e03cfe4..141753c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.0.png
index 1b808ef..8b6329d 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.0.png
index 666d272..38f2051 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.0.png
index 823199c..d85498b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png
index 7e84164..7547856 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png
index 7e84164..84430bb 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.0.png
index 6119f92..026d06c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.1.png
index 6119f92..026d06c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.1.png
index f2e6117..16202c4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.0.png
index 2f4c84a..38b9668 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.1.png
index ae786a2..801ec2b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.1.png
index 93c16dc..ddd6cc5 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.2.png
index acec1ee..4679774 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.3.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.3.png
index f380c08..51018b4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.4.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.4.png
index 18142dd..f5ed905 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.5.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.5.png
index c7f59b8..5005724 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.0.png
index be676c0..e47b479 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.0.png
index df2fe2f..0d3c672 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png
index b4e1d3a..56d98ff 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png
index 4177b9e..1ab1eb5 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png
index 36e5d35..68921f6 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png
index 34f8e38..c9450c7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.0.png
index 0b4ca4e..5049c3f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.1.png
index 251beb6..ee6e16a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.10.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.10.png
index 5cd2d7d..d9d2252 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.10.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.10.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.11.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.11.png
index 5cd2d7d..d9d2252 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.11.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.11.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.2.png
index bf6a44e..cf99d98 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.3.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.3.png
index 1089578..e3937f0 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.4.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.4.png
index c9113de..2fe3337 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.5.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.5.png
index 47b4744..97b9913 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.6.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.6.png
index c518204..08e059f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.7.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.7.png
index 9f1c26a..bbc5ba2 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.8.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.8.png
index cd8d0a5..465b64e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.8.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.8.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.9.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.9.png
index 8f5f872..d9d2252 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.9.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.9.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.0.png
index a61ba5a..61606b2 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.1.png
index 2a28c96..a4b28fc 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.2.png
index d1ddaa6..5be6bbb 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.3.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.3.png
index 493c5cd..a220f65 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.4.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.4.png
index 2b2ce59..6946707 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.5.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.5.png
index 044eea4..4eeb8ec 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.6.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.6.png
index f0748b2..4eeb8ec 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.0.png
index 8d74b8d..59fc0fc 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.1.png
index 8a642d2..2747b50 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.2.png
index 5698741..74efe73 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.3.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.3.png
index 7f56f34..02f6e17 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.4.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.4.png
index 8d74b8d..59fc0fc 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.10.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.10.png
index 8effaef..56f6ece 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.10.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.10.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.11.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.11.png
index 8effaef..56f6ece 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.11.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.11.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.12.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.12.png
index 8effaef..56f6ece 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.12.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.12.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.7.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.7.png
index b79af19..f8bc3b4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.9.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.9.png
index ef15fdf..e156cd5 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.9.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.9.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.7.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.7.png
index 99d451c..d624a71 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.0.png
index 5f632d0..57a1599 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.1.png
index 060be22..d327d5b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.2.png
index d373aef..c1e3dce 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.11.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.11.png
index 0ea21f3..7829e03 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.11.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.11.png
Binary files differ
diff --git a/tests/auto/lancelot/scripts/statictext.qps b/tests/auto/lancelot/scripts/statictext.qps
new file mode 100644
index 0000000..b62b623
--- /dev/null
+++ b/tests/auto/lancelot/scripts/statictext.qps
@@ -0,0 +1,122 @@
+drawStaticText -5 5 "Text that is drawn outside the bounds..."
+
+translate 20 20
+begin_block text_drawing
+save
+ setFont "sansserif" 10 normal
+ drawStaticText 0 20 "sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawStaticText 0 40 "sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawStaticText 0 60 "sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawStaticText 0 80 "sansserif 10pt, bold italic"
+
+
+ translate 0 100
+ setPen #7fff0000
+
+ setFont "sansserif" 10 normal
+ drawStaticText 0 20 "alpha sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawStaticText 0 40 "alpha sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawStaticText 0 60 "alpha sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawStaticText 0 80 "alpha sansserif 10pt, bold italic"
+
+
+ translate 0 100
+ setPen black
+ save
+ scale 0.9 0.9
+
+ setFont "sansserif" 10 normal
+ drawStaticText 0 20 "scaled sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawStaticText 0 40 "scaled sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawStaticText 0 60 "scaled sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawStaticText 0 80 "scaled sansserif 10pt, bold italic"
+ restore
+
+ translate 0 100
+ setPen black
+ save
+ translate 200 90
+ rotate 185
+
+ setFont "sansserif" 10 normal
+ drawStaticText 0 20 "scaled sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawStaticText 0 40 "scaled sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawStaticText 0 60 "scaled sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawStaticText 0 80 "scaled sansserif 10pt, bold italic"
+ restore
+
+ translate 0 100
+ gradient_appendStop 0 red
+ gradient_appendStop 0.5 #00ff00
+ gradient_appendStop 1 blue
+ gradient_setLinear 0 0 200 0
+ setPen brush
+
+ setFont "sansserif" 10 normal
+ drawStaticText 0 0 "gradient sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawStaticText 0 20 "gradient sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawStaticText 0 40 "gradient sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawStaticText 0 60 "gradient sansserif 10pt, bold italic"
+restore
+end_block
+
+translate 250 0
+drawStaticText 25 520 "clipped to rectangle"
+save
+ setPen #3f000000
+ setBrush nobrush
+ drawRect 20 0 100 500
+ setClipRect 20 0 100 500
+ setPen black
+ repeat_block text_drawing
+restore
+
+translate 150 0
+drawStaticText 25 520 "clipped to path"
+save
+ path_moveTo clip 20 0
+ path_cubicTo clip 0 200 40 400 20 400
+ path_lineTo clip 30 500
+ path_lineTo clip 30 0
+ path_lineTo clip 40 0
+ path_lineTo clip 40 500
+ path_lineTo clip 120 500
+ path_lineTo clip 120 0
+ path_lineTo clip 20 0
+ setPen #3f000000
+ setBrush nobrush
+ drawPath clip
+ setClipPath clip
+ setPen black
+ repeat_block text_drawing
+restore
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 92e3a8b..109afbc 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -238,6 +238,7 @@ private slots:
void navigateControllers();
void navigateLabels();
void text();
+ void textAttributes();
void setText();
void hideShowTest();
@@ -1563,6 +1564,60 @@ void tst_QAccessibility::text()
#endif // !QT3_SUPPORT
}
+void tst_QAccessibility::textAttributes()
+{
+ QTextEdit textEdit;
+ int startOffset;
+ int endOffset;
+ QString attributes;
+ QString text("<html><head></head><body>"
+ "Hello, <b>this</b> is an <i><b>example</b> text</i>."
+ "<span style=\"font-family: monospace\">Multiple fonts are used.</span>"
+ "Multiple <span style=\"font-size: 8pt\">text sizes</span> are used."
+ "Let's give some color to <span style=\"color:#f0f1f2; background-color:#14f01e\">Qt</span>."
+ "</body></html>");
+
+ textEdit.setText(text);
+ QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(&textEdit);
+
+ QAccessibleTextInterface *textInterface=interface->textInterface();
+
+ QVERIFY(textInterface);
+ QCOMPARE(textInterface->characterCount(), 112);
+
+ attributes = textInterface->attributes(10, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 7);
+ QCOMPARE(endOffset, 11);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";font-weight:bold;")));
+
+ attributes = textInterface->attributes(18, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 18);
+ QCOMPARE(endOffset, 25);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";font-weight:bold;")));
+ QVERIFY(attributes.contains(QLatin1String(";font-style:italic;")));
+
+ attributes = textInterface->attributes(34, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 31);
+ QCOMPARE(endOffset, 55);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";font-family:\"monospace\";")));
+
+ attributes = textInterface->attributes(65, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 64);
+ QCOMPARE(endOffset, 74);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";font-size:8pt;")));
+
+ attributes = textInterface->attributes(110, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 109);
+ QCOMPARE(endOffset, 111);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";background-color:rgb(20,240,30);")));
+ QVERIFY(attributes.contains(QLatin1String(";color:rgb(240,241,242);")));
+}
+
void tst_QAccessibility::setText()
{
#if !defined(QT3_SUPPORT)
@@ -2645,6 +2700,8 @@ void tst_QAccessibility::textEditTest()
{
{
QTextEdit edit;
+ int startOffset;
+ int endOffset;
QString text = "hello world\nhow are you today?\n";
edit.setText(text);
edit.show();
@@ -2654,6 +2711,12 @@ void tst_QAccessibility::textEditTest()
QCOMPARE(iface->childCount(), 6);
QCOMPARE(iface->text(QAccessible::Value, 4), QString("hello world"));
QCOMPARE(iface->text(QAccessible::Value, 5), QString("how are you today?"));
+ QCOMPARE(iface->textInterface()->textAtOffset(8, QAccessible2::WordBoundary, &startOffset, &endOffset), QString("world"));
+ QCOMPARE(startOffset, 6);
+ QCOMPARE(endOffset, 11);
+ QCOMPARE(iface->textInterface()->textAtOffset(14, QAccessible2::LineBoundary, &startOffset, &endOffset), QString("how are you today?"));
+ QCOMPARE(startOffset, 12);
+ QCOMPARE(endOffset, 30);
QCOMPARE(iface->text(QAccessible::Value, 6), QString());
QCOMPARE(iface->textInterface()->characterCount(), 31);
QFontMetrics fm(edit.font());
diff --git a/tests/auto/qcomplextext/bidireorderstring.h b/tests/auto/qcomplextext/bidireorderstring.h
index e51011e..e0bbf6e 100644
--- a/tests/auto/qcomplextext/bidireorderstring.h
+++ b/tests/auto/qcomplextext/bidireorderstring.h
@@ -145,6 +145,7 @@ const LV logical_visual[] = {
{ "embed10", "\342\200\253x \327\251\327\234\327\225\327\235 y\342\200\254", "\342\200\254y \327\235\327\225\327\234\327\251 x\342\200\253", QChar::DirL },
{ "embed11", "\342\200\252x \327\251\327\234\327\225\327\235 y\342\200\254", "\342\200\252x \327\235\327\225\327\234\327\251 y\342\200\254", QChar::DirR },
{ "embed12", "\342\200\253x \327\251\327\234\327\225\327\235 y\342\200\254", "\342\200\254y \327\235\327\225\327\234\327\251 x\342\200\253", QChar::DirR },
+ { "zwsp", "+0\342\200\213f-1", "+0\342\200\213f-1", QChar::DirL },
{ 0, 0, 0, QChar::DirON }
};
diff --git a/tests/auto/qcssparser/qcssparser.pro b/tests/auto/qcssparser/qcssparser.pro
index f696f19..fc3daa3 100644
--- a/tests/auto/qcssparser/qcssparser.pro
+++ b/tests/auto/qcssparser/qcssparser.pro
@@ -10,7 +10,7 @@ requires(contains(QT_CONFIG,private_tests))
wince*|symbian: {
addFiles.files = testdata
addFiles.path = .
- timesFont.files = C:/Windows/Fonts/times.ttf
+ timesFont.files = c:/windows/fonts/times.ttf
timesFont.path = .
DEPLOYMENT += addFiles timesFont
}
diff --git a/tests/auto/qdatetime/qdatetime.pro b/tests/auto/qdatetime/qdatetime.pro
index a3f3091..72ca333 100644
--- a/tests/auto/qdatetime/qdatetime.pro
+++ b/tests/auto/qdatetime/qdatetime.pro
@@ -10,4 +10,3 @@ win32-msvc|win32-msvc9x {
QMAKE_CXXFLAGS_RELEASE -= -O1
}
CONFIG += parallel_test
-HEADERS = tst_qdatetime.loc
diff --git a/tests/auto/qfont/tst_qfont.cpp b/tests/auto/qfont/tst_qfont.cpp
index cfafa78..711ffc0 100644
--- a/tests/auto/qfont/tst_qfont.cpp
+++ b/tests/auto/qfont/tst_qfont.cpp