diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-21 05:07:23 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-21 05:07:23 (GMT) |
commit | 5e80b137d195625c0d57c1c27e5e8464d1ccfa33 (patch) | |
tree | ad1665a6707813037f68ecd174d6e84bbebbbc86 /src/declarative | |
parent | 61aae4e9a033bfb59664105e5377fd086bacb517 (diff) | |
parent | a95814e170643d67a682482b08f574e0f1e9fbf1 (diff) | |
download | Qt-5e80b137d195625c0d57c1c27e5e8464d1ccfa33.zip Qt-5e80b137d195625c0d57c1c27e5e8464d1ccfa33.tar.gz Qt-5e80b137d195625c0d57c1c27e5e8464d1ccfa33.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Fix crash in PropertyChanges.
Scroll correctly when cursorPosition is changed within onTextChanged.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativebinding.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index c59c919..b83fc13 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1940,12 +1940,12 @@ void QDeclarativeTextInput::selectionChanged() void QDeclarativeTextInput::q_textChanged() { Q_D(QDeclarativeTextInput); + emit textChanged(); + emit displayTextChanged(); updateSize(); d->determineHorizontalAlignment(); d->updateHorizontalScroll(); updateMicroFocus(); - emit textChanged(); - emit displayTextChanged(); if(hasAcceptableInput() != d->oldValidity){ d->oldValidity = hasAcceptableInput(); emit acceptableInputChanged(); diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index ca3bc37..689cd00 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -243,12 +243,13 @@ QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeCont if (id < 0) return 0; + Q_ASSERT(ctxt); QDeclarativeContextData *ctxtdata = QDeclarativeContextData::get(ctxt); - QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(qmlEngine(obj)); + QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(ctxtdata->engine); QDeclarativeCompiledData *cdata = 0; QDeclarativeTypeData *typeData = 0; - if (engine && ctxtdata && !ctxtdata->url.isEmpty()) { + if (!ctxtdata->url.isEmpty()) { typeData = engine->typeLoader.get(ctxtdata->url); cdata = typeData->compiledData(); } |