Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.7.4
-
None
-
40e6b1d0b8c1804dfb33032fa70b6604b91f6f90 6873437085a8fe669b12f8f1f2cfee872839d4ec
Description
PRECONDITIONS:
1. set of items (A) in qgraphicsscene
2. focused to an item (b) that has QGraphicsItem::ItemAcceptsInputMethod
STEPS LEADING TO PROBLEM:
1. remove the set of items (A) from scene
EXPECTED OUTCOME:
No extensive input method hint updates
ACTUAL OUTCOME:
For each item removed, input method hint state is updated, even though the
state doesn't change and focused item does not change.
Creates performance problems when input method plugin updates the hints via IPC.
Testcase shows a bit of performance problem with standard Linux without any input method plugins.
On my computer non-focus case (benchmark) is 1s and focus case (bug demo) is ~1.5s.
To run benchmark testcase:
./qt-im-scene
To run testcase demonstrating the problem:
./qt-im-scene 1
Might be fixable with patch similar to:
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index fd9deb5..b85b4e9 100644
— a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -9325,6 +9325,9 @@ void QWidget::setInputMethodHints(Qt::InputMethodHints
hints)
{
#ifndef QT_NO_IM
Q_D(QWidget);
+ if (d->imHints == hints)
+ return;
+
d->imHints = hints;
// Optimization to update input context only it has already been created.
if (d->ic || qApp->d_func()->inputContext) {
For internal bug tracking, please see:
https://projects.maemo.org/bugzilla/show_bug.cgi?id=265172
Attachments
For Gerrit Dashboard: QTBUG-19854 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
45316,1 | Don't update the input method if the im hints haven't changed. | stable | qt/qtbase | Status: MERGED | +2 | 0 |