port away some kstandarddirs
This commit is contained in:
parent
392a8530ef
commit
4e8f41c109
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -44,7 +44,8 @@ target_link_libraries(testplasma2
|
||||
${Qt5Qml_LIBRARIES}
|
||||
${kcoreaddons}
|
||||
${KDE4_KDEUI_LIBS}
|
||||
${KDE4_KDECORE_LIBS}
|
||||
#${KDE4_KDECORE_LIBS}
|
||||
kdecore
|
||||
plasma
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user