aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quick/items/qquicktextedit.cpp16
-rw-r--r--src/quick/items/qquicktextedit_p.h12
2 files changed, 12 insertions, 16 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index aca7150ca2..1ad37ed7dd 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -1232,15 +1232,21 @@ void QQuickTextEdit::setTextMargin(qreal margin)
\endlist
*/
-#ifndef QT_NO_IM
Qt::InputMethodHints QQuickTextEdit::inputMethodHints() const
{
+#ifdef QT_NO_IM
+ return Qt::ImhNone;
+#else
Q_D(const QQuickTextEdit);
return d->inputMethodHints;
+#endif // QT_NO_IM
}
void QQuickTextEdit::setInputMethodHints(Qt::InputMethodHints hints)
{
+#ifdef QT_NO_IM
+ Q_UNUSED(hints);
+#else
Q_D(QQuickTextEdit);
if (hints == d->inputMethodHints)
@@ -1249,8 +1255,8 @@ void QQuickTextEdit::setInputMethodHints(Qt::InputMethodHints hints)
d->inputMethodHints = hints;
updateInputMethod(Qt::ImHints);
emit inputMethodHintsChanged();
-}
#endif // QT_NO_IM
+}
void QQuickTextEdit::geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry)
@@ -1956,7 +1962,6 @@ bool QQuickTextEdit::canRedo() const
return d->document->isRedoAvailable();
}
-#ifndef QT_NO_IM
/*!
\qmlproperty bool QtQuick::TextEdit::inputMethodComposing
@@ -1971,10 +1976,13 @@ bool QQuickTextEdit::canRedo() const
*/
bool QQuickTextEdit::isInputMethodComposing() const
{
+#ifdef QT_NO_IM
+ return false;
+#else
Q_D(const QQuickTextEdit);
return d->control->hasImState();
-}
#endif // QT_NO_IM
+}
void QQuickTextEditPrivate::init()
{
diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h
index 262dc04445..ea47c3b60e 100644
--- a/src/quick/items/qquicktextedit_p.h
+++ b/src/quick/items/qquicktextedit_p.h
@@ -81,18 +81,14 @@ class Q_QUICK_PRIVATE_EXPORT QQuickTextEdit : public QQuickImplicitSizeItem
Q_PROPERTY(bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged)
Q_PROPERTY(bool persistentSelection READ persistentSelection WRITE setPersistentSelection NOTIFY persistentSelectionChanged)
Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged)
-#ifndef QT_NO_IM
Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged)
-#endif
Q_PROPERTY(bool selectByKeyboard READ selectByKeyboard WRITE setSelectByKeyboard NOTIFY selectByKeyboardChanged REVISION 1)
Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged)
Q_PROPERTY(SelectionMode mouseSelectionMode READ mouseSelectionMode WRITE setMouseSelectionMode NOTIFY mouseSelectionModeChanged)
Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged)
Q_PROPERTY(bool canUndo READ canUndo NOTIFY canUndoChanged)
Q_PROPERTY(bool canRedo READ canRedo NOTIFY canRedoChanged)
-#ifndef QT_NO_IM
Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged)
-#endif
Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl RESET resetBaseUrl NOTIFY baseUrlChanged)
Q_PROPERTY(RenderType renderType READ renderType WRITE setRenderType NOTIFY renderTypeChanged)
Q_PROPERTY(QQuickTextDocument *textDocument READ textDocument FINAL REVISION 1)
@@ -192,10 +188,8 @@ public:
qreal textMargin() const;
void setTextMargin(qreal margin);
-#ifndef QT_NO_IM
Qt::InputMethodHints inputMethodHints() const;
void setInputMethodHints(Qt::InputMethodHints hints);
-#endif
bool selectByKeyboard() const;
void setSelectByKeyboard(bool);
@@ -239,9 +233,7 @@ public:
QRectF boundingRect() const Q_DECL_OVERRIDE;
QRectF clipRect() const Q_DECL_OVERRIDE;
-#ifndef QT_NO_IM
bool isInputMethodComposing() const;
-#endif
RenderType renderType() const;
void setRenderType(RenderType renderType);
@@ -286,14 +278,10 @@ Q_SIGNALS:
void canPasteChanged();
void canUndoChanged();
void canRedoChanged();
-#ifndef QT_NO_IM
void inputMethodComposingChanged();
-#endif
void effectiveHorizontalAlignmentChanged();
void baseUrlChanged();
-#ifndef QT_NO_IM
void inputMethodHintsChanged();
-#endif
void renderTypeChanged();
public Q_SLOTS: