diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-11-03 06:20:56 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-11-03 06:20:56 (GMT) |
commit | a2ecba558d4722bfae9acea84e6e33e72187756d (patch) | |
tree | 9cdb41ea52e1f8a017cfd243448535be8de7eb4e | |
parent | 648eb76c22762c510815305e9e495db2aee9d2ad (diff) | |
parent | af15292e4982c11542487d39fc76ccfb8516598f (diff) | |
download | Qt-a2ecba558d4722bfae9acea84e6e33e72187756d.zip Qt-a2ecba558d4722bfae9acea84e6e33e72187756d.tar.gz Qt-a2ecba558d4722bfae9acea84e6e33e72187756d.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
21 files changed, 965 insertions, 16 deletions
diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/declarative/debugger/qdeclarativedebughelper.cpp index 207ad2b..b003c12 100644 --- a/src/declarative/debugger/qdeclarativedebughelper.cpp +++ b/src/declarative/debugger/qdeclarativedebughelper.cpp @@ -48,6 +48,7 @@ #include <private/qdeclarativeengine_p.h> #include <private/qabstractanimation_p.h> +#include <private/qdeclarativeengine_p.h> QT_BEGIN_NAMESPACE @@ -63,4 +64,11 @@ void QDeclarativeDebugHelper::setAnimationSlowDownFactor(qreal factor) timer->setSlowdownFactor(factor); } +void QDeclarativeDebugHelper::enableDebugging() { + if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { + qWarning("Qml debugging is enabled. Only use this in a safe environment!"); + } + QDeclarativeEnginePrivate::qml_debugging_enabled = true; +} + QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/declarative/debugger/qdeclarativedebughelper_p.h index 5689dff..a1ac23d 100644 --- a/src/declarative/debugger/qdeclarativedebughelper_p.h +++ b/src/declarative/debugger/qdeclarativedebughelper_p.h @@ -60,6 +60,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugHelper public: static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); static void setAnimationSlowDownFactor(qreal factor); + + // Enables remote debugging functionality + // Only use this for debugging in a safe environment! + static void enableDebugging(); }; QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index c39da3d..8c86ae8 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -42,6 +42,7 @@ #include "private/qdeclarativedebugservice_p.h" #include "private/qpacketprotocol_p.h" +#include "private/qdeclarativeengine_p.h" #include <QtCore/qdebug.h> #include <QtNetwork/qtcpserver.h> @@ -205,6 +206,12 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() // format: qmljsdebugger=port:3768[,block] if (!appD->qmljsDebugArgumentsString().isEmpty()) { + if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { + qWarning() << QString::fromLatin1("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Debugging has not been enabled.").arg( + appD->qmljsDebugArgumentsString()).toAscii().constData(); + return 0; + } if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) { int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(',')); diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 03c9765..84f276e 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -219,6 +219,7 @@ void QDeclarativeTextPrivate::updateSize() QFontMetrics fm(font); if (text.isEmpty()) { + q->setImplicitWidth(0); q->setImplicitHeight(fm.height()); emit q->paintedSizeChanged(); q->update(); @@ -291,30 +292,30 @@ QSize QDeclarativeTextPrivate::setupTextLayout() qreal height = 0; qreal lineWidth = 0; - //set manual width - if (q->widthValid()) - lineWidth = q->width(); - QTextOption textOption = layout.textOption(); - textOption.setWrapMode(QTextOption::WrapMode(wrapMode)); + textOption.setWrapMode(QTextOption::NoWrap); textOption.setAlignment(Qt::Alignment(hAlign)); - layout.setTextOption(textOption); + // if the item has an explicit width, we set the line width and enable wrapping + if (q->widthValid()) { + lineWidth = q->width(); + textOption.setWrapMode(QTextOption::WrapMode(wrapMode)); + } + + layout.setTextOption(textOption); layout.beginLayout(); while (1) { QTextLine line = layout.createLine(); if (!line.isValid()) break; - if (q->widthValid()) { - line.setLineWidth(lineWidth); - line.setPosition(QPointF(0, height)); - height += line.height(); - } + line.setLineWidth(lineWidth); + line.setPosition(QPointF(0, height)); + height += line.height(); } layout.endLayout(); - return QSize(qCeil(layout.boundingRect().width()), layout.boundingRect().height()); + return layout.boundingRect().toAlignedRect().size(); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp index 89a2158..db5d75d 100644 --- a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp @@ -285,6 +285,19 @@ void QDeclarativeTextLayout::beginLayout() QTextLayout::beginLayout(); } +void QDeclarativeTextLayout::clearLayout() +{ + if (d && d->cached) { + d->cached = false; + d->items.clear(); + d->positions.clear(); + d->glyphs.clear(); + d->chars.clear(); + d->position = QPointF(); + } + QTextLayout::clearLayout(); +} + void QDeclarativeTextLayout::prepare() { if (!d || !d->cached) { diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout_p.h b/src/declarative/graphicsitems/qdeclarativetextlayout_p.h index 90bf0e0..8b81db3 100644 --- a/src/declarative/graphicsitems/qdeclarativetextlayout_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextlayout_p.h @@ -59,6 +59,7 @@ public: ~QDeclarativeTextLayout(); void beginLayout(); + void clearLayout(); void prepare(); void draw(QPainter *, const QPointF & = QPointF()); diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 6906f21..808ba68 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -176,6 +176,7 @@ struct StaticQtMetaObject : public QObject }; static bool qt_QmlQtModule_registered = false; +bool QDeclarativeEnginePrivate::qml_debugging_enabled = false; void QDeclarativeEnginePrivate::defineModule() { diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h index 8539fbf..deb4a77 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/declarative/qml/qdeclarativeengine_p.h @@ -321,6 +321,8 @@ public: static QString urlToLocalFileOrQrc(const QUrl& url); static void defineModule(); + + static bool qml_debugging_enabled; }; /*! diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index db4012c..9e88df7 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -1838,5 +1838,6 @@ EXPORTS ?addChanged@QDeclarativeBasePositioner@@IAEXXZ @ 1837 NONAME ABSENT ; void QDeclarativeBasePositioner::addChanged(void) ?start@QDeclarativeAbstractAnimation@@QAEXXZ @ 1838 NONAME ABSENT ; void QDeclarativeAbstractAnimation::start(void) ?qt_metacall@QDeclarativeAbstractAnimation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1839 NONAME ABSENT ; int QDeclarativeAbstractAnimation::qt_metacall(enum QMetaObject::Call, int, void * *) - ?connect@QDeclarativePropertyPrivate@@SA_NPBVQObject@@H0HHPAH@Z @ 1840 NONAME ABSENT ; bool QDeclarativePropertyPrivate::connect(class QObject const *, int, class QObject const *, int, int, int *) + ?enableDebugging@QDeclarativeDebugHelper@@SAXXZ @ 1840 NONAME ; void QDeclarativeDebugHelper::enableDebugging(void) + ?connect@QDeclarativePropertyPrivate@@SA_NPBVQObject@@H0HHPAH@Z @ 1841 NONAME ABSENT ; bool QDeclarativePropertyPrivate::connect(class QObject const *, int, class QObject const *, int, int, int *) diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 849ca6a..1f69061 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -1883,5 +1883,6 @@ EXPORTS _ZThn8_N29QDeclarativeAbstractAnimation9setTargetERK20QDeclarativeProperty @ 1882 NONAME ABSENT _ZThn8_N29QDeclarativeAbstractAnimationD0Ev @ 1883 NONAME ABSENT _ZThn8_N29QDeclarativeAbstractAnimationD1Ev @ 1884 NONAME ABSENT - _ZN27QDeclarativePropertyPrivate7connectEPK7QObjectiS2_iiPi @ 1885 NONAME ABSENT + _ZN23QDeclarativeDebugHelper15enableDebuggingEv @ 1885 NONAME + _ZN27QDeclarativePropertyPrivate7connectEPK7QObjectiS2_iiPi @ 1886 NONAME ABSENT diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index e6a81b8..53471bf 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -59,6 +59,7 @@ #include <private/qdeclarativerectangle_p.h> #include <private/qdeclarativemetatype_p.h> #include <private/qdeclarativeproperty_p.h> +#include <private/qdeclarativedebughelper_p.h> #include "../../../shared/util.h" #include "../shared/debugutil_p.h" @@ -278,8 +279,10 @@ void tst_QDeclarativeDebug::initTestCase() { qRegisterMetaType<QDeclarativeDebugWatch::State>(); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768..."); + QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); + QDeclarativeDebugHelper::enableDebugging(); + QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768..."); m_engine = new QDeclarativeEngine(this); QList<QByteArray> qml; diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index 80241ba..64afd4e 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -51,6 +51,7 @@ #include <private/qdeclarativeenginedebug_p.h> #include <private/qdeclarativedebugclient_p.h> #include <private/qdeclarativedebugservice_p.h> +#include <private/qdeclarativedebughelper_p.h> #include "../../../shared/util.h" #include "../shared/debugutil_p.h" @@ -72,8 +73,10 @@ private slots: void tst_QDeclarativeDebugClient::initTestCase() { - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3770..."); + QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); + QDeclarativeDebugHelper::enableDebugging(); + QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3770..."); new QDeclarativeEngine(this); m_conn = new QDeclarativeDebugConnection(this); diff --git a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h index c9cb839..edfc58f 100644 --- a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h +++ b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h @@ -58,6 +58,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper public: static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); static void setAnimationSlowDownFactor(qreal factor); + + // Enables remote debugging functionality + // Only use this for debugging in a safe environment! + static void enableDebugging(); }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp b/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp index 36f2222..60aec9d 100644 --- a/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp +++ b/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp @@ -54,6 +54,7 @@ class tst_qdeclarativedebughelper : public QObject { private slots: void getScriptEngine(); void setAnimationSlowDownFactor(); + void enableDebugging(); }; class TestAnimation : public QAbstractAnimation { @@ -109,6 +110,12 @@ void tst_qdeclarativedebughelper::setAnimationSlowDownFactor() QVERIFY(animation.updateCalled > 1); } +void tst_qdeclarativedebughelper::enableDebugging() +{ + QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); + QDeclarativeDebugHelper::enableDebugging(); +} + QTEST_MAIN(tst_qdeclarativedebughelper) #include "tst_qdeclarativedebughelper.moc" diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 538129c..30629f9 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -46,6 +46,7 @@ #include <QThread> #include <QtDeclarative/qdeclarativeengine.h> +#include <private/qdeclarativedebughelper_p.h> #include <private/qdeclarativedebug_p.h> #include <private/qdeclarativeenginedebug_p.h> @@ -75,6 +76,9 @@ private slots: void tst_QDeclarativeDebugService::initTestCase() { + QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); + QDeclarativeDebugHelper::enableDebugging(); + QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3769..."); new QDeclarativeEngine(this); 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 Binary files differnew file mode 100644 index 0000000..a947584 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png 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 Binary files differnew file mode 100644 index 0000000..84430bb --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.qml new file mode 100644 index 0000000..940d3c1 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.qml @@ -0,0 +1,719 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 32 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 48 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 64 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 80 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 96 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 112 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 128 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 144 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 160 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 176 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 192 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 208 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 224 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 240 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 256 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 272 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 288 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 304 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 320 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 336 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 352 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 368 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 384 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 400 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 416 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 432 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 448 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 464 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 480 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 496 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 512 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 528 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 544 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 560 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 576 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 592 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 608 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 624 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 640 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 656 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 672 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 688 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 704 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 720 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 736 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 752 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 768 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 784 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 800 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 816 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 832 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 848 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 864 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 880 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 896 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 912 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 928 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 944 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 960 + image: "qtbug_14865.0.png" + } + Frame { + msec: 976 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 992 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 1008 + hash: "f5b2ec4a5220eabe1186bb2fd65a7263" + } + Frame { + msec: 1024 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1040 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1056 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1072 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1088 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1104 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1120 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1136 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1152 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1168 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1184 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1200 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1216 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1232 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1248 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1264 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1280 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1296 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1312 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1328 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1344 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1360 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1376 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1392 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1408 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1424 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1440 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1456 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1472 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1488 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1504 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1520 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1536 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1552 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1568 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1584 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1600 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1616 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1632 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1648 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1664 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1680 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1696 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1712 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1728 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1744 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1760 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1776 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1792 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1808 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1824 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1840 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1856 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1872 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1888 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1904 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1920 + image: "qtbug_14865.1.png" + } + Frame { + msec: 1936 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1952 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1968 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 1984 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2000 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2016 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2032 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2048 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2064 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2080 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2096 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2112 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2128 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2144 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2160 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2176 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2192 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2208 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2224 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2240 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2256 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Key { + type: 6 + key: 16777249 + modifiers: 0 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 2272 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2288 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2304 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2320 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2336 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2352 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2368 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2384 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2400 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2416 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2432 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2448 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2464 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2480 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2496 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2512 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2528 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2544 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2560 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2576 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2592 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2608 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2624 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2640 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2656 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2672 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2688 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2704 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2720 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2736 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2752 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2768 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2784 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2800 + hash: "eee4600ac08b458ac7ac2320e225674c" + } + Frame { + msec: 2816 + hash: "eee4600ac08b458ac7ac2320e225674c" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.qml new file mode 100644 index 0000000..1a8af0e --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.qml @@ -0,0 +1,131 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 32 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 48 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 64 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 80 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 96 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 112 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 128 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 144 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 160 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 176 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 192 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 208 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 224 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 240 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 256 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 272 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 288 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 304 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 320 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 336 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 352 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 368 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 384 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 400 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 416 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 432 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Key { + type: 6 + key: 16777249 + modifiers: 67108864 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 448 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } + Frame { + msec: 464 + hash: "c68e50ef84647962481121e2eb1ba4d4" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml new file mode 100644 index 0000000..901025a --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml @@ -0,0 +1,22 @@ +import QtQuick 1.0 + +Rectangle { + width: 400; height: 200 + + Row { + spacing: 20 + anchors.centerIn: parent + Text { + text: "First line\nSecond line"; wrapMode: Text.Wrap + } + Text { + text: "First line\nSecond line"; width: 70 + } + Text { + text: "First Second\nThird Fourth"; wrapMode: Text.Wrap; width: 50 + } + Text { + text: "First line<br>Second line"; textFormat: Text.StyledText + } + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml new file mode 100644 index 0000000..07416dc --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml @@ -0,0 +1,17 @@ +import QtQuick 1.0 + +Rectangle { + width: 200; height: 200 + + Text { + id: label + objectName: "label" + text: "Hello world!" + width: 10 + } + + Timer { + running: true; interval: 1000 + onTriggered: label.text = "" + } +} |