summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qcombobox.cpp
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2009-12-14 11:55:36 (GMT)
committerSami Merila <sami.merila@nokia.com>2009-12-14 11:55:36 (GMT)
commit83d333a2b181cbd5c87219599fdc188757261269 (patch)
treeb7e07a0cea0dd3dd9e648e9d8db7b3ae118c6905 /src/gui/widgets/qcombobox.cpp
parentb2f4c48d5d3096e7c12fd51b8bc6bdabe2c6fd7b (diff)
downloadQt-83d333a2b181cbd5c87219599fdc188757261269.zip
Qt-83d333a2b181cbd5c87219599fdc188757261269.tar.gz
Qt-83d333a2b181cbd5c87219599fdc188757261269.tar.bz2
FEP indicator shown in status pane when it should not
FEP indicator is shown in few cases in statusbar when it should not be. Case a) Application contains item view. QAbstractItemView is initialized as having WA_InputMethodEnabled on, irregardless of functionality of each separate cell. So we need to check the model for the itemview cell about to receive focus, is it editable. If it isn't then, we'll set the WA_InputMethodEnabled as false. This will fix the FEP indicators in a lot of cases: lists with cells, empty lists, combobox lists, ... Case b) Combobox also initializes itself with WA_InputMethodEnabled active. Even if the fix a) fixed the list inside combobox, the widget itself when receiving focus needs also fixing. If we check the editable flag of combobox when initializing the comment, we can set the flag off. Task-number: QTBUG-5705 Reviewed-by: axis
Diffstat (limited to 'src/gui/widgets/qcombobox.cpp')
-rw-r--r--src/gui/widgets/qcombobox.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index bd1d8ba..b7dd20c 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -931,7 +931,10 @@ void QComboBoxPrivate::init()
QSizePolicy::ComboBox));
setLayoutItemMargins(QStyle::SE_ComboBoxLayoutItem);
q->setModel(new QStandardItemModel(0, 1, q));
- q->setAttribute(Qt::WA_InputMethodEnabled);
+ if (!q->isEditable())
+ q->setAttribute(Qt::WA_InputMethodEnabled, false);
+ else
+ q->setAttribute(Qt::WA_InputMethodEnabled);
}
QComboBoxPrivateContainer* QComboBoxPrivate::viewContainer()