diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-24 14:34:16 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-24 14:36:41 (GMT) |
commit | 6270d5c69f862d714f26960398ad5adae8e4a567 (patch) | |
tree | b39a617f344f1c1727a3e04a42b6de5777ffd802 /src/gui/widgets | |
parent | 938d9a4f080cc9205e5628678eda5244b02ec96a (diff) | |
download | Qt-6270d5c69f862d714f26960398ad5adae8e4a567.zip Qt-6270d5c69f862d714f26960398ad5adae8e4a567.tar.gz Qt-6270d5c69f862d714f26960398ad5adae8e4a567.tar.bz2 |
QLineEdit's context menu now disables cut/copy action in password mode
Task-number: 256838
Reviewed-by: janarve
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qlineedit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index ab2a7b7..4baae89 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)); |