Remove code for unused LinksAccessibleByKeyboard option.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Mon, 9 Jul 2012 04:45:30 +0000 (14:45 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Jul 2012 10:35:47 +0000 (12:35 +0200)
The text interaction flags aren't exposed publicly and the option isn't
set by TextEdit itself so there's no need to handle it.

Change-Id: I83b98e58e3b8cb8c55752d8eefe3bf36bff75249
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquicktextcontrol.cpp
src/quick/items/qquicktextedit.cpp
src/quick/items/qquicktextedit_p.h

index d2ff4dc..af3f509 100644 (file)
@@ -818,14 +818,6 @@ void QQuickTextControlPrivate::keyPressEvent(QKeyEvent *e)
         && cursorMoveKeyEvent(e))
         goto accept;
 
-    if (interactionFlags & Qt::LinksAccessibleByKeyboard) {
-        if ((e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && cursor.hasSelection()) {
-            e->accept();
-            activateLinkUnderCursor();
-            return;
-        }
-    }
-
     if (!(interactionFlags & Qt::TextEditable)) {
         e->ignore();
         return;
index 71e5dfb..df13075 100644 (file)
@@ -1241,9 +1241,9 @@ void QQuickTextEdit::setSelectByMouse(bool on)
         d->selectByMouse = on;
         setKeepMouseGrab(on);
         if (on)
-            setTextInteractionFlags(d->control->textInteractionFlags() | Qt::TextSelectableByMouse);
+            d->control->setTextInteractionFlags(d->control->textInteractionFlags() | Qt::TextSelectableByMouse);
         else
-            setTextInteractionFlags(d->control->textInteractionFlags() & ~Qt::TextSelectableByMouse);
+            d->control->setTextInteractionFlags(d->control->textInteractionFlags() & ~Qt::TextSelectableByMouse);
         emit selectByMouseChanged(on);
     }
 }
@@ -1312,26 +1312,6 @@ bool QQuickTextEdit::isReadOnly() const
 }
 
 /*!
-    Sets how the text edit should interact with user input to the given
-    \a flags.
-*/
-void QQuickTextEdit::setTextInteractionFlags(Qt::TextInteractionFlags flags)
-{
-    Q_D(QQuickTextEdit);
-    d->control->setTextInteractionFlags(flags);
-}
-
-/*!
-    Returns the flags specifying how the text edit should interact
-    with user input.
-*/
-Qt::TextInteractionFlags QQuickTextEdit::textInteractionFlags() const
-{
-    Q_D(const QQuickTextEdit);
-    return d->control->textInteractionFlags();
-}
-
-/*!
     \qmlproperty rectangle QtQuick2::TextEdit::cursorRectangle
 
     The rectangle where the standard text cursor is rendered
index b5180e7..fd6a1f3 100644 (file)
@@ -212,9 +212,6 @@ public:
     void setReadOnly(bool);
     bool isReadOnly() const;
 
-    void setTextInteractionFlags(Qt::TextInteractionFlags flags);
-    Qt::TextInteractionFlags textInteractionFlags() const;
-
     QRectF cursorRectangle() const;
 
     QVariant inputMethodQuery(Qt::InputMethodQuery property) const;