diff options
-rw-r--r-- | doc/src/declarative/focus.qdoc | 88 | ||||
-rw-r--r-- | doc/src/declarative/globalobject.qdoc | 50 | ||||
-rw-r--r-- | doc/src/declarative/network.qdoc | 90 | ||||
-rw-r--r-- | examples/declarative/sql/hello.qml | 46 | ||||
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 8 | ||||
-rw-r--r-- | src/declarative/extra/qmlfontloader.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qmlsqldatabase.cpp | 4 | ||||
-rw-r--r-- | src/declarative/util/qmlstate.cpp | 3 | ||||
-rw-r--r-- | src/declarative/util/qmlstateoperations.cpp | 47 | ||||
-rw-r--r-- | tests/auto/declarative/visual/qfxtext/elide/data-X11/multilength.0.png | bin | 0 -> 596 bytes | |||
-rw-r--r-- | tests/auto/declarative/visual/qfxtext/elide/data-X11/multilength.qml | 303 | ||||
-rw-r--r-- | tests/auto/declarative/visual/qfxtext/elide/multilength.qml | 1 | ||||
-rw-r--r-- | tests/auto/declarative/visual/tst_visual.cpp | 2 |
13 files changed, 552 insertions, 94 deletions
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index 8733b2d..ec6a02f 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -58,12 +58,14 @@ When the user presses or releases a key, the following occurs: \o The key event is delivered by the scene to the QML \l Item with \e {active focus}. If no \l Item has \e {active focus}, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues. \o If the QML \l Item with \e {active focus} accepts the key event, propagation stops. Otherwise the event is "bubbled up", by recursively passing it to each \l Item's parent until either the event is accepted, or the root \l Item is reached. -If the \c {Rectangle} element in the following example has active focus and the \e A key is pressed, it will bubble up to the \c {KeyActions}. However, pressing the \e B key will bubble up to the root item and thus subsequently be \l {QEvent::ignore()}{ignored}. +If the \c {Rectangle} element in the following example has active focus and the \e A key is pressed, +it will bubble up to its parent. However, pressing the \e B key will bubble up to the root +item and thus subsequently be \l {QEvent::ignore()}{ignored}. \code Item { - KeyActions { - keyA: "print('Key A was pressed')" + Item { + Keys.onPressed: if (event.key == Qt.Key_A) { print('Key A was pressed'); event.accepted = true } Rectangle {} } } @@ -91,8 +93,8 @@ An \l Item requests focus by setting the \c {Item::focus} property to true. For very simple cases simply setting the \c {Item::focus} property is sometimes sufficient. If we run the following example in the \c qmlviewer, we see that -the \c {KeyActions} element has \e {active focus} and pressing the -\e A, \e B, or \e C keys modifies the text appropriately. +the \c {keyHandler} element has \e {active focus} and pressing the 'A', 'B' +or 'C' keys modifies the text appropriately. \table \row @@ -100,11 +102,17 @@ the \c {KeyActions} element has \e {active focus} and pressing the Rectangle { color: "lightsteelblue"; width: 240; height: 25 Text { id: myText } - KeyActions { + Item { + id: keyHandler focus: true - keyA: "myText.text = 'Key A was pressed'" - keyB: "myText.text = 'Key B was pressed'" - keyC: "myText.text = 'Key C was pressed'" + Keys.onPressed: { + if (event.key == Qt.Key_A) + myText.text = 'Key A was pressed' + else if (event.key == Qt.Key_B) + myText.text = 'Key B was pressed' + else if (event.key == Qt.Key_C) + myText.text = 'Key C was pressed' + } } } \endcode @@ -134,22 +142,34 @@ Rectangle { Rectangle { color: "lightsteelblue"; width: 240; height: 25 Text { id: myText } - KeyActions { + Item { + id: keyHandler focus: true - keyA: "myText.text = 'Key A was pressed'" - keyB: "myText.text = 'Key B was pressed'" - keyC: "myText.text = 'Key C was pressed'" + Keys.onPressed: { + if (event.key == Qt.Key_A) + myText.text = 'Key A was pressed' + else if (event.key == Qt.Key_B) + myText.text = 'Key B was pressed' + else if (event.key == Qt.Key_C) + myText.text = 'Key C was pressed' + } } } Rectangle { y: 30; focus: true color: "lightsteelblue"; width: 240; height: 25 Text { id: myText } - KeyActions { + Item { + id: keyHandler focus: true - keyA: "myText.text = 'Key A was pressed'" - keyB: "myText.text = 'Key B was pressed'" - keyC: "myText.text = 'Key C was pressed'" + Keys.onPressed: { + if (event.key == Qt.Key_A) + myText.text = 'Key A was pressed' + else if (event.key == Qt.Key_B) + myText.text = 'Key B was pressed' + else if (event.key == Qt.Key_C) + myText.text = 'Key C was pressed' + } } } } @@ -166,9 +186,9 @@ of \c {Item::focus} in the other two instances is reverted back to false. This is exactly the opposite of what was wanted! This problem is fundamentally one of visibility. The \c {MyWidget} -components each set their \c {KeyActions} as focused as that is all they can +components each set their \c {keyHandler} Items as focused as that is all they can do - they don't know how they are going to be used, but they do know that when -they're in use their \c {KeyActions} element is what needs focus. Likewise +they're in use their \c {keyHandler} element is what needs focus. Likewise the code that uses the \c {MyWidget}'s sets the second \c {MyWidget} as focused because, while it doesn't know exactly how the \c {MyWidget} is implemented, it knows that it wants the second one to be focused. No one piece @@ -191,11 +211,17 @@ FocusScope { Rectangle { color: "lightsteelblue"; width: 240; height: 25 Text { id: myText } - KeyActions { + Item { + id: keyHandler focus: true - keyA: "myText.text = 'Key A was pressed'" - keyB: "myText.text = 'Key B was pressed'" - keyC: "myText.text = 'Key C was pressed'" + Keys.onPressed: { + if (event.key == Qt.Key_A) + myText.text = 'Key A was pressed' + else if (event.key == Qt.Key_B) + myText.text = 'Key B was pressed' + else if (event.key == Qt.Key_C) + myText.text = 'Key C was pressed' + } } } } @@ -205,8 +231,11 @@ FocusScope { Conceptually \e {focus scopes} are quite simple. \list -\o Within each \e {focus scope} one element may have \c {Item::focus} set to true. If more than one \l Item has the \c {Item::focus} property set, the first is selected and the others are unset, just like when there are no \e {focus scopes}. -\o When a \e {focus scope} receives \e {active focus}, the contained element with \c {Item::focus} set (if any) also gets \e {active focus}. If this element is +\o Within each \e {focus scope} one element may have \c {Item::focus} set to true. +If more than one \l Item has the \c {Item::focus} property set, the first is selected +and the others are unset, just like when there are no \e {focus scopes}. +\o When a \e {focus scope} receives \e {active focus}, the contained element with +\c {Item::focus} set (if any) also gets \e {active focus}. If this element is also a \l FocusScope, the proxying behaviour continues. Both the \e {focus scope} and the sub-focused item will have \c {Item::focus} set. \endlist @@ -270,8 +299,11 @@ Rectangle { } delegate: FocusScope { width: contents.width; height: contents.height - Text { text: name } - KeyActions { return: "print(name)"; focus: true } + Text { + focus: true + text: name + Keys.onReturnPressed: print(name) + } } } } @@ -285,7 +317,7 @@ property. As the \l ListView is a \e {focus scope}, this doesn't effect the rest of the application. However, if the \l ListView itself has \e {active focus} this causes the delegate itself to receive \e {active focus}. In this example, the root element of the delegate is also a \e {focus scope}, -which in turn gives \e {active focus} to the \c {KeyActions} element that +which in turn gives \e {active focus} to the \c {Text} element that actually performs the work of handling the \e {Return} key. All of the QML view classes, such as \l PathView and \l GridView, behave diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index 18bcd69..2328c8a 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -60,4 +60,54 @@ Contains all the properties of the ECMAScript global object, plus: \section1 Offline Storage API +The \c openDatabase() and related functions +provide the ability to access local offline storage in an SQL database. + +These databases are user-specific and QML-specific. They are stored in the \c Databases subdirectory +of QmlEngine::offlineStoragePath(), currently as SQLite databases. + +The API is based on the HTML5 offline storage SQL draft API. The main difference is that this QML +API is currently synchronous. You should avoid relying on synchronicity to make your scripts more +portable, both to/from HTML5 and to future QML versions. + +The API can be used from JavaScript functions in your QML: + +\quotefile declarative/sql/hello.qml + +\section2 DbObject openDatabase(string name, string version, string description, int estimatedsize) + +Opens a database identified by the given \c name and \c version. +If a database with this name and version does not exist, it is created. The \c version should +always be "1.0" until schema upgrade semantics are defined. + +The \c description and \c estimatedsize are provided to allow application tools to give the user +control over the databases created, but are otherwise not used by QML. + +The returned DbObject has a \c transaction() method by which SQL transactions can be done. + +When a database is first created, an INI file is also created specifying its characteristics: + +\table +\header \o \bold {Key} \o \bold {Value} +\row \o Name \o The name of the database passed to \c openDatabase() +\row \o Version \o The version of the database passed to \c openDatabase() +\row \o Description \o The description of the database passed to \c openDatabase() +\row \o EstimatedSize \o The estimated size of the database passed to \c openDatabase() +\row \o DbType \o Currently "QSQLITE" +\endtable + +This data can be used by application tools. + + +\section2 void DbObject::transaction(function usesql(DbTxObject), function errorcb=0, function successcb=0) + +Executes \c usesql() in a database transaction. The \c DbTxObject object has a \c executeSql() method by which the +code of \c usesql can execute SQL. The optional second and third arguments are an error callback and success +callback respectively (note that the order of these is the opposite to DbTxObject::executeSql()). + +\section2 void DbTxObject::executeSql(string sql, function successcb=0, function errorcb=0) + +Executes \c sql as an SQL block. The optional second and third arguments are a success callback and error +callback respectively (note that the order of these is the opposite to DbObject::transaction()). + */ diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc index e88dfdc..a81eb0f 100644 --- a/doc/src/declarative/network.qdoc +++ b/doc/src/declarative/network.qdoc @@ -44,36 +44,61 @@ \title Network Transparency QML supports network transparency by using URLs (rather than file names) for all -references from a QML document to other content. Since a \i relative URL is the same -as a relative file, development of QML on regular file systems remains simple. +references from a QML document to other content: + +\qml +Image { + source: "http://www.example.com/images/logo.png" +} +\endqml + +Since a \e relative URL is the same +as a relative file, development of QML on regular file systems remains simple: + +\qml +Image { + source: "images/logo.png" +} +\endqml + +Network transparency is supported throughout QML, for example: + +\list +\o Scripts - the \c source property of \l Script is a URL +\o Fonts - the \c source property of FontLoader is a URL +\o WebViews - the \c url property of WebView (obviously!) +\endlist + +Even QML types themselves can be on the network - if \l qmlviewer is used to load +\tt http://example.com/mystuff/Hello.qml and that content refers to a type "World", this +will load from \tt http://example.com/mystuff/World.qml just as it would for a local file. +Any other resources that \tt Hello.qml referred to, usually by a relative URL, would +similarly be loaded from the network. -\section1 Accessing Network Resources from QML + +\section1 Relative vs. Absolute URLs Whenever an object has a property of type URL (QUrl), assigning a string to that property will actually assign an absolute URL - by resolving the string against the URL of the document where the string is used. -For example, consider this content in \c{http://example.com/mystuff/test.qml}: +For example, consider this content in \tt{http://example.com/mystuff/test.qml}: -\code +\qml Image { source: "images/logo.png" } -\endcode +\endqml -The \l Image source property will be assigned \c{http://example.com/mystuff/images/logo.png}, -but while the QML is being developed, in say \c C:\User\Fred\Documents\MyStuff\test.qml, it will be assigned -\c C:\User\Fred\Documents\MyStuff\images\logo.png. +The \l Image source property will be assigned \tt{http://example.com/mystuff/images/logo.png}, +but while the QML is being developed, in say \tt C:\User\Fred\Documents\MyStuff\test.qml, it will be assigned +\tt C:\User\Fred\Documents\MyStuff\images\logo.png. -Network transparency is supported throughout QML: +If the string assigned to a URL is already an absolute URL, then "resolving" does +not change it and the URL is assigned directly. -\list -\o Types - if the \c test.qml file above used "Hello { }", that would refer to \c http://example.com/mystuff/Hello.qml -\o Scripts - the \c source property of \l Script is a URL -\o Images - the \c source property of \l Image and similar types is a URL -\o Fonts - the \c source property of FontLoader is a URL -\o WebViews - the \c url property of WebView may be assigned a relative URL string -\endlist + +\section1 Progressive Loading Because of the declarative nature of QML and the asynchronous nature of network resources, objects which reference network resource generally change state as the network resource loads. @@ -89,16 +114,17 @@ Note that when objects reference local files they immediately have the \c Ready to remain network transparent should not rely on this. Future versions of QML may also use asynchronous local file I/O to improve performance. -\section1 Limitations -The \c import statement only works network transparently if it has an "as" clause. +\section1 Accessing Network Services + +QML types such as XmlListModel, and JavaScript classes like XMLHttpRequest are intended +entirely for accessing network services, which usually respond with references to +content by URLs that can then be used directly in QML. For example, using these facilities +to access an on-line photography service would provide the QML application with URLs to +photographs, which can be directly set on an \l Image \c source property. + +See the \tt demos/declarative/flickr for a real demonstration of this. -\list -\o \c{import "dir"} only works on local file systems -\o \c{import libraryUri} only works on local file systems -\o \c{import "dir" as D} works network transparently -\o \c{import libraryUrl as U} works network transparently -\endlist \section1 Configuring the Network Access Manager @@ -109,6 +135,7 @@ For example, the \l qmlviewer tool sets a new QNetworkAccessManager which trusts HTTP Expiry headers to avoid network cache checks, allows HTTP Pipelining, adds a persistent HTTP CookieJar, a simple disk cache, and supports proxy settings. + \section1 QRC Resources One of the URL schemes built into Qt is the "qrc" scheme. This allows content to be compiled into @@ -123,4 +150,17 @@ that is compiled into the executable: The content itself can then use relative URLs, and so be transparently unaware that the content is compiled into the executable. + +\section1 Limitations + +The \c import statement only works network transparently if it has an "as" clause. + +\list +\o \c{import "dir"} only works on local file systems +\o \c{import libraryUri} only works on local file systems +\o \c{import "dir" as D} works network transparently +\o \c{import libraryUrl as U} works network transparently +\endlist + + */ diff --git a/examples/declarative/sql/hello.qml b/examples/declarative/sql/hello.qml index db568a9..20ea611 100644 --- a/examples/declarative/sql/hello.qml +++ b/examples/declarative/sql/hello.qml @@ -2,28 +2,36 @@ import Qt 4.6 Text { Script { - function allGreetings() - { + function findGreetings() { var db = openDatabase("QmlExampleDB", "", "The Example QML SQL!", 1000000); - var r = "" - db.transaction(function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)', []); - tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); - tx.executeSql('SELECT * FROM Greeting', [], - function(tx, rs) { - for(var i = 0; i < rs.rows.length; i++) { - r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n" + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)', []); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + tx.executeSql('SELECT * FROM Greeting', [], + function(tx, rs) { + var r = "" + for(var i = 0; i < rs.rows.length; i++) { + r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n" + } + text = r + }, + function(tx, error) { + print("ERROR:", error.message) } - }, - function(tx, error) { - print("ERROR:", error.message) - } - ); - }) - - return r + ); + }, + function() { + print("ERROR in transaction"); + }, + function() { + print("Transaction successful"); + } + ) } } - text: allGreetings() + text: "?" + Component.onCompleted: findGreetings() } + diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index c775a00..8d34a98 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -228,11 +228,7 @@ void QUnifiedTimer::updateAnimationsTime() void QUnifiedTimer::restartAnimationTimer() { - if (runningLeafAnimations == 0 && !runningPauseAnimations.isEmpty()) { - int closestTimeToFinish = closestPauseAnimationTimeToFinish(); - animationTimer.start(closestTimeToFinish, this); - isPauseTimerActive = true; - } else if (!animationTimer.isActive() || isPauseTimerActive) { + if (!animationTimer.isActive()) { animationTimer.start(timingInterval, this); isPauseTimerActive = false; } @@ -328,7 +324,7 @@ int QUnifiedTimer::closestPauseAnimationTimeToFinish() int timeToFinish; if (animation->direction() == QAbstractAnimation::Forward) - timeToFinish = animation->totalDuration() - QAbstractAnimationPrivate::get(animation)->totalCurrentTime; + timeToFinish = animation->duration() - QAbstractAnimationPrivate::get(animation)->currentTime; else timeToFinish = QAbstractAnimationPrivate::get(animation)->totalCurrentTime; diff --git a/src/declarative/extra/qmlfontloader.cpp b/src/declarative/extra/qmlfontloader.cpp index 4a447de..2193b68 100644 --- a/src/declarative/extra/qmlfontloader.cpp +++ b/src/declarative/extra/qmlfontloader.cpp @@ -75,13 +75,13 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FontLoader,QmlFontLoader) \brief This item allows using fonts by name or url. Example: - \code + \qml FontLoader { id: FixedFont; name: "Courier" } FontLoader { id: WebFont; source: "http://www.mysite.com/myfont.ttf" } Text { text: "Fixed-size font"; font.family: FixedFont.name } Text { text: "Fancy font"; font.family: WebFont.name } - \endcode + \endqml */ QmlFontLoader::QmlFontLoader(QObject *parent) : QObject(*(new QmlFontLoaderPrivate), parent) diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp index b132c55..4a5983d 100644 --- a/src/declarative/qml/qmlsqldatabase.cpp +++ b/src/declarative/qml/qmlsqldatabase.cpp @@ -312,6 +312,9 @@ static QScriptValue qmlsqldatabase_transaction(QScriptContext *context, QScriptE } +/* + Currently documented in doc/src/declarastive/globalobject.qdoc +*/ static QScriptValue qmlsqldatabase_open(QScriptContext *context, QScriptEngine *engine) { QSqlDatabase database; @@ -343,6 +346,7 @@ static QScriptValue qmlsqldatabase_open(QScriptContext *context, QScriptEngine * ini.setValue(QLatin1String("Version"), dbversion); ini.setValue(QLatin1String("Description"), dbdescription); ini.setValue(QLatin1String("EstimatedSize"), dbestimatedsize); + ini.setValue(QLatin1String("DbType"), QLatin1String("QSQLITE")); database.open(); } diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp index 98facd9..7e4e992 100644 --- a/src/declarative/util/qmlstate.cpp +++ b/src/declarative/util/qmlstate.cpp @@ -350,7 +350,6 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever if (action.event) { if (!action.event->isReversable()) continue; - action.event->saveOriginals(); for (jj = 0; jj < d->revertList.count(); ++jj) { ActionEvent *event = d->revertList.at(jj).event; if (event && event->typeName() == action.event->typeName()) { @@ -360,6 +359,8 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever } } } + if (!found || action.event != d->revertList.at(jj).event) + action.event->saveOriginals(); } else { action.fromBinding = action.property.binding(); diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index 60fd421..053cdc3 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -70,10 +70,11 @@ public: void QmlParentChangePrivate::doChange(QFxItem *targetParent, QFxItem *stackBefore) { if (targetParent && target && target->parentItem()) { - //### for backwards direction, we can just restore original x, y, scale, rotation + //### for backwards direction, can we just restore original x, y, scale, rotation Q_Q(QmlParentChange); - const QTransform &transform = target->itemTransform(targetParent); - if (transform.type() >= QTransform::TxShear) { + bool ok; + const QTransform &transform = target->itemTransform(targetParent, &ok); + if (transform.type() >= QTransform::TxShear || !ok) { qmlInfo(QObject::tr("Unable to preserve appearance under complex transform"), q); } @@ -82,25 +83,49 @@ void QmlParentChangePrivate::doChange(QFxItem *targetParent, QFxItem *stackBefor if (transform.type() != QTransform::TxRotate) { if (transform.m11() == transform.m22()) scale = transform.m11(); - else + else { qmlInfo(QObject::tr("Unable to preserve appearance under non-uniform scale"), q); + ok = false; + } } else if (transform.type() == QTransform::TxRotate) { if (transform.m11() == transform.m22()) scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12()); - else + else { qmlInfo(QObject::tr("Unable to preserve appearance under non-uniform scale"), q); + ok = false; + } if (scale != 0) rotation = atan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI; - else + else { qmlInfo(QObject::tr("Unable to preserve appearance under scale of 0"), q); + ok = false; + } } + + qreal xt = transform.dx(); + qreal yt = transform.dy(); + if (target->transformOrigin() != QFxItem::TopLeft) { + qreal tempxt = target->transformOriginPoint().x(); + qreal tempyt = target->transformOriginPoint().y(); + QTransform t; + t.translate(-tempxt, -tempyt); + t.rotate(rotation); + t.scale(scale, scale); + t.translate(tempxt, tempyt); + QPointF offset = t.map(QPointF(0,0)); + xt += offset.x(); + yt += offset.y(); + } + target->setParentItem(targetParent); - //qDebug() << transform.dx() << transform.dy() << rotation << scale; - target->setX(transform.dx()); - target->setY(transform.dy()); - target->setRotation(rotation); - target->setScale(scale); + if (ok) { + //qDebug() << xt << yt << rotation << scale; + target->setX(xt); + target->setY(yt); + target->setRotation(rotation); + target->setScale(scale); + } } else if (target) { target->setParentItem(targetParent); } diff --git a/tests/auto/declarative/visual/qfxtext/elide/data-X11/multilength.0.png b/tests/auto/declarative/visual/qfxtext/elide/data-X11/multilength.0.png Binary files differnew file mode 100644 index 0000000..6d3931c --- /dev/null +++ b/tests/auto/declarative/visual/qfxtext/elide/data-X11/multilength.0.png diff --git a/tests/auto/declarative/visual/qfxtext/elide/data-X11/multilength.qml b/tests/auto/declarative/visual/qfxtext/elide/data-X11/multilength.qml new file mode 100644 index 0000000..a43fcdd --- /dev/null +++ b/tests/auto/declarative/visual/qfxtext/elide/data-X11/multilength.qml @@ -0,0 +1,303 @@ +import Qt.VisualTest 4.6 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "0d036aed3200afec73b1fc10cda324af" + } + Frame { + msec: 32 + hash: "e117576c30a5bebb866ee8e0d596f510" + } + Frame { + msec: 48 + hash: "2a00d57edee71da236ef9a041e7ed0d6" + } + Frame { + msec: 64 + hash: "fa326ddfc21828d98dd38964c6e9b09b" + } + Frame { + msec: 80 + hash: "02d3d8f626f0a3afd57affce32f10cff" + } + Frame { + msec: 96 + hash: "81abd357826e75917f5cb3758c0cdd4a" + } + Frame { + msec: 112 + hash: "3c544d599c735224bda95a3a9cbf413f" + } + Frame { + msec: 128 + hash: "59ef105daf3d509ab17b618fc761b4dc" + } + Frame { + msec: 144 + hash: "f61d62a092cc1adf7576992d285eb60a" + } + Frame { + msec: 160 + hash: "8c0f2f793ea61df2dff38ac609365da1" + } + Frame { + msec: 176 + hash: "28f9372f9ecfd6c33e5578ea2b8bd202" + } + Frame { + msec: 192 + hash: "129757726f161c58ad52c8a2bb8ff54d" + } + Frame { + msec: 208 + hash: "517aa84afac3efea0b21fff497951e69" + } + Frame { + msec: 224 + hash: "fce8967bf12f6525b21c644aaca2fffd" + } + Frame { + msec: 240 + hash: "926108bca8cb3a21b29207e0dca29d9d" + } + Frame { + msec: 256 + hash: "41c0d7a87ad0995c3343f9e2bee558a4" + } + Frame { + msec: 272 + hash: "7992a2eb7a561aa28a9a2f693dab0d5f" + } + Frame { + msec: 288 + hash: "b2712c6162cea59cfd18966713252512" + } + Frame { + msec: 304 + hash: "1fa71faa48d7f414a4a6b93214a39a44" + } + Frame { + msec: 320 + hash: "f1ffc3a012ae78f88a5f698944f605a2" + } + Frame { + msec: 336 + hash: "62dfc0e3846e7641453f6bf077bb0671" + } + Frame { + msec: 352 + hash: "167f30be62b60eb0e08af046fe18fbb7" + } + Frame { + msec: 368 + hash: "1e441db0c591642ce9c0457436708d13" + } + Frame { + msec: 384 + hash: "f4400c089b8e4391c6827323333ef733" + } + Frame { + msec: 400 + hash: "6b4e44cb73c62dd833cf52391e8b55a2" + } + Frame { + msec: 416 + hash: "12286364840fa446009a9005ca0b25fe" + } + Frame { + msec: 432 + hash: "67971a61bfe3113dcf7404137d58cc65" + } + Frame { + msec: 448 + hash: "3ff170f552466fa3a0494fc489363f68" + } + Frame { + msec: 464 + hash: "c946293a166077db9426757b2e393006" + } + Frame { + msec: 480 + hash: "14d716e18c7fa7d27b69c93d815df9b9" + } + Frame { + msec: 496 + hash: "7bc490a27378ab400658bff0334cb7dd" + } + Frame { + msec: 512 + hash: "2a3bd86f88aeb8f09f6feea8ba282942" + } + Frame { + msec: 528 + hash: "1ad04b814df09f9a1c672da659ff7390" + } + Frame { + msec: 544 + hash: "05a4b8bf3ceb70a01d33a5692467bd7e" + } + Frame { + msec: 560 + hash: "aca0effde610ed1c216b138a7dfe407f" + } + Frame { + msec: 576 + hash: "296b234ae49eaae3548c7d31447c0765" + } + Frame { + msec: 592 + hash: "1254ac81bb961f210dd14cfa650da680" + } + Frame { + msec: 608 + hash: "2b6a03813152cd87469b351339690736" + } + Frame { + msec: 624 + hash: "12080186fcdd5b9e73720f267cdf1065" + } + Frame { + msec: 640 + hash: "0cf99a1742df091f0715489d7a54bcd8" + } + Frame { + msec: 656 + hash: "bbbde5370000d3bec9872eab0d2c0bd0" + } + Frame { + msec: 672 + hash: "32cb6332b3028ef515ce328450769bd7" + } + Frame { + msec: 688 + hash: "9696c6ea620e833cc1290710895d164f" + } + Frame { + msec: 704 + hash: "cce4fc1f40467d22a1a05ec005cad93a" + } + Frame { + msec: 720 + hash: "5466c6bec6b3b0eee159ffcb5ad1130c" + } + Frame { + msec: 736 + hash: "2d8ccdca543eb52b1f5f947490d284c5" + } + Frame { + msec: 752 + hash: "a72cf61a2e5c70cbdb2b9e99d588ffe1" + } + Frame { + msec: 768 + hash: "2885a4a60d231b8bed4f444f110cd735" + } + Frame { + msec: 784 + hash: "4167cbe045e6f922797eeed9378e96b6" + } + Frame { + msec: 800 + hash: "2a903361ed6c58659741274eac6c19f4" + } + Frame { + msec: 816 + hash: "e98ad2f87ebb183832efba5954228bea" + } + Frame { + msec: 832 + hash: "e875b1d4412fd8a86a6e71b08c078fe0" + } + Frame { + msec: 848 + hash: "6fb0d9e4237a74552b9067c288e0d5dd" + } + Frame { + msec: 864 + hash: "a64b5a60fe0184b4e439b157409f7567" + } + Frame { + msec: 880 + hash: "102d5f88cf9ae13af9983936dbc2ecae" + } + Frame { + msec: 896 + hash: "e1d58edd9cdc3902af02c263b9b357a1" + } + Frame { + msec: 912 + hash: "d8a934c488f1e80ed49108b360022576" + } + Frame { + msec: 928 + hash: "d918eae34d503a0c3669fa0b5fbd7dad" + } + Frame { + msec: 944 + hash: "bba616d8933bb054735e235782689c95" + } + Frame { + msec: 960 + image: "multilength.0.png" + } + Frame { + msec: 976 + hash: "12b8f8889033ecddabf0b20585157a5e" + } + Frame { + msec: 992 + hash: "afe7a8d6184f9ebef435e1857a7f08b2" + } + Frame { + msec: 1008 + hash: "d222b51d852e63a9e2401c57b86c17f7" + } + Frame { + msec: 1024 + hash: "36196bcde10012a2e0624ae062da5fdb" + } + Frame { + msec: 1040 + hash: "e4cb79b57774c652c3bcf86b7e8cbce9" + } + Frame { + msec: 1056 + hash: "79c040be179aa486c6a3e2a5198944af" + } + Frame { + msec: 1072 + hash: "4334a272bed3fdaa1e44bb81c55d3e3a" + } + Frame { + msec: 1088 + hash: "5aeebf849fb7101b87ec699c4590a348" + } + Frame { + msec: 1104 + hash: "c18780619ee3069f2ba17d00b85d6941" + } + Frame { + msec: 1120 + hash: "ef17d1d1b566fc0e51cef54e3f460b91" + } + Frame { + msec: 1136 + hash: "2c76668596c354dadea513325b79d14e" + } + Frame { + msec: 1152 + hash: "6055f676c9fa2a3333301e6dac958b34" + } + Frame { + msec: 1168 + hash: "3fc9e199eac26907d95381e064c0e5cd" + } + Frame { + msec: 1184 + hash: "60edfb3a25700ead1795e226015eb229" + } +} diff --git a/tests/auto/declarative/visual/qfxtext/elide/multilength.qml b/tests/auto/declarative/visual/qfxtext/elide/multilength.qml index 6cd37b4..fa74cc4 100644 --- a/tests/auto/declarative/visual/qfxtext/elide/multilength.qml +++ b/tests/auto/declarative/visual/qfxtext/elide/multilength.qml @@ -13,7 +13,6 @@ Rectangle { id: MyText width: NumberAnimation { from: 500; to: 0; running: true; repeat: true; duration: 1000 } elide: "ElideRight" - text: "aaaaaaa bbbbbbb ccccccc\x9Caaaaa bbbbb ccccc\x9Caaa bbb ccc\x9Ca b c" text: "Brevity is the soul of wit, and tediousness the limbs and outward flourishes.\x9CBrevity is a great charm of eloquence.\x9CBe concise!\x9CSHHHHHHHHHHHHHHHHHHHHHHHHHHHH" } } diff --git a/tests/auto/declarative/visual/tst_visual.cpp b/tests/auto/declarative/visual/tst_visual.cpp index cb32085..a9f4740 100644 --- a/tests/auto/declarative/visual/tst_visual.cpp +++ b/tests/auto/declarative/visual/tst_visual.cpp @@ -112,7 +112,7 @@ QString tst_visual::toTestScript(const QString &file, Mode mode) QString("data"); QString testname = file.mid(index + 1, file.length() - index - 5); - if (platformsuffix && (mode == UpdatePlatformVisuals || QFile::exists(testdata+QLatin1String(platformsuffix)+QDir::separator()+testname))) { + if (platformsuffix && (mode == UpdatePlatformVisuals || QFile::exists(testdata+QLatin1String(platformsuffix)+QDir::separator()+testname+".qml"))) { QString platformdir = testdata + QLatin1String(platformsuffix); if (mode == UpdatePlatformVisuals) { Q_ASSERT(QDir().mkpath(platformdir)); |