Port KCM to QStandardPaths

Both core return the same.
This commit is contained in:
Àlex Fiestas 2014-09-22 01:23:47 +02:00
parent 2328738beb
commit 9c13e92e55

View file

@ -33,7 +33,6 @@
#include <KPluginInfo>
#include <KPluginFactory>
#include <KAboutData>
#include <KStandardDirs>
#include <KLocalizedString>
@ -155,7 +154,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
KService::List offers = KServiceTypeTrader::self()->query("KdeConnect/Plugin");
QList<KPluginInfo> scriptinfos = KPluginInfo::fromServices(offers);
QString path = KStandardDirs().resourceDirs("config").first()+"kdeconnect/";
QString path = QStandardPaths::locate(QStandardPaths::ConfigLocation, "kdeconnect/", QStandardPaths::LocateDirectory);
KSharedConfigPtr deviceConfig = KSharedConfig::openConfig(path + currentDevice->id());
kcmUi->pluginSelector->addPlugins(scriptinfos, KPluginSelector::ReadConfigFile, i18n("Plugins"), QString(), deviceConfig);