summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-03-19 09:16:43 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-03-19 09:16:43 (GMT)
commitb45f6f856fe72629e2e0752fc8732de487278f41 (patch)
treea0c9795b83a7ad51e76ac57b70eb447c8c046fbe /src
parentac0175b839ff326f15bd4de925f9ccd0390ac4e4 (diff)
parent5334c41991c7dd26d854c26e6ae6f238e16cc4f9 (diff)
downloadQt-b45f6f856fe72629e2e0752fc8732de487278f41.zip
Qt-b45f6f856fe72629e2e0752fc8732de487278f41.tar.gz
Qt-b45f6f856fe72629e2e0752fc8732de487278f41.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp6
-rw-r--r--src/gui/widgets/qlinecontrol_p.h2
-rw-r--r--src/script/api/qscriptvalue.cpp5
3 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index db099e8..9ec0feb 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
Updates the display text based of the current edit text
If the text has changed will emit displayTextChanged()
*/
-void QLineControl::updateDisplayText()
+void QLineControl::updateDisplayText(bool forceUpdate)
{
QString orig = m_textLayout.text();
QString str;
@@ -102,7 +102,7 @@ void QLineControl::updateDisplayText()
m_textLayout.endLayout();
m_ascent = qRound(l.ascent());
- if (str != orig)
+ if (str != orig || forceUpdate)
emit displayTextChanged(str);
}
@@ -476,7 +476,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
}
}
m_textLayout.setAdditionalFormats(formats);
- updateDisplayText();
+ updateDisplayText(/*force*/ true);
if (cursorPositionChanged)
emitCursorPositionChanged();
if (isGettingInput)
diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h
index d6f2705..3f1bc2c 100644
--- a/src/gui/widgets/qlinecontrol_p.h
+++ b/src/gui/widgets/qlinecontrol_p.h
@@ -239,7 +239,7 @@ private:
void init(const QString &txt);
void removeSelectedText();
void internalSetText(const QString &txt, int pos = -1, bool edited = true);
- void updateDisplayText();
+ void updateDisplayText(bool forceUpdate = false);
void internalInsert(const QString &s);
void internalDelete(bool wasBackspace = false);
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 5bfe46a..8cf01e7 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1946,7 +1946,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
JSC::MarkedArgumentBuffer applyArgs;
if (!array.isUndefinedOrNull()) {
if (!array.isObject()) {
- return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError));
+ return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError, "Arguments must be an array"));
}
if (JSC::asObject(array)->classInfo() == &JSC::Arguments::info)
JSC::asArguments(array)->fillArgList(exec, applyArgs);
@@ -1957,8 +1957,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
for (unsigned i = 0; i < length; ++i)
applyArgs.append(JSC::asArray(array)->get(exec, i));
} else {
- Q_ASSERT_X(false, Q_FUNC_INFO, "implement me");
-// return JSC::throwError(exec, JSC::TypeError);
+ return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError, "Arguments must be an array"));
}
}