summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-06-24 16:34:16 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-06-24 16:36:41 +0200
commit6270d5c69f862d714f26960398ad5adae8e4a567 (patch)
treeb39a617f344f1c1727a3e04a42b6de5777ffd802 /src/gui/widgets/qlineedit.cpp
parent938d9a4f080cc9205e5628678eda5244b02ec96a (diff)
QLineEdit's context menu now disables cut/copy action in password mode
Task-number: 256838 Reviewed-by: janarve
Diffstat (limited to 'src/gui/widgets/qlineedit.cpp')
-rw-r--r--src/gui/widgets/qlineedit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index ab2a7b7f32..4baae8936a 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -2689,11 +2689,11 @@ QMenu *QLineEdit::createStandardContextMenu()
#ifndef QT_NO_CLIPBOARD
action = popup->addAction(QLineEdit::tr("Cu&t") + ACCEL_KEY(QKeySequence::Cut));
- action->setEnabled(!d->readOnly && d->hasSelectedText());
+ action->setEnabled(!d->readOnly && d->hasSelectedText() && d->echoMode == QLineEdit::Normal);
connect(action, SIGNAL(triggered()), SLOT(cut()));
action = popup->addAction(QLineEdit::tr("&Copy") + ACCEL_KEY(QKeySequence::Copy));
- action->setEnabled(d->hasSelectedText());
+ action->setEnabled(d->hasSelectedText() && d->echoMode == QLineEdit::Normal);
connect(action, SIGNAL(triggered()), SLOT(copy()));
action = popup->addAction(QLineEdit::tr("&Paste") + ACCEL_KEY(QKeySequence::Paste));