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 <kdeversion.h>
#include <KServiceTypeTrader> #include <KServiceTypeTrader>
#include <KShell> #include <KShell>
#include <KStandardDirs>
#include <Plasma/Applet> #include <Plasma/Applet>
#include <Plasma/Containment> #include <Plasma/Containment>
@ -144,7 +143,9 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
Plasma::PackageStructure::Ptr structure(new LayoutTemplatePackageStructure); Plasma::PackageStructure::Ptr structure(new LayoutTemplatePackageStructure);
KPluginInfo info(offers.first()); 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()) { if (path.isEmpty()) {
kDebug() << "script path is empty"; kDebug() << "script path is empty";
return false; return false;

View File

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

View File

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