summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDyami Caliri <dyami@dragonframe.com>2014-09-17 18:11:57 (GMT)
committerDyami Caliri <dyami@dragonframe.com>2014-09-29 16:03:26 (GMT)
commit45de76f8e071edcf77bc3bd006f052fe5b3f01fc (patch)
tree2c5ecb9dd2d2c8ccdeaaa284faf75904f1ccd706 /src/gui
parentd1b700ef29ab95ac999a9644f1b3c62333f8da19 (diff)
downloadQt-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.cpp2
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();
}