Port toolbox loading to KPackage
This needs KPluginMetaData::isHidden() which was recently added in kcoreaddons. Reviewed-by: Marco Martin
This commit is contained in:
parent
bda055367f
commit
a8edd6fd2c
@ -31,6 +31,7 @@ target_link_libraries(plasma_appletscript_declarative
|
||||
KF5::XmlGui # KActionCollection
|
||||
KF5::Plasma
|
||||
KF5::PlasmaQuick
|
||||
KF5::Package
|
||||
)
|
||||
|
||||
|
||||
|
@ -44,9 +44,11 @@
|
||||
#include <plasma.h>
|
||||
#include <Plasma/ContainmentActions>
|
||||
#include <Plasma/Corona>
|
||||
#include <Plasma/Package>
|
||||
#include <Plasma/PluginLoader>
|
||||
|
||||
#include <KPackage/Package>
|
||||
#include <KPackage/PackageLoader>
|
||||
|
||||
#include <kactivities/info.h>
|
||||
|
||||
#include "kdeclarative/configpropertymap.h"
|
||||
@ -102,7 +104,7 @@ void ContainmentInterface::init()
|
||||
defaults = KConfigGroup(KSharedConfig::openConfig(m_containment->corona()->package().filePath("defaults")), "Panel");
|
||||
}
|
||||
|
||||
Plasma::Package pkg = Plasma::PluginLoader::self()->loadPackage("Plasma/Generic");
|
||||
KPackage::Package pkg = KPackage::PackageLoader::self()->loadPackage("Plasma/Generic");
|
||||
|
||||
if (defaults.isValid()) {
|
||||
pkg.setPath(defaults.readEntry("ToolBox", "org.kde.desktoptoolbox"));
|
||||
@ -128,7 +130,10 @@ void ContainmentInterface::init()
|
||||
} else {
|
||||
qWarning() << "Could not load toolbox package." << pkg.path();
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Toolbox not loading, toolbox package is either invalid or disabled.";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//set parent, both as object hierarchically and visually
|
||||
|
Loading…
Reference in New Issue
Block a user