Commit cfe0be76 authored by Laurent Montel's avatar Laurent Montel
Browse files

KMessageBox::sorry is deprecated in kf5.97

parent ec109ac2
Pipeline #210500 failed with stage
in 47 seconds
......@@ -257,7 +257,7 @@ void PluginBabelFish::translateURL(QAction *action)
QString title = i18nc("@title:window", "Malformed URL");
QString text = i18n("The URL you entered is not valid, please "
"correct it and try again.");
KMessageBox::sorry(part->widget(), text, title);
KMessageBox::error(part->widget(), text, title);
return;
}
}
......
......@@ -133,7 +133,7 @@ void FSView::setPath(const QString &p)
QUrl u = QUrl::fromLocalFile(_path);
if (!KUrlAuthorized::authorizeUrlAction(QStringLiteral("list"), QUrl(), u)) {
QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, u.toDisplayString());
KMessageBox::sorry(this, msg);
KMessageBox::error(this, msg);
}
ScanDir *d = _sm.setTop(_path);
......
......@@ -38,7 +38,11 @@
#include <KPluginFactory>
#include <KProtocolInfo>
#include <KToggleAction>
<<<<<<< Updated upstream
#include <konq_kpart_plugin.h>
=======
#include <KToolInvocation>
>>>>>>> Stashed changes
#define QL1S(x) QLatin1String(x)
......@@ -167,7 +171,7 @@ void KGetPlugin::slotShowSelectedLinks()
void KGetPlugin::slotImportLinks()
{
if (m_linkList.isEmpty()) {
KMessageBox::sorry(partWidget(parent()), i18n("No downloadable links were found."), i18n("No Links"));
KMessageBox::error(partWidget(parent()), i18n("No downloadable links were found."), i18n("No Links"));
return;
}
......
......@@ -176,7 +176,7 @@ void SettingsPlugin::toggleCookies(bool checked)
QDBusReply<void> reply = kded.call(QStringLiteral("setDomainAdvice"), part->url().url(), advice);
if (!reply.isValid())
KMessageBox::sorry(part->widget(),
KMessageBox::error(part->widget(),
i18n("The cookie setting could not be changed, because the "
"cookie daemon could not be contacted."),
i18nc("@title:window", "Cookie Settings Unavailable"));
......
......@@ -59,13 +59,13 @@ void KImGalleryPlugin::slotExecute()
{
m_progressDlg = nullptr;
if (!parent()) {
KMessageBox::sorry(nullptr, i18n("Could not create the plugin, please report a bug."));
KMessageBox::error(nullptr, i18n("Could not create the plugin, please report a bug."));
return;
}
m_part = qobject_cast<KParts::ReadOnlyPart *>(parent());
if (!m_part || !m_part->url().isLocalFile()) { //TODO support remote URLs too?
KMessageBox::sorry(m_part->widget(), i18n("Creating an image gallery works only on local folders."));
KMessageBox::error(m_part->widget(), i18n("Creating an image gallery works only on local folders."));
return;
}
......@@ -108,7 +108,7 @@ bool KImGalleryPlugin::createDirectory(const QDir &dir, const QString &imgGaller
if (!thumb_dir.exists()) {
thumb_dir.setPath(imgGalleryDir);
if (!(thumb_dir.mkdir(dirName/*, false*/))) {
KMessageBox::sorry(m_part->widget(), i18n("Could not create folder: %1", thumb_dir.path()));
KMessageBox::error(m_part->widget(), i18n("Could not create folder: %1", thumb_dir.path()));
return false;
} else {
thumb_dir.setPath(imgGalleryDir + '/' + dirName + '/');
......@@ -272,7 +272,7 @@ bool KImGalleryPlugin::createHtml(const QUrl &url, const QString &sourceDirName,
if (!subDir.exists()) {
subDir.setPath(directory(url));
if (!(subDir.mkdir(currentDir/*, false*/))) {
KMessageBox::sorry(m_part->widget(), i18n("Could not create folder: %1", subDir.path()));
KMessageBox::error(m_part->widget(), i18n("Could not create folder: %1", subDir.path()));
continue;
} else {
subDir.setPath(directory(url) + '/' + currentDir);
......@@ -341,7 +341,7 @@ bool KImGalleryPlugin::createHtml(const QUrl &url, const QString &sourceDirName,
if (!path.endsWith("/")) {
path += '/';
}
KMessageBox::sorry(m_part->widget(), i18n("Could not open file: %1", path));
KMessageBox::error(m_part->widget(), i18n("Could not open file: %1", path));
return false;
}
}
......@@ -436,7 +436,7 @@ void KImGalleryPlugin::loadCommentFile()
qCDebug(IMAGEGALLERY_LOG) << "File closed.";
delete m_textStream;
} else {
KMessageBox::sorry(m_part->widget(), i18n("Could not open file: %1", m_configDlg->getCommentFile()));
KMessageBox::error(m_part->widget(), i18n("Could not open file: %1", m_configDlg->getCommentFile()));
m_useCommentFile = false;
}
}
......
......@@ -38,7 +38,7 @@ void KShellCmdPlugin::slotExecuteShellCommand()
{
KParts::ReadOnlyPart *part = qobject_cast<KParts::ReadOnlyPart *>(parent());
if (!part) {
KMessageBox::sorry(nullptr, i18n("KShellCmdPlugin::slotExecuteShellCommand: Program error, please report a bug."));
KMessageBox::error(nullptr, i18n("KShellCmdPlugin::slotExecuteShellCommand: Program error, please report a bug."));
return;
}
......@@ -48,7 +48,7 @@ void KShellCmdPlugin::slotExecuteShellCommand()
url = statJob->mostLocalUrl();
}
if (!url.isLocalFile()) {
KMessageBox::sorry(part->widget(), i18n("Executing shell commands works only on local directories."));
KMessageBox::error(part->widget(), i18n("Executing shell commands works only on local directories."));
return;
}
......
......@@ -5004,7 +5004,7 @@ void KonqMainWindow::slotAddWebSideBar(const QUrl &url, const QString &name)
QAction *a = m_toggleViewGUIClient->action(QStringLiteral("konq_sidebartng"));
if (!a) {
KMessageBox::sorry(nullptr, i18n("Your sidebar is not functional or unavailable. A new entry cannot be added."), i18nc("@title:window", "Web Sidebar"));
KMessageBox::error(nullptr, i18n("Your sidebar is not functional or unavailable. A new entry cannot be added."), i18nc("@title:window", "Web Sidebar"));
return;
}
......
......@@ -20,7 +20,6 @@
#include <KParts/BrowserInterface>
#include <KParts/BrowserExtension>
#include <KParts/PartLoader>
#include <KParts/BrowserOpenOrSaveQuestion>
#include <KIO/FileCopyJob>
#include <KJobWidgets>
#include <KProtocolManager>
......
......@@ -13,7 +13,6 @@
#include <algorithm>
#include <QWebEngineCertificateError>
#include <KSharedConfig>
#include <KConfigGroup>
......
......@@ -73,7 +73,6 @@
#include <QMenu>
#include <QStatusBar>
#include <QWebEngineScriptCollection>
#include <QWebEngineScript>
#include <QDir>
#include "utils.h"
......
......@@ -23,7 +23,6 @@
#include "webenginepartcertificateerrordlg.h"
#include "ui_webenginepartcertificateerrordlg.h"
#include "webenginepage.h"
#include <KSslCertificateBox>
......
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