add keyboard accelerators to the "file deleted" prompt message box

Change-Id: Ifaa790abd795ab3922ad354cd676770ab18c2805
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Joerg Bornemann
2011-11-10 17:15:02 +01:00
committed by hjk
parent bcc224b8c4
commit db9cfc06ac

View File

@@ -92,9 +92,9 @@ QTCREATOR_UTILS_EXPORT Utils::FileDeletedPromptAnswer
msg = QCoreApplication::translate("Utils::fileDeletedPrompt",
"The file %1 was removed. Do you want to save it under a different name, or close the editor?").arg(QDir::toNativeSeparators(fileName));
QMessageBox box(QMessageBox::Question, title, msg, QMessageBox::NoButton, parent);
QPushButton *close = box.addButton(QCoreApplication::translate("Utils::fileDeletedPrompt", "Close"), QMessageBox::RejectRole);
QPushButton *saveas = box.addButton(QCoreApplication::translate("Utils::fileDeletedPrompt", "Save as..."), QMessageBox::ActionRole);
QPushButton *save = box.addButton(QCoreApplication::translate("Utils::fileDeletedPrompt", "Save"), QMessageBox::AcceptRole);
QPushButton *close = box.addButton(QCoreApplication::translate("Utils::fileDeletedPrompt", "&Close"), QMessageBox::RejectRole);
QPushButton *saveas = box.addButton(QCoreApplication::translate("Utils::fileDeletedPrompt", "Save &as..."), QMessageBox::ActionRole);
QPushButton *save = box.addButton(QCoreApplication::translate("Utils::fileDeletedPrompt", "&Save"), QMessageBox::AcceptRole);
box.setDefaultButton(saveas);
box.exec();
QAbstractButton *clickedbutton = box.clickedButton();