X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/ed2d352c42a6d517d4f29b3582c0e00aa34fe647..041a3a4a346309b0aec50df41abe7b332804b81a:/src/views/dolphinremoteencoding.cpp diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp index 2881915ac..c9e973987 100644 --- a/src/views/dolphinremoteencoding.cpp +++ b/src/views/dolphinremoteencoding.cpp @@ -20,11 +20,12 @@ #include #include #include -#include #include #include #include +#include +#include #include #define DATA_KEY QStringLiteral("Charset") @@ -87,7 +88,7 @@ void DolphinRemoteEncoding::fillMenu() QMenu *menu = m_menu->menu(); menu->clear(); - menu->addAction(i18n("Default"), this, SLOT(slotDefault()), 0)->setCheckable(true); + menu->addAction(i18n("Default"), this, &DolphinRemoteEncoding::slotDefault)->setCheckable(true); for (int i = 0; i < m_encodingDescriptions.size(); i++) { QAction *action = new QAction(m_encodingDescriptions.at(i), this); action->setCheckable(true); @@ -96,7 +97,7 @@ void DolphinRemoteEncoding::fillMenu() } menu->addSeparator(); - menu->addAction(i18n("Reload"), this, SLOT(slotReload()), 0); + menu->addAction(i18n("Reload"), this, &DolphinRemoteEncoding::slotReload); m_idDefault = m_encodingDescriptions.size() + 2; connect(menu, &QMenu::triggered, this, &DolphinRemoteEncoding::slotItemSelected); @@ -197,8 +198,8 @@ void DolphinRemoteEncoding::slotDefault() qCDebug(DolphinDebug) << "Domain to remove: " << *it; if (config.hasGroup(*it)) { config.deleteGroup(*it); - } else if (config.group("").hasKey(*it)) { - config.group("").deleteEntry(*it); //don't know what group name is supposed to be XXX + } else if (config.group(QString()).hasKey(*it)) { + config.group(QString()).deleteEntry(*it); // don't know what group name is supposed to be XXX } } } @@ -210,7 +211,11 @@ void DolphinRemoteEncoding::slotDefault() void DolphinRemoteEncoding::updateView() { - KIO::Scheduler::emitReparseSlaveConfiguration(); + QDBusMessage message = + QDBusMessage::createSignal(QStringLiteral("/KIO/Scheduler"), QStringLiteral("org.kde.KIO.Scheduler"), QStringLiteral("reparseSlaveConfiguration")); + message << QString(); + QDBusConnection::sessionBus().send(message); + // Reload the page with the new charset m_actionHandler->currentView()->setUrl(m_currentURL); m_actionHandler->currentView()->reload();