summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-08-12 13:20:08 (GMT)
committeraxis <qt-info@nokia.com>2009-08-12 15:05:52 (GMT)
commitecb4110040218fafaad8717c7c58de1086d3590d (patch)
tree3d803129114440896ef702c397342e5af77663b6 /src/gui/graphicsview
parent9bba7e42a2988967507d536c497c54efc791eb67 (diff)
downloadQt-ecb4110040218fafaad8717c7c58de1086d3590d.zip
Qt-ecb4110040218fafaad8717c7c58de1086d3590d.tar.gz
Qt-ecb4110040218fafaad8717c7c58de1086d3590d.tar.bz2
Revised SIP API.
After discussions with Matthias, several things were changed: - the autoSipOnMouseFocus property was removed and replaced with a new style hint, SH_RequestSoftwareInputPanel. This means the style can define when the input panel is launched. - The code which sends RequestSoftwareInputPanel events was moved into its own function, and the widgets call that function. AutoTest: Included and passed RevBy: mae
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 7091b5d..4931d07 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -584,6 +584,7 @@
#include <private/qtextcontrol_p.h>
#include <private/qtextdocumentlayout_p.h>
#include <private/qtextengine_p.h>
+#include <private/qwidget_p.h>
#ifdef Q_WS_X11
#include <private/qt_x11_p.h>
@@ -9100,15 +9101,10 @@ void QGraphicsTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
return;
}
- if (event->button() == Qt::LeftButton && qApp->autoSipEnabled()
- && (!dd->clickCausedFocus || qApp->autoSipOnMouseFocus())) {
- QEvent _event(QEvent::RequestSoftwareInputPanel);
- QWidget *receiver = event->widget();
- if(receiver) {
- QApplication::sendEvent(receiver, &_event);
- }
+ QWidget *widget = event->widget();
+ if (widget) {
+ qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), dd->clickCausedFocus);
}
-
dd->clickCausedFocus = 0;
dd->sendControlEvent(event);
}