summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-29 23:47:56 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-29 23:47:56 (GMT)
commit326cc83e3677cefe230d813a89ea55cd56fc22bf (patch)
tree88bcb2b1282c5528d0948732dc3f0b78ba68eb26
parent8000255dafcee42bd1074a683d7344eca5d83cac (diff)
downloadQt-326cc83e3677cefe230d813a89ea55cd56fc22bf.zip
Qt-326cc83e3677cefe230d813a89ea55cd56fc22bf.tar.gz
Qt-326cc83e3677cefe230d813a89ea55cd56fc22bf.tar.bz2
Partially revert ef0f2901d4055bf53ac2bebb7fe2d5681900db19.
Accessor method for inputMethodQuery was causing crashes.
-rw-r--r--src/declarative/fx/qfxitem.cpp5
-rw-r--r--src/declarative/fx/qfxitem.h2
-rw-r--r--src/declarative/fx/qfxkeyproxy.cpp9
3 files changed, 8 insertions, 8 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index d88b3af..4e66f55 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -2168,4 +2168,9 @@ void QFxItemPrivate::gvAddMouseFilter()
q->installSceneEventFilter(q);
}
+QVariant QFxItem::inputMethodQuery(Qt::InputMethodQuery query) const
+{
+ return QGraphicsItem::inputMethodQuery(query);
+}
+
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h
index 36845a2..cd346a7 100644
--- a/src/declarative/fx/qfxitem.h
+++ b/src/declarative/fx/qfxitem.h
@@ -239,6 +239,8 @@ public:
bool hasActiveFocus() const;
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const; //### for KeyProxy
+
public Q_SLOTS:
void newChild(const QString &url);
diff --git a/src/declarative/fx/qfxkeyproxy.cpp b/src/declarative/fx/qfxkeyproxy.cpp
index 968ff09..13f4bfb 100644
--- a/src/declarative/fx/qfxkeyproxy.cpp
+++ b/src/declarative/fx/qfxkeyproxy.cpp
@@ -181,17 +181,10 @@ void QFxKeyProxy::inputMethodEvent(QInputMethodEvent *e)
QVariant QFxKeyProxy::inputMethodQuery(Qt::InputMethodQuery query) const
{
- struct QFxItemAccessor : public QFxItem {
- public:
- QVariant inputMethodQuery(Qt::InputMethodQuery query) const {
- return QGraphicsItem::inputMethodQuery(query);
- }
- };
-
for (int ii = 0; ii < d->targets.count(); ++ii) {
QFxItem *i = qobject_cast<QFxItem *>(scene()->focusItem(d->targets.at(ii)));
if (i && (i->options() & AcceptsInputMethods) && i == d->imeItem) { //### how robust is i == d->imeItem check?
- QVariant v = ((QFxItemAccessor*)i)->inputMethodQuery(query);
+ QVariant v = i->inputMethodQuery(query);
if (v.type() == QVariant::RectF)
v = mapRectFromItem(i, v.toRectF()); //### cost?
return v;