valid package internalload even if just structure
consider a loaded package valid even if !isvalid() but does have some file that indicates it has a valid packagestructure. for how packages are loaded now, a package is never valid at first if has a required file: because the path gets set only after the package is loaded this fixes wallpaper loading
This commit is contained in:
parent
b99001ace4
commit
d266a9594b
@ -399,7 +399,7 @@ Package PluginLoader::loadPackage(const QString &packageFormat, const QString &s
|
|||||||
{
|
{
|
||||||
if (!d->isDefaultLoader) {
|
if (!d->isDefaultLoader) {
|
||||||
Package p = internalLoadPackage(packageFormat, specialization);
|
Package p = internalLoadPackage(packageFormat, specialization);
|
||||||
if (p.isValid()) {
|
if (p.isValid() || !p.files().isEmpty()) {
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,11 +127,11 @@ void WallpaperInterface::syncWallpaperPackage()
|
|||||||
|
|
||||||
m_actions->clear();
|
m_actions->clear();
|
||||||
m_pkg = Plasma::PluginLoader::self()->loadPackage("Plasma/Wallpaper");
|
m_pkg = Plasma::PluginLoader::self()->loadPackage("Plasma/Wallpaper");
|
||||||
|
m_pkg.setPath(m_wallpaperPlugin);
|
||||||
if (!m_pkg.isValid()) {
|
if (!m_pkg.isValid()) {
|
||||||
qWarning() << "Error loading the wallpaper, no valid package loaded";
|
qWarning() << "Error loading the wallpaper, no valid package loaded";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_pkg.setPath(m_wallpaperPlugin);
|
|
||||||
|
|
||||||
if (m_configLoader) m_configLoader->deleteLater();
|
if (m_configLoader) m_configLoader->deleteLater();
|
||||||
if (m_configuration) m_configuration->deleteLater();
|
if (m_configuration) m_configuration->deleteLater();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user