Revert "mechanism for coronas to load plasmoids from custom folders"
This reverts commit 2751b72835
.
This commit is contained in:
parent
12ea79b341
commit
5b0ec83c36
@ -57,8 +57,7 @@ class PluginLoaderPrivate
|
||||
public:
|
||||
PluginLoaderPrivate()
|
||||
: isDefaultLoader(false),
|
||||
plasmoidsDataDir(PLASMA_RELATIVE_DATA_INSTALL_DIR),
|
||||
packageRE(QLatin1String("[^a-zA-Z0-9\\-_]"))
|
||||
packageRE("[^a-zA-Z0-9\\-_]")
|
||||
{
|
||||
KPackage::PackageLoader::self()->addKnownPackageStructure(QStringLiteral("Plasma/Applet"), new PlasmoidPackage());
|
||||
KPackage::PackageLoader::self()->addKnownPackageStructure(QStringLiteral("Plasma/DataEngine"), new DataEnginePackage());
|
||||
@ -79,7 +78,6 @@ public:
|
||||
static QString s_plasmoidsPluginDir;
|
||||
static QString s_servicesPluginDir;
|
||||
static QString s_containmentActionsPluginDir;
|
||||
QString plasmoidsDataDir;
|
||||
QRegExp packageRE;
|
||||
};
|
||||
|
||||
@ -233,7 +231,6 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
|
||||
}
|
||||
}
|
||||
|
||||
p.setDefaultPackageRoot(d->plasmoidsDataDir + "/plasmoids/");
|
||||
// backwards compatibility: search in the root plugins directory
|
||||
// TODO: remove when Plasma 5.4 is released
|
||||
{
|
||||
@ -276,16 +273,6 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
|
||||
return applet;
|
||||
}
|
||||
|
||||
void PluginLoader::setAppletsDataDirectory(const QString &dir)
|
||||
{
|
||||
d->plasmoidsDataDir = dir;
|
||||
}
|
||||
|
||||
QString PluginLoader::appletsDataDirectory() const
|
||||
{
|
||||
return d->plasmoidsDataDir;
|
||||
}
|
||||
|
||||
DataEngine *PluginLoader::loadDataEngine(const QString &name)
|
||||
{
|
||||
DataEngine *engine = d->isDefaultLoader ? 0 : internalLoadDataEngine(name);
|
||||
@ -542,11 +529,7 @@ Package PluginLoader::loadPackage(const QString &packageFormat, const QString &s
|
||||
structure = new PackageStructure();
|
||||
structure->d->internalStructure = internalStructure;
|
||||
d->structures.insert(hashkey, structure);
|
||||
Package p(structure);
|
||||
if (packageFormat == "Plasma/Applet") {
|
||||
p.setDefaultPackageRoot(d->plasmoidsDataDir + "/plasmoids/");
|
||||
}
|
||||
return p;
|
||||
return Package(structure);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,31 +66,6 @@ public:
|
||||
Applet *loadApplet(const QString &name, uint appletId = 0,
|
||||
const QVariantList &args = QVariantList());
|
||||
|
||||
/**
|
||||
* Sets the data directory for plasmoids.
|
||||
* By default plasmoid packages will be loaded from the
|
||||
* "plasma" data directory, usually under the "share"
|
||||
* subdirectory of the install prefix.
|
||||
* An application that uses a custom plasma shell
|
||||
* can have its private plasmoids
|
||||
* in its own data directory, not having them mixeed
|
||||
* with the ones from plasma desktop.
|
||||
* It takes effect only in applets loaded after setting
|
||||
* this, so use it at the application startup.
|
||||
*
|
||||
* @param dir data directory name
|
||||
* @since 5.18
|
||||
*/
|
||||
void setAppletsDataDirectory(const QString &dir);
|
||||
|
||||
/**
|
||||
* @return the custom applets data directory.
|
||||
* Default is "plasma"
|
||||
*
|
||||
* @since 5.18
|
||||
*/
|
||||
QString appletsDataDirectory() const;
|
||||
|
||||
/**
|
||||
* Load a DataEngine plugin.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user