port away some kstandarddirs

This commit is contained in:
Marco Martin 2013-02-08 11:41:31 +01:00
parent 392a8530ef
commit 4e8f41c109
3 changed files with 8 additions and 5 deletions

View File

@ -26,7 +26,6 @@
#include <kdeversion.h>
#include <KServiceTypeTrader>
#include <KShell>
#include <KStandardDirs>
#include <Plasma/Applet>
#include <Plasma/Containment>
@ -144,7 +143,9 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
Plasma::PackageStructure::Ptr structure(new LayoutTemplatePackageStructure);
KPluginInfo info(offers.first());
const QString path = KStandardDirs::locate("data", structure->defaultPackageRoot() + '/' + info.pluginName() + '/');
const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
structure->defaultPackageRoot() + '/' + info.pluginName() + '/',
QStandardPaths::LocateDirectory);
if (path.isEmpty()) {
kDebug() << "script path is empty";
return false;

View File

@ -514,8 +514,9 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info)
if (!api.isEmpty()) {
const QString path =
KStandardDirs::locate("data",
"plasma/dataengines/" + dataEngineDescription.pluginName() + '/');
QStandardPaths::locate(QStandardPaths::GenericDataLocation,
"plasma/dataengines/" + dataEngineDescription.pluginName() + '/',
QStandardPaths::LocateDirectory);
package = new Package(PluginLoader::self()->loadPackage("Plasma/DataEngine", api));
package->setPath(path);

View File

@ -44,7 +44,8 @@ target_link_libraries(testplasma2
${Qt5Qml_LIBRARIES}
${kcoreaddons}
${KDE4_KDEUI_LIBS}
${KDE4_KDECORE_LIBS}
#${KDE4_KDECORE_LIBS}
kdecore
plasma
)