diff options
author | Dyami Caliri <dyami@dragonframe.com> | 2014-09-17 18:11:57 (GMT) |
---|---|---|
committer | Dyami Caliri <dyami@dragonframe.com> | 2014-09-29 16:03:26 (GMT) |
commit | 45de76f8e071edcf77bc3bd006f052fe5b3f01fc (patch) | |
tree | 2c5ecb9dd2d2c8ccdeaaa284faf75904f1ccd706 /src/gui | |
parent | d1b700ef29ab95ac999a9644f1b3c62333f8da19 (diff) | |
download | Qt-45de76f8e071edcf77bc3bd006f052fe5b3f01fc.zip Qt-45de76f8e071edcf77bc3bd006f052fe5b3f01fc.tar.gz Qt-45de76f8e071edcf77bc3bd006f052fe5b3f01fc.tar.bz2 |
QLineEdit: Disable standard key 'cut' when there is no selection.
(cherry-picked from qtbase/0aa84a619ea0a7c85a1ed48ed28817d4c7e40b33)
Task-number: QTBUG-40477
Change-Id: I48aa7ecc4ee8a8e4e9feaf9b6cba5109d2d1f725
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 8ff2aea..df8269f 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -1699,7 +1699,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event) } } else if (event == QKeySequence::Cut) { - if (!isReadOnly()) { + if (!isReadOnly() && hasSelectedText()) { copy(); del(); } |