diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-13 10:21:53 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-13 10:22:22 +0200 |
commit | ce5ac7d67b59deb7c0e261e9ee21a475e6cb2e41 (patch) | |
tree | ed4dcec9a0e9002156e085ffb6715436bc2e27c5 /src/qtquick1/graphicsitems/qdeclarativetextinput.cpp | |
parent | f828bee19dee73246c09af3aad913b5540f1cbd0 (diff) | |
parent | 63952084c085202e7eddca6840c518d8e07445d0 (diff) |
Merge branch 'refactor'
Conflicts:
src/declarative/items/context2d/qsgcanvasitem.cpp
src/declarative/items/context2d/qsgcontext2d.cpp
src/declarative/items/context2d/qsgcontext2d_p_p.h
src/declarative/particles/qsgcustomparticle.cpp
src/declarative/particles/qsgparticlesystem.cpp
Change-Id: I24e81d3652368c5031305ffa7f969f9f2c249c6c
Diffstat (limited to 'src/qtquick1/graphicsitems/qdeclarativetextinput.cpp')
-rw-r--r-- | src/qtquick1/graphicsitems/qdeclarativetextinput.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextinput.cpp b/src/qtquick1/graphicsitems/qdeclarativetextinput.cpp index 85f564e99d..3a36e6b070 100644 --- a/src/qtquick1/graphicsitems/qdeclarativetextinput.cpp +++ b/src/qtquick1/graphicsitems/qdeclarativetextinput.cpp @@ -48,6 +48,7 @@ #include <QValidator> #include <QTextCursor> #include <QApplication> +#include <QtGui/QInputPanel> #include <QFontMetrics> #include <QPainter> #include <QTextBoundaryFinder> @@ -904,7 +905,7 @@ void QDeclarative1TextInput::setEchoMode(QDeclarative1TextInput::EchoMode echo) Q_D(QDeclarative1TextInput); if (echoMode() == echo) return; - d->control->setEchoMode((uint)echo); + d->control->setEchoMode((QLineControl::EchoMode)echo); d->updateInputMethodHints(); q_textChanged(); emit echoModeChanged(echoMode()); @@ -1281,7 +1282,6 @@ bool QDeclarative1TextInput::event(QEvent* ev) void QDeclarative1TextInput::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { - Q_D(QDeclarative1TextInput); if (newGeometry.width() != oldGeometry.width()) { updateSize(); updateCursorRectangle(); @@ -1767,11 +1767,10 @@ void QDeclarative1TextInput::moveCursorSelection(int pos, SelectionMode mode) */ void QDeclarative1TextInput::openSoftwareInputPanel() { - QEvent event(QEvent::RequestSoftwareInputPanel); if (qApp) { if (QGraphicsView * view = qobject_cast<QGraphicsView*>(qApp->focusWidget())) { if (view->scene() && view->scene() == scene()) { - QApplication::sendEvent(view, &event); + qApp->inputPanel()->show(); } } } @@ -1818,12 +1817,10 @@ void QDeclarative1TextInput::openSoftwareInputPanel() */ void QDeclarative1TextInput::closeSoftwareInputPanel() { - QEvent event(QEvent::CloseSoftwareInputPanel); if (qApp) { - QEvent event(QEvent::CloseSoftwareInputPanel); if (QGraphicsView * view = qobject_cast<QGraphicsView*>(qApp->focusWidget())) { if (view->scene() && view->scene() == scene()) { - QApplication::sendEvent(view, &event); + qApp->inputPanel()->hide(); } } } |