From 155065cd5c611e2d14357a8ff3180ac14a68e3a0 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 2 Nov 2010 10:41:25 +1000 Subject: Removing a binding while it is being applied caused a crash. Use a weak pointer to the binding in case applying the binding (while fast forwarding) causes it to be removed. Task-number: QTBUG-14830 Reviewed-by: Michael Brasser --- src/declarative/util/qdeclarativestate.cpp | 12 ++++----- src/declarative/util/qdeclarativestate_p.h | 3 ++- src/declarative/util/qdeclarativestate_p_p.h | 2 +- .../util/qdeclarativetransitionmanager.cpp | 16 ++++++------ .../qdeclarativestates/data/QTBUG-14830.qml | 29 ++++++++++++++++++++++ .../qdeclarativestates/tst_qdeclarativestates.cpp | 13 ++++++++++ 6 files changed, 59 insertions(+), 16 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 0f5413e..3915485 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG); QDeclarativeAction::QDeclarativeAction() -: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), fromBinding(0), toBinding(0), event(0), +: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), fromBinding(0), event(0), specifiedObject(0) { } @@ -67,7 +67,7 @@ QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyN const QVariant &value) : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), property(target, propertyName), toValue(value), - fromBinding(0), toBinding(0), event(0), + fromBinding(0), event(0), specifiedObject(target), specifiedProperty(propertyName) { if (property.isValid()) @@ -78,7 +78,7 @@ QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyN QDeclarativeContext *context, const QVariant &value) : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), property(target, propertyName, context), toValue(value), - fromBinding(0), toBinding(0), event(0), + fromBinding(0), event(0), specifiedObject(target), specifiedProperty(propertyName) { if (property.isValid()) @@ -503,11 +503,11 @@ void QDeclarativeState::addEntriesToRevertList(const QList & const QDeclarativeAction &action = actionListIterator.next(); QDeclarativeSimpleAction simpleAction(action); action.property.write(action.toValue); - if (action.toBinding) { + if (!action.toBinding.isNull()) { QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); if (oldBinding) QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); - QDeclarativePropertyPrivate::setBinding(simpleAction.property(), action.toBinding, QDeclarativePropertyPrivate::DontRemoveBinding); + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), action.toBinding.data(), QDeclarativePropertyPrivate::DontRemoveBinding); } simpleActionList.append(simpleAction); @@ -675,7 +675,7 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit a.property = d->revertList.at(ii).property(); a.fromValue = cur; a.toValue = d->revertList.at(ii).value(); - a.toBinding = d->revertList.at(ii).binding(); + a.toBinding = QDeclarativeAbstractBinding::getPointer(d->revertList.at(ii).binding()); a.specifiedObject = d->revertList.at(ii).specifiedObject(); a.specifiedProperty = d->revertList.at(ii).specifiedProperty(); a.event = d->revertList.at(ii).event(); diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h index fc7c940..7b9c18a 100644 --- a/src/declarative/util/qdeclarativestate_p.h +++ b/src/declarative/util/qdeclarativestate_p.h @@ -45,6 +45,7 @@ #include #include #include +#include #include QT_BEGIN_HEADER @@ -75,7 +76,7 @@ public: QVariant toValue; QDeclarativeAbstractBinding *fromBinding; - QDeclarativeAbstractBinding *toBinding; + QDeclarativeAbstractBinding::Pointer toBinding; QDeclarativeActionEvent *event; //strictly for matching diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h index 4fd8f21..98c3f7b 100644 --- a/src/declarative/util/qdeclarativestate_p_p.h +++ b/src/declarative/util/qdeclarativestate_p_p.h @@ -85,7 +85,7 @@ public: m_reverseEvent = true; } else { m_value = a.toValue; - m_binding = QDeclarativeAbstractBinding::getPointer(a.toBinding); + m_binding = a.toBinding; m_reverseEvent = false; } } diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp index 89b0044..d19e6f2 100644 --- a/src/declarative/util/qdeclarativetransitionmanager.cpp +++ b/src/declarative/util/qdeclarativetransitionmanager.cpp @@ -99,8 +99,8 @@ void QDeclarativeTransitionManager::complete() void QDeclarativeTransitionManagerPrivate::applyBindings() { foreach(const QDeclarativeAction &action, bindingsList) { - if (action.toBinding) { - QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding); + if (!action.toBinding.isNull()) { + QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding.data()); } else if (action.event) { if (action.reverseEvent) action.event->reverse(); @@ -145,8 +145,8 @@ void QDeclarativeTransitionManager::transition(const QList & // Apply all the property and binding changes for (int ii = 0; ii < applyList.size(); ++ii) { const QDeclarativeAction &action = applyList.at(ii); - if (action.toBinding) { - QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + if (!action.toBinding.isNull()) { + QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding.data(), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } else if (!action.event) { QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } else if (action.event->isReversable()) { @@ -165,7 +165,7 @@ void QDeclarativeTransitionManager::transition(const QList & continue; } const QDeclarativeProperty &prop = action->property; - if (action->toBinding || !action->toValue.isValid()) { + if (!action->toBinding.isNull() || !action->toValue.isValid()) { action->toValue = prop.read(); } } @@ -259,10 +259,10 @@ void QDeclarativeTransitionManager::cancel() for(int i = 0; i < d->bindingsList.count(); ++i) { QDeclarativeAction action = d->bindingsList[i]; - if (action.toBinding && action.deletableToBinding) { + if (!action.toBinding.isNull() && action.deletableToBinding) { QDeclarativePropertyPrivate::setBinding(action.property, 0); - action.toBinding->destroy(); - action.toBinding = 0; + action.toBinding.data()->destroy(); + action.toBinding.clear(); action.deletableToBinding = false; } else if (action.event) { //### what do we do here? diff --git a/tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml b/tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml new file mode 100644 index 0000000..5eccdda --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml @@ -0,0 +1,29 @@ +import Qt 4.7 + +Rectangle { + width: 1024 + height: 768 + + Item { + id: area + objectName: "area" + property int numx: 6 + property int cellwidth: 1024/numx + + onWidthChanged: { + width = width>1024?1024:width; + } + + state: 'minimal' + states: [ + State { + name: 'minimal' + PropertyChanges { + target: area + width: cellwidth + } + } + ] + + } +} diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 0d10c10..b8409a5 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -143,6 +143,7 @@ private slots: void returnToBase(); void extendsBug(); void editProperties(); + void QTBUG_14830(); }; void tst_qdeclarativestates::initTestCase() @@ -1375,6 +1376,18 @@ void tst_qdeclarativestates::editProperties() QCOMPARE(childRect->height(), qreal(40)); } +void tst_qdeclarativestates::QTBUG_14830() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent c(&engine, SRCDIR "/data/QTBUG-14830.qml"); + QDeclarativeRectangle *rect = qobject_cast(c.create()); + QVERIFY(rect != 0); + QDeclarativeItem *item = rect->findChild("area"); + + QCOMPARE(item->width(), qreal(171)); +} + QTEST_MAIN(tst_qdeclarativestates) #include "tst_qdeclarativestates.moc" -- cgit v0.12 From 11bb4f85ef38270758ec0930709c23c7fcb5840c Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Tue, 2 Nov 2010 16:41:01 +1000 Subject: Regression: Text element breaks when using \n for separating lines Task-number: QTBUG-14915 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativetext.cpp | 24 ++-- .../qdeclarativetext/font/data-MAC/plaintext2.qml | 131 +++++++++++++++++++++ .../qmlvisual/qdeclarativetext/font/plaintext2.qml | 22 ++++ 3 files changed, 165 insertions(+), 12 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 03c9765..8cb47aa 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -291,30 +291,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/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
Second line"; textFormat: Text.StyledText + } + } +} -- cgit v0.12 From b2016bbfc9c7389e7b64451417395ceba96af21f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 2 Nov 2010 13:07:01 +0100 Subject: Qml Debugging: Only enable if explicitly requested Enable the remote debugging of QDeclarativeEngines only after QDeclarativeDebugHelper::enableDebugging() has been called. Approved by 4.7 Program Team. Reviewed-by: Alessandro Portale Task-number: QTBUG-13762 --- src/declarative/debugger/qdeclarativedebughelper.cpp | 8 ++++++++ src/declarative/debugger/qdeclarativedebughelper_p.h | 4 ++++ src/declarative/debugger/qdeclarativedebugservice.cpp | 7 +++++++ src/declarative/qml/qdeclarativeengine.cpp | 1 + src/declarative/qml/qdeclarativeengine_p.h | 2 ++ src/s60installs/bwins/QtDeclarativeu.def | 3 ++- src/s60installs/eabi/QtDeclarativeu.def | 3 ++- .../auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp | 5 ++++- .../qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp | 5 ++++- .../private_headers/qdeclarativedebughelper_p.h | 4 ++++ .../qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp | 7 +++++++ .../qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp | 4 ++++ 12 files changed, 49 insertions(+), 4 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 #include +#include 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 #include @@ -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/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 #include #include +#include #include "../../../shared/util.h" #include "../shared/debugutil_p.h" @@ -278,8 +279,10 @@ void tst_QDeclarativeDebug::initTestCase() { qRegisterMetaType(); - 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 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 #include #include +#include #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 #include +#include #include #include @@ -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); -- cgit v0.12 From af15292e4982c11542487d39fc76ccfb8516598f Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 3 Nov 2010 14:55:46 +1000 Subject: Regression: QDeclarativeText does not update when text turns empty Task-number: QTBUG-14865 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativetext.cpp | 1 + .../graphicsitems/qdeclarativetextlayout.cpp | 13 + .../graphicsitems/qdeclarativetextlayout_p.h | 1 + .../qdeclarativetext/data-MAC/qtbug_14865.0.png | Bin 0 -> 1695 bytes .../qdeclarativetext/data-MAC/qtbug_14865.1.png | Bin 0 -> 625 bytes .../qdeclarativetext/data-MAC/qtbug_14865.qml | 719 +++++++++++++++++++++ .../qmlvisual/qdeclarativetext/qtbug_14865.qml | 17 + 7 files changed, 751 insertions(+) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 8cb47aa..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(); 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/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png new file mode 100644 index 0000000..a947584 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png 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 new file mode 100644 index 0000000..84430bb Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png differ 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/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 = "" + } +} -- cgit v0.12 From 648eb76c22762c510815305e9e495db2aee9d2ad Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 3 Nov 2010 16:18:11 +1000 Subject: Combining ListView.StrictlyEnforceRange and resizing currentItem stalls. There were two problems. 1) layout() called fixup() was called while the view was being flicked. 2) the snapping code was incorrect (and duplicated). Task-number: QTBUG-14821 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativeflickable.cpp | 9 +- .../graphicsitems/qdeclarativeflickable_p_p.h | 3 + .../graphicsitems/qdeclarativelistview.cpp | 62 +- .../qmlvisual/ListView/data/enforcerange.0.png | Bin 0 -> 680 bytes .../qmlvisual/ListView/data/enforcerange.1.png | Bin 0 -> 704 bytes .../qmlvisual/ListView/data/enforcerange.2.png | Bin 0 -> 695 bytes .../qmlvisual/ListView/data/enforcerange.3.png | Bin 0 -> 680 bytes .../qmlvisual/ListView/data/enforcerange.4.png | Bin 0 -> 701 bytes .../qmlvisual/ListView/data/enforcerange.5.png | Bin 0 -> 704 bytes .../qmlvisual/ListView/data/enforcerange.qml | 2119 ++++++++++++++++++++ .../qmlvisual/ListView/enforcerange.qml | 31 + 11 files changed, 2181 insertions(+), 43 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/ListView/data/enforcerange.0.png create mode 100644 tests/auto/declarative/qmlvisual/ListView/data/enforcerange.1.png create mode 100644 tests/auto/declarative/qmlvisual/ListView/data/enforcerange.2.png create mode 100644 tests/auto/declarative/qmlvisual/ListView/data/enforcerange.3.png create mode 100644 tests/auto/declarative/qmlvisual/ListView/data/enforcerange.4.png create mode 100644 tests/auto/declarative/qmlvisual/ListView/data/enforcerange.5.png create mode 100644 tests/auto/declarative/qmlvisual/ListView/data/enforcerange.qml create mode 100644 tests/auto/declarative/qmlvisual/ListView/enforcerange.qml diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index b737785..01a8585 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -53,9 +53,6 @@ QT_BEGIN_NAMESPACE // before we perform a flick. static const int FlickThreshold = 20; -// Really slow flicks can be annoying. -static const int MinimumFlickVelocity = 75; - QDeclarativeFlickableVisibleArea::QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent) : QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.) , m_yPosition(0.), m_heightRatio(0.) @@ -990,8 +987,8 @@ void QDeclarativeFlickable::viewportMoved() { Q_D(QDeclarativeFlickable); - qreal prevY = d->lastFlickablePosition.x(); - qreal prevX = d->lastFlickablePosition.y(); + qreal prevX = d->lastFlickablePosition.x(); + qreal prevY = d->lastFlickablePosition.y(); d->velocityTimeline.clear(); if (d->pressed || d->calcVelocity) { int elapsed = QDeclarativeItemPrivate::restart(d->velocityTime); @@ -1012,7 +1009,7 @@ void QDeclarativeFlickable::viewportMoved() } } - d->lastFlickablePosition = QPointF(d->vData.move.value(), d->hData.move.value()); + d->lastFlickablePosition = QPointF(d->hData.move.value(), d->vData.move.value()); d->vTime = d->timeline.time(); d->updateBeginningEnd(); diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h index afefde2..92cf748 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h @@ -66,6 +66,9 @@ QT_BEGIN_NAMESPACE +// Really slow flicks can be annoying. +const qreal MinimumFlickVelocity = 75.0; + class QDeclarativeFlickableVisibleArea; class QDeclarativeFlickablePrivate : public QDeclarativeItemPrivate, public QDeclarativeItemChangeListener { diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 38a4839..eab66d8 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -334,28 +334,9 @@ public: return model && model->count() && model->isValid(); } - int snapIndex() { - int index = currentIndex; - for (int i = 0; i < visibleItems.count(); ++i) { - FxListItem *item = visibleItems[i]; - if (item->index == -1) - continue; - qreal itemTop = item->position(); - if (itemTop >= highlight->position()-item->size()/2 && itemTop < highlight->position()+item->size()/2) - return item->index; - } - return index; - } - qreal snapPosAt(qreal pos) { - for (int i = 0; i < visibleItems.count(); ++i) { - FxListItem *item = visibleItems[i]; - if (item->index == -1) - continue; - qreal itemTop = item->position(); - if (itemTop+item->size()/2 >= pos && itemTop <= pos) - return item->position(); - } + if (FxListItem *snapItem = snapItemAt(pos)) + return snapItem->position(); if (visibleItems.count()) { qreal firstPos = visibleItems.first()->position(); qreal endPos = visibleItems.last()->position(); @@ -368,17 +349,18 @@ public: } FxListItem *snapItemAt(qreal pos) { + FxListItem *snapItem = 0; for (int i = 0; i < visibleItems.count(); ++i) { FxListItem *item = visibleItems[i]; if (item->index == -1) continue; qreal itemTop = item->position(); - if (item->index == model->count()-1 || (itemTop+item->size()/2 >= pos)) + if (highlight && itemTop >= pos && item->endPosition() <= pos + highlight->size() - 1) return item; + if (itemTop+item->size()/2 >= pos && itemTop-item->size()/2 < pos) + snapItem = item; } - if (visibleItems.count() && visibleItems.first()->position() <= pos) - return visibleItems.first(); - return 0; + return snapItem; } int lastVisibleIndex() const { @@ -768,8 +750,10 @@ void QDeclarativeListViewPrivate::layout() minExtentDirty = true; maxExtentDirty = true; updateHighlight(); - fixupPosition(); - q->refill(); + if (!q->isMoving() && !q->isFlicking()) { + fixupPosition(); + q->refill(); + } if (header) updateHeader(); if (footer) @@ -1350,12 +1334,15 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m qreal newtarget = data.flickTarget; if (snapMode != QDeclarativeListView::NoSnap || highlightRange == QDeclarativeListView::StrictlyEnforceRange) newtarget = -snapPosAt(-(data.flickTarget - highlightRangeStart)) + highlightRangeStart; - if (velocity < 0 && newtarget < maxExtent) - newtarget = maxExtent; - else if (velocity > 0 && newtarget > minExtent) - newtarget = minExtent; - if (newtarget == data.flickTarget) // boundary unchanged - nothing to do + if (velocity < 0 && newtarget <= maxExtent) + newtarget = maxExtent - overshootDist; + else if (velocity > 0 && newtarget >= minExtent) + newtarget = minExtent + overshootDist; + if (newtarget == data.flickTarget) { // boundary unchanged - nothing to do + if (qAbs(velocity) < MinimumFlickVelocity) + correctFlick = false; return; + } data.flickTarget = newtarget; qreal dist = -newtarget + data.move.value(); if ((v < 0 && dist < 0) || (v > 0 && dist > 0)) { @@ -1365,7 +1352,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m return; } timeline.reset(data.move); - timeline.accelDistance(data.move, v, -dist + (v < 0 ? -overshootDist : overshootDist)); + timeline.accelDistance(data.move, v, -dist); timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this)); } } else { @@ -1696,7 +1683,7 @@ void QDeclarativeListView::setCurrentIndex(int index) if (isComponentComplete() && d->isValid()) { d->moveReason = QDeclarativeListViewPrivate::SetIndex; d->updateCurrent(index); - } else { + } else if (d->currentIndex != index) { d->currentIndex = index; emit currentIndexChanged(); } @@ -2323,9 +2310,10 @@ void QDeclarativeListView::viewportMoved() d->highlight->setPosition(qRound(pos)); // update current index - int idx = d->snapIndex(); - if (idx >= 0 && idx != d->currentIndex) - d->updateCurrent(idx); + if (FxListItem *snapItem = d->snapItemAt(d->highlight->position())) { + if (snapItem->index >= 0 && snapItem->index != d->currentIndex) + d->updateCurrent(snapItem->index); + } } } diff --git a/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.0.png b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.0.png new file mode 100644 index 0000000..d466434 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.0.png differ diff --git a/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.1.png b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.1.png new file mode 100644 index 0000000..45d9712 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.1.png differ diff --git a/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.2.png b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.2.png new file mode 100644 index 0000000..3f05a5e Binary files /dev/null and b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.2.png differ diff --git a/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.3.png b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.3.png new file mode 100644 index 0000000..d466434 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.3.png differ diff --git a/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.4.png b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.4.png new file mode 100644 index 0000000..c902676 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.4.png differ diff --git a/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.5.png b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.5.png new file mode 100644 index 0000000..45d9712 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.5.png differ diff --git a/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.qml b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.qml new file mode 100644 index 0000000..c15b657 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/ListView/data/enforcerange.qml @@ -0,0 +1,2119 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 32 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 48 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 64 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 80 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 96 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 112 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 128 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 144 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 160 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 176 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 192 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 208 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 224 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 240 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 256 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 272 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 288 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 304 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 320 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 336 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 352 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 368 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 384 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 400 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 416 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 432 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 448 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 464 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 480 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 496 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 512 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 528 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 544 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 560 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 576 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 592 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 608 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 624 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 640 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 656 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 672 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 688 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 704 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 720 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 736 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 752 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 768 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 784 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 800 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 816 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 832 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 848 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 864 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 880 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 896 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 912 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 928 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 944 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 960 + image: "enforcerange.0.png" + } + Frame { + msec: 976 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 992 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1008 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1024 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1040 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1056 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1072 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1088 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1104 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1120 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1136 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1152 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1168 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1184 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1200 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 77; y: 157 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1216 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1232 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 1248 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 77; y: 156 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1264 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 77; y: 154 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 76; y: 151 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1280 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 75; y: 144 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 74; y: 136 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1296 + hash: "c7667b5af9f2ee912abe5879266cb1e0" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 73; y: 131 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 72; y: 122 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1312 + hash: "1e762d6ffe1ceb53046d7953645d02d5" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 71; y: 118 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 71; y: 111 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1328 + hash: "0d2b7130a84a8efac1cf4fe8a1768231" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 71; y: 108 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 71; y: 102 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1344 + hash: "6ef2715c3fd26d50d26fb740afa6dece" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 71; y: 98 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 71; y: 92 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 71; y: 92 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1360 + hash: "f489b6f951281ff9a981ec046ca5b17d" + } + Frame { + msec: 1376 + hash: "fd6e7d7db7c4571ee606269fb9680ed9" + } + Frame { + msec: 1392 + hash: "398a238f59a2edf07870b624b914c81d" + } + Frame { + msec: 1408 + hash: "fdce64faab7e7e31a229adda47924cd1" + } + Frame { + msec: 1424 + hash: "8d474956331fdd0c35beb13a06b7c557" + } + Frame { + msec: 1440 + hash: "f89fed6f7fa07a8320f07a1e68240a7e" + } + Frame { + msec: 1456 + hash: "940b70f15082ff138579892bb6f20ce9" + } + Frame { + msec: 1472 + hash: "35ab744ce2a91567dbbd769f9486f870" + } + Frame { + msec: 1488 + hash: "6b2d32b8f1df871c2c014af8b5d87329" + } + Frame { + msec: 1504 + hash: "edf3b33b80cca53999779555f9cd6162" + } + Frame { + msec: 1520 + hash: "180f3cc4ea5ff5b6f9e8be0294732d4e" + } + Frame { + msec: 1536 + hash: "28e9ca60a873910380b2d22d6b3df565" + } + Frame { + msec: 1552 + hash: "3bb1e8d69f171f09eb4c6f9914fc9576" + } + Frame { + msec: 1568 + hash: "0501da09be444df6cee4b19617290317" + } + Frame { + msec: 1584 + hash: "8ce1ac0163b0353167488aff2879e841" + } + Frame { + msec: 1600 + hash: "18e53bf6337cf6590fc3c73c00469d8e" + } + Frame { + msec: 1616 + hash: "0c31ede980d07069f4977d5753d00ddf" + } + Frame { + msec: 1632 + hash: "0a854a54176c24f0ebbb6cb747dc0ab7" + } + Frame { + msec: 1648 + hash: "8dba1ebca6f00b7a64a6982fb8c28c50" + } + Frame { + msec: 1664 + hash: "8d273efc36ba722af4d044e6552c9dcb" + } + Frame { + msec: 1680 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 1696 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 1712 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 1728 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 1744 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 1760 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 1776 + hash: "81110f17d191f9795a2c57d136e86550" + } + Frame { + msec: 1792 + hash: "090a76cf068a5041ff993f21e6ebd087" + } + Frame { + msec: 1808 + hash: "30eb157c89ad0aeb17fd0012afb9246b" + } + Frame { + msec: 1824 + hash: "6b317b59e1b0f5b17a6d7d96e745f576" + } + Frame { + msec: 1840 + hash: "f9fc8467c6dbcb00d1f41a57b550193c" + } + Frame { + msec: 1856 + hash: "744227adbdd31be2920a232ea0dbc85d" + } + Frame { + msec: 1872 + hash: "d4b370ff8c3b66fc8a616dd9b944abd1" + } + Frame { + msec: 1888 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 1904 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 1920 + image: "enforcerange.1.png" + } + Frame { + msec: 1936 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 1952 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 1968 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 1984 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2000 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2016 + hash: "81110f17d191f9795a2c57d136e86550" + } + Frame { + msec: 2032 + hash: "090a76cf068a5041ff993f21e6ebd087" + } + Frame { + msec: 2048 + hash: "090a76cf068a5041ff993f21e6ebd087" + } + Frame { + msec: 2064 + hash: "30eb157c89ad0aeb17fd0012afb9246b" + } + Frame { + msec: 2080 + hash: "6b317b59e1b0f5b17a6d7d96e745f576" + } + Frame { + msec: 2096 + hash: "f9fc8467c6dbcb00d1f41a57b550193c" + } + Frame { + msec: 2112 + hash: "f9fc8467c6dbcb00d1f41a57b550193c" + } + Frame { + msec: 2128 + hash: "711274e9b6811b4662ac29d813574fb6" + } + Frame { + msec: 2144 + hash: "744227adbdd31be2920a232ea0dbc85d" + } + Frame { + msec: 2160 + hash: "744227adbdd31be2920a232ea0dbc85d" + } + Frame { + msec: 2176 + hash: "d4b370ff8c3b66fc8a616dd9b944abd1" + } + Frame { + msec: 2192 + hash: "d4b370ff8c3b66fc8a616dd9b944abd1" + } + Frame { + msec: 2208 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 2224 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 2240 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2256 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2272 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 2288 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 2304 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 2320 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 2336 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 2352 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 2368 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 2384 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 2400 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2416 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2432 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2448 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2464 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2480 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2496 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2512 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2528 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2544 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2560 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2576 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2592 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2608 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2624 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2640 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 2656 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2672 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2688 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 2704 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 2720 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 2736 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 2752 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 2768 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 2784 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 2800 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 2816 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2832 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2848 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2864 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2880 + image: "enforcerange.2.png" + } + Frame { + msec: 2896 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2912 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2928 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2944 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2960 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2976 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 2992 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 3008 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 3024 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 82; y: 39 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3040 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 3056 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 82; y: 40 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3072 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 82; y: 42 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 81; y: 44 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3088 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 81; y: 47 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 81; y: 55 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3104 + hash: "89016574205e00cf42723446d6a3437e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 81; y: 60 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 81; y: 69 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3120 + hash: "e2db9b1ae5c4be51a548834a7776da1f" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 80; y: 75 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 80; y: 87 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3136 + hash: "fcfad57224192065782a77ad3398d0d1" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 80; y: 93 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 80; y: 107 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3152 + hash: "bae4fc0fc2d33008ebe827ece94af196" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 84; y: 130 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 88; y: 144 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3168 + hash: "569581944bf18c8165f72c60bdbf1011" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 96; y: 161 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 96; y: 161 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3184 + hash: "613ff94a26bfaa9a4dc94fcbf6c3eb57" + } + Frame { + msec: 3200 + hash: "a63f8e6b194f900acb1b7a332f9fb9ae" + } + Frame { + msec: 3216 + hash: "6c04761cc86d28112c16f692cda58ba4" + } + Frame { + msec: 3232 + hash: "544275da3f7e2ccaedc8c521bf17f59b" + } + Frame { + msec: 3248 + hash: "52831480eb69184341b12ffb09ace736" + } + Frame { + msec: 3264 + hash: "52831480eb69184341b12ffb09ace736" + } + Frame { + msec: 3280 + hash: "52831480eb69184341b12ffb09ace736" + } + Frame { + msec: 3296 + hash: "52831480eb69184341b12ffb09ace736" + } + Frame { + msec: 3312 + hash: "58f2b900bc335424fc70eaaeb23ceb56" + } + Frame { + msec: 3328 + hash: "58f2b900bc335424fc70eaaeb23ceb56" + } + Frame { + msec: 3344 + hash: "544275da3f7e2ccaedc8c521bf17f59b" + } + Frame { + msec: 3360 + hash: "df9fef370c2f6ff300b20fc24b5b9e34" + } + Frame { + msec: 3376 + hash: "99cdc74eefc8c7c7df4650b373d8bc15" + } + Frame { + msec: 3392 + hash: "0662898d246e5ff6981610d32e2b8375" + } + Frame { + msec: 3408 + hash: "651b4c8b7a241263d48e645e603a55a3" + } + Frame { + msec: 3424 + hash: "82b31c8e8794ce3a9a6a635ef93b29b3" + } + Frame { + msec: 3440 + hash: "388658b5e03f3853e93173bd9501b77b" + } + Frame { + msec: 3456 + hash: "cf1856e961e6b8277a82c03ace5ba864" + } + Frame { + msec: 3472 + hash: "e1d022cc1b41098baffe49925b20678f" + } + Frame { + msec: 3488 + hash: "ee55d155fa495f3a0da8c21ad56dfc61" + } + Frame { + msec: 3504 + hash: "044c3712a6a5f6a973defe85643c8d02" + } + Frame { + msec: 3520 + hash: "e4fe2f1a81a4a4806f4155807f285a2d" + } + Frame { + msec: 3536 + hash: "e4fe2f1a81a4a4806f4155807f285a2d" + } + Frame { + msec: 3552 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3568 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3584 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3600 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3616 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3632 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3648 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3664 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3680 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3696 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3712 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3728 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3744 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3760 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3776 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3792 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3808 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3824 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3840 + image: "enforcerange.3.png" + } + Frame { + msec: 3856 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3872 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3888 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3904 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3920 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3936 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3952 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3968 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 3984 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 4000 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 4016 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Frame { + msec: 4032 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 105; y: 169 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4048 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 106; y: 168 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 106; y: 167 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4064 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 106; y: 164 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 106; y: 163 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4080 + hash: "19c43fcf2875769c9a15f1ce317a0f1e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 106; y: 162 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 106; y: 160 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4096 + hash: "331164730fb7ccf37dc08ddc26c0e182" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 107; y: 157 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 107; y: 156 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4112 + hash: "73e27ff972eefc421bc65897ad8b9a11" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 108; y: 152 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 109; y: 148 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4128 + hash: "c5e903fd827f8f1ec060dcb9a925bf6d" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 109; y: 145 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 109; y: 145 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4144 + hash: "74d4357dff4d6e00c5ae9ea0c34f1010" + } + Frame { + msec: 4160 + hash: "790274ee21ba257b84671a6fb19c142f" + } + Frame { + msec: 4176 + hash: "65ccc26f20be484fefa8ea25a7daf825" + } + Frame { + msec: 4192 + hash: "e435e2fbba7f0f6a65b9fecf07893eb0" + } + Frame { + msec: 4208 + hash: "6a994a18a9331731d5fca50dce2b9cff" + } + Frame { + msec: 4224 + hash: "9fc4405cddc06310215969a4583b2353" + } + Frame { + msec: 4240 + hash: "0d2b7130a84a8efac1cf4fe8a1768231" + } + Frame { + msec: 4256 + hash: "791db15db47090e1af299e5b32e53918" + } + Frame { + msec: 4272 + hash: "0ec6cf7a6ed9a073d2ce8f9e534e2ee5" + } + Frame { + msec: 4288 + hash: "c7b358f51a9500ca4958d266de5307e6" + } + Frame { + msec: 4304 + hash: "d24d00e4cd1ea3aaacf202e2fdf1eaa0" + } + Frame { + msec: 4320 + hash: "169f1a7a933d84071c449132a3c2745e" + } + Frame { + msec: 4336 + hash: "b6bf9c15ed40d6e862f693155c884035" + } + Frame { + msec: 4352 + hash: "8639955aa7a03f54d50d7e9051a4b997" + } + Frame { + msec: 4368 + hash: "411bc9a9aedbfb75f3122eaea6be0c16" + } + Frame { + msec: 4384 + hash: "827094da86716daf69386af2c8d4027a" + } + Frame { + msec: 4400 + hash: "ddddd5457e4a54ca5e7415dc2c7eabe5" + } + Frame { + msec: 4416 + hash: "632a5756af20083504fb1faaa019dd48" + } + Frame { + msec: 4432 + hash: "0cc2901b1b25412f13865887a8c9d13e" + } + Frame { + msec: 4448 + hash: "4c8a9473eb9843634340d70f8eab9487" + } + Frame { + msec: 4464 + hash: "398a238f59a2edf07870b624b914c81d" + } + Frame { + msec: 4480 + hash: "a7c282235e9166b900ea2ff68800a5f5" + } + Frame { + msec: 4496 + hash: "bae4fc0fc2d33008ebe827ece94af196" + } + Frame { + msec: 4512 + hash: "45e0670a2b4c18b847a3c7870539b962" + } + Frame { + msec: 4528 + hash: "8d474956331fdd0c35beb13a06b7c557" + } + Frame { + msec: 4544 + hash: "5d5bdffc30d90fd5b061c6fcf24c2599" + } + Frame { + msec: 4560 + hash: "15721b103981f5fe40b5dfe7d65c5b38" + } + Frame { + msec: 4576 + hash: "940b70f15082ff138579892bb6f20ce9" + } + Frame { + msec: 4592 + hash: "5137ea98fd291a4b967fb66d93253a37" + } + Frame { + msec: 4608 + hash: "35ab744ce2a91567dbbd769f9486f870" + } + Frame { + msec: 4624 + hash: "d5c55c00b07735e5d7c02dfa99ef2f45" + } + Frame { + msec: 4640 + hash: "6b2d32b8f1df871c2c014af8b5d87329" + } + Frame { + msec: 4656 + hash: "edf3b33b80cca53999779555f9cd6162" + } + Frame { + msec: 4672 + hash: "180f3cc4ea5ff5b6f9e8be0294732d4e" + } + Frame { + msec: 4688 + hash: "9b99a1b0c0bb0ce37655d92854ee4d19" + } + Frame { + msec: 4704 + hash: "28e9ca60a873910380b2d22d6b3df565" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 109; y: 131 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4720 + hash: "28e9ca60a873910380b2d22d6b3df565" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 109; y: 126 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 109; y: 124 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4736 + hash: "18e53bf6337cf6590fc3c73c00469d8e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 109; y: 115 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 109; y: 110 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4752 + hash: "81110f17d191f9795a2c57d136e86550" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 108; y: 99 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 106; y: 85 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4768 + hash: "b64810845a97bedf6fe11c043457c197" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 105; y: 74 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 103; y: 60 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4784 + hash: "711274e9b6811b4662ac29d813574fb6" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 102; y: 54 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 100; y: 40 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 100; y: 40 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4800 + image: "enforcerange.4.png" + } + Frame { + msec: 4816 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 4832 + hash: "090a76cf068a5041ff993f21e6ebd087" + } + Frame { + msec: 4848 + hash: "6b317b59e1b0f5b17a6d7d96e745f576" + } + Frame { + msec: 4864 + hash: "744227adbdd31be2920a232ea0dbc85d" + } + Frame { + msec: 4880 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 4896 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 4912 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 4928 + hash: "81110f17d191f9795a2c57d136e86550" + } + Frame { + msec: 4944 + hash: "30eb157c89ad0aeb17fd0012afb9246b" + } + Frame { + msec: 4960 + hash: "f9fc8467c6dbcb00d1f41a57b550193c" + } + Frame { + msec: 4976 + hash: "711274e9b6811b4662ac29d813574fb6" + } + Frame { + msec: 4992 + hash: "d4b370ff8c3b66fc8a616dd9b944abd1" + } + Frame { + msec: 5008 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 5024 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 5040 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 5056 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 5072 + hash: "81110f17d191f9795a2c57d136e86550" + } + Frame { + msec: 5088 + hash: "30eb157c89ad0aeb17fd0012afb9246b" + } + Frame { + msec: 5104 + hash: "6b317b59e1b0f5b17a6d7d96e745f576" + } + Frame { + msec: 5120 + hash: "711274e9b6811b4662ac29d813574fb6" + } + Frame { + msec: 5136 + hash: "744227adbdd31be2920a232ea0dbc85d" + } + Frame { + msec: 5152 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 5168 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 5184 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 5200 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 5216 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 5232 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 5248 + hash: "81110f17d191f9795a2c57d136e86550" + } + Frame { + msec: 5264 + hash: "090a76cf068a5041ff993f21e6ebd087" + } + Frame { + msec: 5280 + hash: "30eb157c89ad0aeb17fd0012afb9246b" + } + Frame { + msec: 5296 + hash: "6b317b59e1b0f5b17a6d7d96e745f576" + } + Frame { + msec: 5312 + hash: "f9fc8467c6dbcb00d1f41a57b550193c" + } + Frame { + msec: 5328 + hash: "744227adbdd31be2920a232ea0dbc85d" + } + Frame { + msec: 5344 + hash: "d4b370ff8c3b66fc8a616dd9b944abd1" + } + Frame { + msec: 5360 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 5376 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 5392 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 5408 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 5424 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 5440 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 5456 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 5472 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 5488 + hash: "81110f17d191f9795a2c57d136e86550" + } + Frame { + msec: 5504 + hash: "090a76cf068a5041ff993f21e6ebd087" + } + Frame { + msec: 5520 + hash: "090a76cf068a5041ff993f21e6ebd087" + } + Frame { + msec: 5536 + hash: "30eb157c89ad0aeb17fd0012afb9246b" + } + Frame { + msec: 5552 + hash: "6b317b59e1b0f5b17a6d7d96e745f576" + } + Frame { + msec: 5568 + hash: "f9fc8467c6dbcb00d1f41a57b550193c" + } + Frame { + msec: 5584 + hash: "f9fc8467c6dbcb00d1f41a57b550193c" + } + Frame { + msec: 5600 + hash: "711274e9b6811b4662ac29d813574fb6" + } + Frame { + msec: 5616 + hash: "744227adbdd31be2920a232ea0dbc85d" + } + Frame { + msec: 5632 + hash: "744227adbdd31be2920a232ea0dbc85d" + } + Frame { + msec: 5648 + hash: "d4b370ff8c3b66fc8a616dd9b944abd1" + } + Frame { + msec: 5664 + hash: "d4b370ff8c3b66fc8a616dd9b944abd1" + } + Frame { + msec: 5680 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 5696 + hash: "674b07dc5b99bf2da93c40d42dc9023d" + } + Frame { + msec: 5712 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 5728 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 5744 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 5760 + image: "enforcerange.5.png" + } + Frame { + msec: 5776 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 5792 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 5808 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 5824 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 5840 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 5856 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 5872 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 5888 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 5904 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 5920 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 5936 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 5952 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 5968 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 5984 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 6000 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 6016 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 6032 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 6048 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 6064 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 6080 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 6096 + hash: "b061ee3784fbd4a287758ffd100a623e" + } + Frame { + msec: 6112 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 6128 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 6144 + hash: "7eb75e8e83874d52448a7dbf6a0ad29c" + } + Frame { + msec: 6160 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 6176 + hash: "70b475e88060ead84d05f0ba1b47c139" + } + Frame { + msec: 6192 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 6208 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 6224 + hash: "87aaa82b96131fed8822e57e226162a0" + } + Frame { + msec: 6240 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 6256 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 6272 + hash: "b64810845a97bedf6fe11c043457c197" + } + Frame { + msec: 6288 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6304 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6320 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6336 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6352 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6368 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6384 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6400 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6416 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6432 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6448 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6464 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6480 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6496 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6512 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6528 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6544 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6560 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6576 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6592 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6608 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6624 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6640 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } + Frame { + msec: 6656 + hash: "a4ff6c6c43697808f9ad7387d152cef3" + } +} diff --git a/tests/auto/declarative/qmlvisual/ListView/enforcerange.qml b/tests/auto/declarative/qmlvisual/ListView/enforcerange.qml new file mode 100644 index 0000000..a796be7 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/ListView/enforcerange.qml @@ -0,0 +1,31 @@ +import QtQuick 1.0 + +Item { + id: document + width: 200; height: 200 + + ListView { + id: serviceListView + anchors.fill: parent + model: 100 + + preferredHighlightBegin: 90 + preferredHighlightEnd: 90 + + highlightRangeMode: ListView.StrictlyEnforceRange + + delegate: Component { + Item { + height: 15 + ((serviceListView.currentIndex == index) ? 20 : 0) + width: 200 + Rectangle { width: 180; height: parent.height - 4; x: 10; y: 2; color: "red" } + } + } + } + + Rectangle { + y: 90; width: 200; height: 35 + border.color: "black" + color: "transparent" + } +} -- cgit v0.12 From 3cc9c5f2541f192733436c79c4d14aa34177c3cc Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 3 Nov 2010 16:38:20 +1000 Subject: highlightranges.qml example and visual test contained binding loop. Also, the currentIndex stayed -1 since the views all bound to each others currentIndex, which starts as -1. Task-number: QTBUG-14794 Reviewed-by: Yann Bodson --- .../modelviews/listview/highlightranges.qml | 20 +++++++++++--------- .../auto/declarative/qmlvisual/ListView/listview.qml | 12 ++++++++---- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges.qml index 2716ee5..58d37a3 100644 --- a/examples/declarative/modelviews/listview/highlightranges.qml +++ b/examples/declarative/modelviews/listview/highlightranges.qml @@ -42,15 +42,14 @@ import QtQuick 1.0 import "content" Rectangle { + id: root + property int current: 0 width: 600; height: 300 // This example shows the same model in three different ListView items, // with different highlight ranges. The highlight ranges are set by the // preferredHighlightBegin and preferredHighlightEnd properties in ListView. // - // The second and third ListViews set their currentIndex to be the - // same as the first. The first ListView is given keyboard focus. - // // The first ListView does not set a highlight range, so its currentItem // can move freely within the visible area. If it moves outside the // visible area, the view is automatically scrolled to keep the current @@ -66,9 +65,10 @@ Rectangle { // forces the current item to change when the view is flicked, // since the highlight is unable to move. // - // Note that the first ListView sets its currentIndex to be equal to - // the third ListView's currentIndex. By flicking the third ListView with - // the mouse, the current index of the first ListView will be changed. + // All ListViews bind their currentIndex to the root.current property. + // The first ListView sets root.current whenever its currentIndex changes + // due to keyboard interaction. + // Flicking the third ListView with the mouse also changes root.current. ListView { id: list1 @@ -77,7 +77,8 @@ Rectangle { delegate: petDelegate highlight: Rectangle { color: "lightsteelblue" } - currentIndex: list3.currentIndex + currentIndex: root.current + onCurrentIndexChanged: root.current = currentIndex focus: true } @@ -89,7 +90,7 @@ Rectangle { delegate: petDelegate highlight: Rectangle { color: "yellow" } - currentIndex: list1.currentIndex + currentIndex: root.current preferredHighlightBegin: 80; preferredHighlightEnd: 220 highlightRangeMode: ListView.ApplyRange } @@ -102,7 +103,8 @@ Rectangle { delegate: petDelegate highlight: Rectangle { color: "yellow" } - currentIndex: list1.currentIndex + currentIndex: root.current + onCurrentIndexChanged: root.current = currentIndex preferredHighlightBegin: 125; preferredHighlightEnd: 125 highlightRangeMode: ListView.StrictlyEnforceRange } diff --git a/tests/auto/declarative/qmlvisual/ListView/listview.qml b/tests/auto/declarative/qmlvisual/ListView/listview.qml index 43c86a0..6171c75 100644 --- a/tests/auto/declarative/qmlvisual/ListView/listview.qml +++ b/tests/auto/declarative/qmlvisual/ListView/listview.qml @@ -1,7 +1,8 @@ import QtQuick 1.0 Rectangle { - property string skip: "Incorrect start: QTBUG-14794" + id: root + property int current: 0 width: 600; height: 300; color: "white" ListModel { @@ -57,7 +58,9 @@ Rectangle { id: list1 width: 200; height: parent.height model: myModel; delegate: myDelegate - highlight: myHighlight; currentIndex: list3.currentIndex + highlight: myHighlight + currentIndex: root.current + onCurrentIndexChanged: root.current = currentIndex focus: true } ListView { @@ -67,13 +70,14 @@ Rectangle { preferredHighlightBegin: 80 preferredHighlightEnd: 220 highlightRangeMode: "ApplyRange" - currentIndex: list1.currentIndex + currentIndex: root.current } ListView { id: list3 x: 400; width: 200; height: parent.height model: myModel; delegate: myDelegate; highlight: myHighlight - currentIndex: list1.currentIndex + currentIndex: root.current + onCurrentIndexChanged: root.current = currentIndex preferredHighlightBegin: 125 preferredHighlightEnd: 125 highlightRangeMode: "StrictlyEnforceRange" -- cgit v0.12