Skip to content

armgit / krita

Public Imported from GitHub
0

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 away from missing KMessageBox::sorry

Halla Rempt14d0cc216819
diff --git a/libs/widgetutils/xmlgui/kkeysequencewidget.cpp b/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
index fa40d5d882..dff6003bdf 100644
--- a/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
+++ b/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
@@ -199,7 +199,7 @@ void KisKKeySequenceWidgetPrivate::wontStealShortcut(QAction *item, const QKeySe
QString msg(i18n("<qt>The '%1' key combination is already used by the <b>%2</b> action.<br>"
"Please select a different one.</qt>", seq.toString(QKeySequence::NativeText),
KLocalizedString::removeAcceleratorMarker(item->text())));
- KMessageBox::sorry(q, msg, title);
+ KMessageBox::error(q, msg, title);
}
KisKKeySequenceWidget::KisKKeySequenceWidget(QWidget *parent)
@@ -638,7 +638,7 @@ void KKeySequenceButton::keyPressEvent(QKeyEvent *e)
// Qt sometimes returns garbage keycodes, I observed -1, if it doesn't know a key.
// We cannot do anything useful with those (several keys have -1, indistinguishable)
// and QKeySequence.toString() will also yield a garbage string.
- KMessageBox::sorry(this,
+ KMessageBox::error(this,
i18n("The key you just pressed is not supported by Qt."),
i18n("Unsupported Key"));
return d->cancelRecording();
@@ -701,7 +701,7 @@ void KKeySequenceButton::keyPressEvent(QKeyEvent *e)
* TODO: in the future replace the whole widget with QKeySequenceEdit,
* it uses QKeyMapper directly.
*/
- const QList<int> vec = QKeyMapper::possibleKeys(e);
+ const QList<QKeyCombination> vec = QKeyMapper::possibleKeys(e);
if (!vec.isEmpty() && e->modifiers() != Qt::NoModifier) {
/**
diff --git a/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp b/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp
index f0109290d4..e4c6603cd5 100644
--- a/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp
+++ b/libs/widgetutils/xmlgui/kshortcutschemeseditor.cpp
@@ -100,7 +100,7 @@ void KisKShortcutSchemesEditor::newScheme()
}
if (m_schemesList->findText(newName) != -1) {
- KMessageBox::sorry(m_dialog, i18n("A scheme with this name already exists."));
+ KMessageBox::error(m_dialog, i18n("A scheme with this name already exists."));
return;
}
diff --git a/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyOptionWidget.cpp b/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyOptionWidget.cpp
index a555791deb..985f77a1f0 100644
--- a/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyOptionWidget.cpp
+++ b/plugins/tools/karbonplugins/tools/CalligraphyTool/KarbonCalligraphyOptionWidget.cpp
@@ -215,8 +215,8 @@ void KarbonCalligraphyOptionWidget::saveProfileAs()
}
if (name.isEmpty() || name == i18n("Current")) {
- KMessageBox::sorry(this,
- i18n("Sorry, the name you entered is invalid."),
+ KMessageBox::error(this,
+ i18n("The name you entered is invalid."),
i18nc("invalid profile name", "Invalid name."));
continue; // ask again
diff --git a/plugins/tools/tool_transform2/kis_free_transform_strategy_gsl_helpers.cpp b/plugins/tools/tool_transform2/kis_free_transform_strategy_gsl_helpers.cpp
index bf7bec31df..c85d4beaec 100644
--- a/plugins/tools/tool_transform2/kis_free_transform_strategy_gsl_helpers.cpp
+++ b/plugins/tools/tool_transform2/kis_free_transform_strategy_gsl_helpers.cpp
@@ -435,7 +435,7 @@ namespace GSL
{
QMessageBox::warning(qApp->activeWindow(),
i18nc("@title:window", "Krita"),
- i18n("Sorry, Krita was built without the support "
+ i18n("Krita was built without the support "
"of GNU Scientific Library, so you cannot scale "
"the selection with handles. Please compile "
"Krita with GNU Scientific Library support, or use "