summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-09 09:27:51 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-09 09:27:51 (GMT)
commitf4d385cec1f09971163d7e5d9e9b09b19f1873c4 (patch)
tree77fcae776896372aba3e6d3609c4204e0ed906d3 /src/gui/graphicsview
parentdec972419b5758601d177bbbae0a3a1fe890824d (diff)
parent6129a16a74620916d3e8bff29a3788374ca21c94 (diff)
downloadQt-f4d385cec1f09971163d7e5d9e9b09b19f1873c4.zip
Qt-f4d385cec1f09971163d7e5d9e9b09b19f1873c4.tar.gz
Qt-f4d385cec1f09971163d7e5d9e9b09b19f1873c4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Fix auto test failure. PathView regression: dragging the path didn't update currentIndex Fix docs for variant and list basic types Add test for importing plugins that contain QML files Call onAdd() for first items added to ListView and GridView Use same values for Text.lineHeightMode and QTextBlock::lineHeightMode from master. Don't clear pre-edit text when a graphics items loses focus.
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 16f92f2..a61b569 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -806,28 +806,23 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
}
if (focusItem) {
- QFocusEvent event(QEvent::FocusOut, focusReason);
lastFocusItem = focusItem;
- focusItem = 0;
- sendEvent(lastFocusItem, &event);
#ifndef QT_NO_IM
if (lastFocusItem
&& (lastFocusItem->flags() & QGraphicsItem::ItemAcceptsInputMethod)) {
- // Reset any visible preedit text
- QInputMethodEvent imEvent;
- sendEvent(lastFocusItem, &imEvent);
-
// Close any external input method panel. This happens
// automatically by removing WA_InputMethodEnabled on
// the views, but if we are changing focus, we have to
// do it ourselves.
- if (item) {
- for (int i = 0; i < views.size(); ++i)
- if (views.at(i)->inputContext())
- views.at(i)->inputContext()->reset();
- }
+ for (int i = 0; i < views.size(); ++i)
+ if (views.at(i)->inputContext())
+ views.at(i)->inputContext()->reset();
}
+
+ focusItem = 0;
+ QFocusEvent event(QEvent::FocusOut, focusReason);
+ sendEvent(lastFocusItem, &event);
#endif //QT_NO_IM
}