diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-10-29 09:35:42 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-10-29 10:55:33 +0100 |
commit | 4b491334cf3739ab9df9278c27ac57cfe9bd655d (patch) | |
tree | 8e208ecad8ece0a5d8ba7bea1936fbd0bb973c05 /src/widgets | |
parent | 7ebc151bcfe71dc837ce9fb2d4c71b7cba7bb7f0 (diff) | |
parent | 8613b64f535b0ce05adf6f4708ba0826f22a7eb4 (diff) |
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/styles/qstyle.cpp | 3 | ||||
-rw-r--r-- | src/widgets/styles/qstyle.h | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 7 | ||||
-rw-r--r-- | src/widgets/widgets/qlineedit_p.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol_p.h | 2 |
6 files changed, 14 insertions, 4 deletions
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index 6cf61a691e..856ec271fb 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -1746,8 +1746,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SH_ComboBox_Popup Allows popups as a combobox drop-down menu. - \omitvalue SH_ComboBox_UseNativePopup Whether we should use a native popup. - Only supported for non-editable combo boxes on Mac OS X so far. + \omitvalue SH_ComboBox_UseNativePopup \value SH_Workspace_FillSpaceOnMaximize The workspace should maximize the client area. diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h index 681f3e0468..43a49e3746 100644 --- a/src/widgets/styles/qstyle.h +++ b/src/widgets/styles/qstyle.h @@ -698,6 +698,8 @@ public: SH_ToolTip_FallAsleepDelay, SH_Widget_Animate, SH_Splitter_OpaqueResize, + // Whether we should use a native popup. + // Only supported for non-editable combo boxes on Mac OS X so far. SH_ComboBox_UseNativePopup, SH_LineEdit_PasswordMaskDelay, SH_TabBar_ChangeCurrentDelay, diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index dfc9a8fe92..cf294e3c34 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1520,13 +1520,16 @@ void QLineEdit::mouseMoveEvent(QMouseEvent * e) #else const bool select = (d->imHints & Qt::ImhNoPredictiveText); #endif +#ifndef QT_NO_IM if (d->control->composeMode() && select) { int startPos = d->xToPos(d->mousePressPos.x()); int currentPos = d->xToPos(e->pos().x()); if (startPos != currentPos) d->control->setSelection(startPos, currentPos - startPos); - } else { + } else +#endif + { d->control->moveCursor(d->xToPos(e->pos().x()), select); } } @@ -1577,6 +1580,7 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e) int position = d->xToPos(e->pos().x()); // exit composition mode +#ifndef QT_NO_IM if (d->control->composeMode()) { int preeditPos = d->control->cursor(); int posInPreedit = position - d->control->cursor(); @@ -1601,6 +1605,7 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e) position += (sizeChange - preeditLength); } } +#endif if (position >= 0) d->control->selectWordAtPos(position); diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index 0731c89094..f1126322d8 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -47,8 +47,8 @@ #ifndef QT_NO_IM #include "qinputmethod.h" #include "qlist.h" -#include <qpropertyanimation.h> #endif +#include <qpropertyanimation.h> QT_BEGIN_NAMESPACE diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index a82dd99591..e6385ba390 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -179,6 +179,7 @@ void QWidgetLineControl::paste(QClipboard::Mode clipboardMode) */ void QWidgetLineControl::commitPreedit() { +#ifndef QT_NO_IM if (!composeMode()) return; @@ -190,6 +191,7 @@ void QWidgetLineControl::commitPreedit() setPreeditArea(-1, QString()); m_textLayout.clearAdditionalFormats(); updateDisplayText(/*force*/ true); +#endif } diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index 328faf7926..f21d88177c 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -228,8 +228,10 @@ public: } void setText(const QString &txt) { +#ifndef QT_NO_IM if (composeMode()) qApp->inputMethod()->reset(); +#endif internalSetText(txt, -1, false); } void commitPreedit(); |