Commit 4207fd4c authored by Laurent Montel's avatar Laurent Montel
Browse files

Port KMessageBox::sorry deprecated method

parent b5116cfc
Pipeline #213509 passed with stage
in 4 minutes and 21 seconds
......@@ -743,7 +743,7 @@ void kpDocumentMetaInfoDialog::accept ()
(void) metaInfo (&errorMessage);
if (!errorMessage.isEmpty ())
{
KMessageBox::sorry (this, errorMessage, i18nc ("@title:window", "Invalid Text Fields"));
KMessageBox::error (this, errorMessage, i18nc ("@title:window", "Invalid Text Fields"));
return;
}
......
......@@ -110,7 +110,7 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
// Or at least choose one consistently.
//
// TODO: Have captions for all dialogs in KolourPaint.
KMessageBox::sorry (parent,
KMessageBox::error (parent,
i18n ("Could not open \"%1\".",
kpUrlFormatter::PrettyFilename (url)));
}
......@@ -146,7 +146,7 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
if (image.isNull ())
{
KMessageBox::sorry (parent,
KMessageBox::error (parent,
i18n ("Could not open \"%1\" - unsupported image format.\n"
"The file may be corrupt.",
kpUrlFormatter::PrettyFilename (url)));
......
......@@ -117,7 +117,7 @@ kpColorCollection::~kpColorCollection()
static void CouldNotOpenDialog (const QUrl &url, QWidget *parent)
{
KMessageBox::sorry (parent,
KMessageBox::error (parent,
i18n ("Could not open color palette \"%1\".",
kpUrlFormatter::PrettyFilename (url)));
}
......@@ -150,7 +150,7 @@ kpColorCollection::open(const QUrl &url, QWidget *parent)
QString line = stream.readLine();
if (line.indexOf(QLatin1String(" Palette")) == -1)
{
KMessageBox::sorry (parent,
KMessageBox::error (parent,
i18n ("Could not open color palette \"%1\" - unsupported format.\n"
"The file may be corrupt.",
kpUrlFormatter::PrettyFilename (url)));
......@@ -210,7 +210,7 @@ kpColorCollection::open(const QUrl &url, QWidget *parent)
static void CouldNotOpenKDEDialog (const QString &name, QWidget *parent)
{
KMessageBox::sorry (parent,
KMessageBox::error (parent,
i18n ("Could not open KDE color palette \"%1\".", name));
}
......
......@@ -606,7 +606,7 @@ void kpMainWindow::slotPaste()
{
kpSetOverrideCursorSaver cursorSaver(Qt::ArrowCursor);
KMessageBox::sorry(this,
KMessageBox::error(this,
i18n("<qt>KolourPaint cannot paste the contents of"
" the clipboard as it has an unknown format.</qt>"),
i18n("Cannot Paste"));
......
......@@ -543,7 +543,7 @@ void kpMainWindow::slotScan ()
// No scanning support (kdegraphics/libkscan) installed?
if (!d->scanDialog)
{
KMessageBox::sorry (this,
KMessageBox::error (this,
i18n("Failed to open scanning dialog."),
i18nc("@title:window", "Scanning Failed"));
return;
......
......@@ -70,7 +70,7 @@ bool SaneDialog::setup()
}
if (!m_ksanew->openDevice(m_openDev)) {
// could not open the scanner
KMessageBox::sorry(nullptr, i18n("Opening the selected scanner failed."));
KMessageBox::error(nullptr, i18n("Opening the selected scanner failed."));
m_openDev = QString();
return false;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment