diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-10 12:48:01 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-10 15:31:45 +0200 |
commit | 143c4d3e13a430b951f4f4f8c28db14303f80605 (patch) | |
tree | 2b89637b93fc7d81c674106008566010f986d67c /src/widgets/widgets/qwidgetlinecontrol_p.h | |
parent | a7ed81b557d593a8ddb43b71bf4bbf3b44ead070 (diff) | |
parent | e5337ad1b1fb02873ce7b5ca8db45f6fd8063352 (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
configure
src/widgets/styles/qwindowsxpstyle.cpp
tests/auto/gui/kernel/qwindow/qwindow.pro
tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol_p.h')
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol_p.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index 62184a27bb..ba3b202bda 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -98,6 +98,9 @@ public: , m_threadChecks(false) , m_textLayoutThread(0) #endif +#if defined(QT_BUILD_INTERNAL) + , m_passwordMaskDelayOverride(-1) +#endif , m_keyboardScheme(0) { init(txt); @@ -217,22 +220,13 @@ public: QString text() const { QString content = m_text; - if (!m_tentativeCommit.isEmpty()) - content.insert(m_cursor, m_tentativeCommit); QString res = m_maskData ? stripString(content) : content; return (res.isNull() ? QString::fromLatin1("") : res); } - // like text() but doesn't include preedit - QString realText() const - { - QString res = m_maskData ? stripString(m_text) : m_text; - return (res.isNull() ? QString::fromLatin1("") : res); - } void setText(const QString &txt) { if (composeMode()) qApp->inputMethod()->reset(); - m_tentativeCommit.clear(); internalSetText(txt, -1, false); } void commitPreedit(); @@ -286,7 +280,18 @@ public: bool hasAcceptableInput() const { return hasAcceptableInput(m_text); } bool fixup(); - QString inputMask() const { return m_maskData ? m_inputMask + QLatin1Char(';') + m_blank : QString(); } + QString inputMask() const + { + QString mask; + if (m_maskData) { + mask = m_inputMask; + if (m_blank != QLatin1Char(' ')) { + mask += QLatin1Char(';'); + mask += m_blank; + } + } + return mask; + } void setInputMask(const QString &mask) { parseInputMask(mask); @@ -402,7 +407,6 @@ private: int m_cursor; int m_preeditCursor; int m_cursorWidth; - QString m_tentativeCommit; Qt::LayoutDirection m_layoutDirection; uint m_hideCursor : 1; // used to hide the m_cursor inside preedit areas uint m_separator : 1; @@ -495,6 +499,11 @@ private: mutable QThread *m_textLayoutThread; #endif +public: +#if defined(QT_BUILD_INTERNAL) + int m_passwordMaskDelayOverride; +#endif + Q_SIGNALS: void cursorPositionChanged(int, int); void selectionChanged(); |