#include "qsgsimplerectnode.h"
#include <QtDeclarative/qdeclarativeinfo.h>
-#include <QtGui/qapplication.h>
-#include <QtGui/qgraphicssceneevent.h>
+#include <QtWidgets/qapplication.h>
+#include <QtWidgets/qgraphicssceneevent.h>
#include <QtGui/qpainter.h>
#include <QtGui/qtextobject.h>
#include <QtCore/qmath.h>
d->control->processEvent(event, QPointF(0, -d->yoff));
if (!d->showInputPanelOnFocus) { // input panel on click
if (d->focusOnPress && !isReadOnly() && boundingRect().contains(event->pos())) {
- if (canvas() && canvas() == qApp->focusWidget()) {
- qt_widget_private(canvas())->handleSoftwareInputPanel(event->button(), d->clickCausedFocus);
- }
+ // ### refactor: port properly
+ qDebug("QSGTextEdit: virtual keyboard handling not implemented");
+// if (canvas() && canvas() == qApp->focusWidget()) {
+// qt_widget_private(canvas())->handleSoftwareInputPanel(event->button(), d->clickCausedFocus);
+// }
}
}
d->clickCausedFocus = false;
{
Q_D(QSGTextEdit);
if (change == ItemActiveFocusHasChanged) {
- setCursorVisible(value.boolValue && d->canvas && d->canvas->hasFocus());
+ setCursorVisible(value.boolValue); // ### refactor: focus handling && d->canvas && d->canvas->hasFocus());
}
QSGItem::itemChange(change, value);
}
void QSGTextEdit::openSoftwareInputPanel()
{
if (qApp) {
- if (canvas() && canvas() == qApp->focusWidget()) {
+ if (canvas()) {
QEvent event(QEvent::RequestSoftwareInputPanel);
QApplication::sendEvent(canvas(), &event);
}
\endcode
*/
void QSGTextEdit::closeSoftwareInputPanel()
-{
+{
if (qApp) {
- if (canvas() && canvas() == qApp->focusWidget()) {
+ if (canvas()) {
QEvent event(QEvent::CloseSoftwareInputPanel);
QApplication::sendEvent(canvas(), &event);
}