Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Port fron yesNoQuestion to twoActionQuestion
Halla Rempt2b37c40f272d
diff --git a/libs/widgetutils/xmlgui/KisShortcutsDialog_p.cpp b/libs/widgetutils/xmlgui/KisShortcutsDialog_p.cppindex 359db21142..b71bd13842 100644--- a/libs/widgetutils/xmlgui/KisShortcutsDialog_p.cpp+++ b/libs/widgetutils/xmlgui/KisShortcutsDialog_p.cpp@@ -42,7 +42,12 @@ void KisShortcutsDialog::KisShortcutsDialogPrivate::changeShortcutScheme(const QQString dialogText = i18n("The current shortcut scheme is modified. Save before switching to the new one?");if (m_shortcutsEditor->isModified() &&- KMessageBox::questionYesNo( q,dialogText ) == KMessageBox::Yes) {+ KMessageBox::questionTwoActions(q,+ i18n("The current shortcut scheme is modified. Save before switching to the new one?"),+ QString(),+ KStandardGuiItem::save(),+ KStandardGuiItem::discard())+ == KMessageBox::PrimaryAction) {m_shortcutsEditor->save();} else {m_shortcutsEditor->undo();diff --git a/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp b/libs/widgetutils/xmlgui/kshortcutschemeseditor.cppindex 8186855def..f0109290d4 100644--- a/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp+++ b/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp@@ -123,9 +123,14 @@ void KisKShortcutSchemesEditor::newScheme()void KisKShortcutSchemesEditor::deleteScheme(){- if (KMessageBox::questionYesNo(m_dialog,- i18n("Do you really want to delete the scheme %1?\n\-Note that this will not remove any system wide shortcut schemes.", currentScheme())) == KMessageBox::No) {+ if (KMessageBox::questionTwoActions(m_dialog,+ i18n("Do you really want to delete the scheme %1?\n\+ Note that this will not remove any system wide shortcut schemes.",+ currentScheme()),+ QString(),+ KStandardGuiItem::del(),+ KStandardGuiItem::cancel())+ == KMessageBox::SecondaryAction) {return;}