Commit 18c3aa64 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port some deprecated methods

parent 199bbe20
......@@ -1691,7 +1691,7 @@ void FolderModel::updateActions()
if (m_newMenu) {
m_newMenu->checkUpToDate();
m_newMenu->setPopupFiles(m_dirModel->dirLister()->url());
m_newMenu->setPopupFiles(QList<QUrl>() << m_dirModel->dirLister()->url());
// we need to set here as well, when the menu is shown via AppletInterface::eventFilter
m_menuPosition = QCursor::pos();
......
......@@ -44,7 +44,6 @@
#include <X11/keysymdef.h>
K_PLUGIN_FACTORY(KAccessConfigFactory, registerPlugin<KAccessConfig>();)
K_EXPORT_PLUGIN(KAccessConfigFactory("kcmaccess"))
QString mouseKeysShortcut(Display *display)
{
......
......@@ -43,7 +43,7 @@
#include "timedated_interface.h"
K_PLUGIN_FACTORY(KlockModuleFactory, registerPlugin<KclockModule>();)
K_EXPORT_PLUGIN(KlockModuleFactory("kcmkclock"))
KclockModule::KclockModule(QWidget *parent, const QVariantList &)
......
......@@ -339,7 +339,7 @@ bool DesktopPathConfig::xdgSavePath(KUrlRequester* ur, const QUrl& currentUrl, c
if (QDir().mkpath(path)) {
QDir().rmdir(path); // rmdir again, so that we get a fast rename
} else {
KMessageBox::sorry(this, KIO::buildErrorString(KIO::ERR_COULD_NOT_MKDIR, path));
KMessageBox::sorry(this, KIO::buildErrorString(KIO::ERR_CANNOT_MKDIR, path));
ur->setUrl(currentUrl); // revert
return false;
}
......
......@@ -961,7 +961,7 @@ int FontInst::performAction(const QVariantMap &args)
case KAuth::ActionReply::Error::AuthorizationDeniedError:
/*fall through*/
case KAuth::ActionReply::Error::NoSuchActionError:
return KIO::ERR_COULD_NOT_AUTHENTICATE;
return KIO::ERR_CANNOT_AUTHENTICATE;
default:
return KIO::ERR_INTERNAL;
}
......
......@@ -766,7 +766,7 @@ QString CJobRunner::errorString(int value) const
return i18n("Permission denied.<br><i>%1</i>", urlStr);
case KIO::ERR_UNSUPPORTED_ACTION:
return i18n("Unsupported action.<br><i>%1</i>", urlStr);
case KIO::ERR_COULD_NOT_AUTHENTICATE:
case KIO::ERR_CANNOT_AUTHENTICATE:
return i18n("Authentication failed.<br><i>%1</i>", urlStr);
default:
return i18n("Unexpected error while processing: <i>%1</i>", urlStr);
......
......@@ -256,7 +256,7 @@ void CKioFonts::put(const QUrl &url, int /*permissions*/, KIO::JobFlags /*flags*
}
else
{
error(KIO::ERR_COULD_NOT_WRITE, dest.fileName());
error(KIO::ERR_CANNOT_WRITE, dest.fileName());
result = -1;
}
}
......@@ -441,7 +441,7 @@ void CKioFonts::get(const QUrl &url)
if (EINTR==errno)
continue;
error(KIO::ERR_COULD_NOT_READ, url.toDisplayString());
error(KIO::ERR_CANNOT_READ, url.toDisplayString());
::close(fd);
if(multiple)
::unlink(realPathC);
......@@ -468,7 +468,7 @@ void CKioFonts::get(const QUrl &url)
::unlink(realPathC);
}
else
error(KIO::ERR_COULD_NOT_READ, url.toDisplayString());
error(KIO::ERR_CANNOT_READ, url.toDisplayString());
}
void CKioFonts::copy(const QUrl &, const QUrl &, int, KIO::JobFlags)
......
......@@ -70,7 +70,6 @@ static QString getFamily(const QString &font)
}
K_PLUGIN_FACTORY(CFontViewPartFactory, registerPlugin<CFontViewPart>();)
K_EXPORT_PLUGIN(CFontViewPartFactory("kfontview"))
CFontViewPart::CFontViewPart(QWidget *parentWidget, QObject *parent, const QList<QVariant> &)
: KParts::ReadOnlyPart(parent),
......
......@@ -34,7 +34,6 @@
#include <QSet>
K_PLUGIN_FACTORY(StandardActionsModuleFactory, registerPlugin<StandardActionsModule>();)
K_EXPORT_PLUGIN(StandardActionsModuleFactory("kcm_standard_actions"))
static void dressUpAction(QAction *action, KStandardShortcut::StandardShortcut shortcutId)
{
......
Markdown is supported
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