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>
This commit is contained in:
Shawn Rutledge 2013-09-10 18:06:04 +02:00 committed by The Qt Project
parent 96c711fed2
commit c0f9aeffc1

View File

@ -143,6 +143,11 @@ public:
#endif #endif
} }
void selectAll()
{
textEdit->selectAll();
}
private slots: private slots:
void textCopyAvailable(bool available) void textCopyAvailable(bool available)
{ {
@ -1396,6 +1401,10 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
e->setAccepted(true); e->setAccepted(true);
return; return;
} }
} else if (e == QKeySequence::SelectAll && d->detailsText && d->detailsText->isVisible()) {
d->detailsText->selectAll();
e->setAccepted(true);
return;
} }
#endif // !QT_NO_TEXTEDIT #endif // !QT_NO_TEXTEDIT