Skip to content

Commit

Permalink
fix deprecated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg committed Dec 17, 2022
1 parent 3f7d0bf commit 6162607
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ kdev4/
# Cquery
.cquery_cache

.cache

# Source trail
*.srctrlbm
*.srctrldb
6 changes: 3 additions & 3 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,18 +388,18 @@ void MainWindow::closeEvent(QCloseEvent* event) {

// see if they want to save them
for (auto mod : mModuleBrowser->dirtyModules()) {
auto bc = KMessageBox::questionYesNoCancel(
auto bc = KMessageBox::questionTwoActionsCancel(
this,
i18n("Module <b>") + QString::fromStdString(mod->fullName()) +
i18n("</b> has unsaved changes. Do you want to save your changes or discard them?"),
i18n("Close"), KStandardGuiItem::save(), KStandardGuiItem::discard());

switch (bc) {
case KMessageBox::Yes:
case KMessageBox::PrimaryAction:
// this means save
save();
break;
case KMessageBox::No:
case KMessageBox::SecondaryAction:
// this means discard
// TODO: implement discard
break;
Expand Down

0 comments on commit 6162607

Please sign in to comment.