forked from qt-creator/qt-creator
add keyboard accelerators to the "file deleted" prompt message box
Change-Id: Ifaa790abd795ab3922ad354cd676770ab18c2805 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user