summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-24 10:53:22 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-24 10:53:22 (GMT)
commit3cc1c3120be39eb5f8598f77ebe2ca541642b1b4 (patch)
tree48b07c1367c8ed4cf93aa34ae28bfae3e2e50ff7 /src/gui/widgets
parentfba03060f1bb0a7ed5a89335bb459a5e0f60078d (diff)
parent38be1996d9fc56516cc6a27de9e582f97d05627f (diff)
downloadQt-3cc1c3120be39eb5f8598f77ebe2ca541642b1b4.zip
Qt-3cc1c3120be39eb5f8598f77ebe2ca541642b1b4.tar.gz
Qt-3cc1c3120be39eb5f8598f77ebe2ca541642b1b4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp6
-rw-r--r--src/gui/widgets/qtextedit.cpp2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 198bc04..a879b49 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
#ifdef QT_GUI_PASSWORD_ECHO_DELAY
-static const int qt_passwordEchoDelay = QT_GUI_PASSWORD_ECHO_DELAY;
+static int qt_passwordEchoDelay = QT_GUI_PASSWORD_ECHO_DELAY;
#endif
/*!
@@ -93,8 +93,8 @@ void QLineControl::updateDisplayText(bool forceUpdate)
if (m_echoMode == QLineEdit::Password) {
str.fill(m_passwordCharacter);
#ifdef QT_GUI_PASSWORD_ECHO_DELAY
- if (m_passwordEchoTimer != 0 && m_cursor > 0 && m_cursor <= m_text.length()) {
- int cursor = m_cursor - 1;
+ if (m_passwordEchoTimer != 0 && !str.isEmpty()) {
+ int cursor = m_text.length() - 1;
QChar uc = m_text.at(cursor);
str[cursor] = uc;
if (cursor > 0 && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) {
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index b6661c9..6757d77 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -2472,8 +2472,6 @@ bool QTextEdit::find(const QString &exp, QTextDocument::FindFlags options)
and the text edit will try to guess the right format.
Use setHtml() or setPlainText() directly to avoid text edit's guessing.
-
- \sa toPlainText(), toHtml()
*/
void QTextEdit::setText(const QString &text)
{