summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-09-10 18:06:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-12 12:26:23 +0200
commitc0f9aeffc17010547ecdb44900d717f01eb4f1b4 (patch)
treeac4f23526fff45262bba7eeaf6f01f807f4ddf4a /src
parent96c711fed2463e49f3d7e92063a0b6b596910336 (diff)
QMessageBox: implemented shortcut for selectAll
The context menu all along has indicated that Ctrl-A selects all the text, so now that is actually implemented. Task-number: QTBUG-6731 Change-Id: I82dac3aea530e5a3fcd59217c4c0118025061c7d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 87f2748c92..e4f1dfed15 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -143,6 +143,11 @@ public:
#endif
}
+ void selectAll()
+ {
+ textEdit->selectAll();
+ }
+
private slots:
void textCopyAvailable(bool available)
{
@@ -1396,6 +1401,10 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
e->setAccepted(true);
return;
}
+ } else if (e == QKeySequence::SelectAll && d->detailsText && d->detailsText->isVisible()) {
+ d->detailsText->selectAll();
+ e->setAccepted(true);
+ return;
}
#endif // !QT_NO_TEXTEDIT