Revert "Fix loading plasmoids by absolute path"
This reverts commit 2ed819f37d
.
panel loading was completely broken, the patch idea was fine,
but has to be redone and tested better.
CCMAIL:aleixpol@kde.org
This commit is contained in:
parent
2ed819f37d
commit
014979d8bf
@ -29,9 +29,7 @@
|
||||
#include <qstandardpaths.h>
|
||||
#include <QTimer>
|
||||
#include <QJsonArray>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <klocalizedstring.h>
|
||||
@ -115,9 +113,8 @@ AppletPrivate::~AppletPrivate()
|
||||
delete modificationsTimer;
|
||||
}
|
||||
|
||||
void AppletPrivate::init(const QString &_packagePath, const QVariantList &args)
|
||||
void AppletPrivate::init(const QString &packagePath, const QVariantList &args)
|
||||
{
|
||||
const QString packagePath = _packagePath.isEmpty() ? QFileInfo(appletDescription.metaDataFileName()).dir().path() : _packagePath;
|
||||
// WARNING: do not access config() OR globalConfig() in this method!
|
||||
// that requires a Corona, which is not available at this point
|
||||
q->setHasConfigurationInterface(true);
|
||||
|
@ -199,9 +199,7 @@ QVariant ConfigModel::data(const QModelIndex &index, int role) const
|
||||
const QString source = d->categories.at(index.row())->source();
|
||||
// Quick check if source is an absolute path or not
|
||||
if (d->appletInterface && !source.isEmpty() && !(source.startsWith('/') && source.endsWith(QLatin1String("qml")))) {
|
||||
if(!d->appletInterface.data()->kPackage().isValid())
|
||||
qWarning() << "wrong applet" << d->appletInterface.data()->pluginMetaData().name();
|
||||
return QUrl::fromLocalFile(d->appletInterface.data()->kPackage().filePath("ui", source));
|
||||
return QUrl::fromLocalFile(d->appletInterface.data()->package().filePath("ui", source));
|
||||
} else {
|
||||
return source;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user