aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-07-09 14:45:30 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-11 12:35:47 +0200
commitbcf3afa90f371b7ea0d32285d6065046e9296f52 (patch)
treed5e9ef457344a7067ac0547b45a44cdd6fbe2671 /src
parentbea91095ba59b0b4501afb570c44dc8123855ecd (diff)
Remove code for unused LinksAccessibleByKeyboard option.
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>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquicktextcontrol.cpp8
-rw-r--r--src/quick/items/qquicktextedit.cpp24
-rw-r--r--src/quick/items/qquicktextedit_p.h3
3 files changed, 2 insertions, 33 deletions
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp
index d2ff4dc649..af3f509f5b 100644
--- a/src/quick/items/qquicktextcontrol.cpp
+++ b/src/quick/items/qquicktextcontrol.cpp
@@ -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;
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 71e5dfb57b..df13075801 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -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
diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h
index b5180e70f4..fd6a1f3de9 100644
--- a/src/quick/items/qquicktextedit_p.h
+++ b/src/quick/items/qquicktextedit_p.h
@@ -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;