diff options
-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(); } |