no longer provide access to the package from the class, let Package do that; adapt to Package merge
This commit is contained in:
parent
a623e16283
commit
e7106d2422
@ -473,9 +473,9 @@ bool DataEnginePrivate::isPublished() const
|
||||
}
|
||||
}
|
||||
|
||||
const Package *DataEngine::package() const
|
||||
Package DataEngine::package() const
|
||||
{
|
||||
return d->package;
|
||||
return d->package ? *d->package : Package();
|
||||
}
|
||||
|
||||
void DataEngine::scheduleSourcesUpdated()
|
||||
@ -541,11 +541,13 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info)
|
||||
const QString path =
|
||||
KStandardDirs::locate("data",
|
||||
"plasma/dataengines/" + dataEngineDescription.pluginName() + '/');
|
||||
PackageStructure::Ptr structure = Plasma::packageStructure(api, Plasma::DataEngineComponent);
|
||||
structure->setPath(path);
|
||||
package = new Package(path, structure);
|
||||
package = new Package(Package::load("Plasma/DataEngine", api));
|
||||
package->setPath(path);
|
||||
|
||||
if (package->isValid()) {
|
||||
script = Plasma::loadScriptEngine(api, q);
|
||||
}
|
||||
|
||||
script = Plasma::loadScriptEngine(api, q);
|
||||
if (!script) {
|
||||
kDebug() << "Could not create a" << api << "ScriptEngine for the"
|
||||
<< dataEngineDescription.name() << "DataEngine.";
|
||||
|
@ -231,7 +231,7 @@ NoAlignment) const;
|
||||
*
|
||||
* @return the Package object, or 0 if none
|
||||
**/
|
||||
const Package *package() const;
|
||||
Package package() const;
|
||||
|
||||
/**
|
||||
* @return the plugin name for the applet
|
||||
|
Loading…
Reference in New Issue
Block a user