Use less deprecated API
Makes it easier to look at the compilation output. REVIEW: 129150
This commit is contained in:
parent
05e86467c4
commit
9e54853ac8
@ -204,10 +204,10 @@ void Containment::restore(KConfigGroup &group)
|
||||
case Plasma::Types::PanelContainment:
|
||||
/* fall through*/
|
||||
case Plasma::Types::CustomPanelContainment:
|
||||
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Panel");
|
||||
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->kPackage().filePath("defaults")), "Panel");
|
||||
break;
|
||||
case Plasma::Types::DesktopContainment:
|
||||
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Desktop");
|
||||
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->kPackage().filePath("defaults")), "Desktop");
|
||||
break;
|
||||
default:
|
||||
//for any other type of containment, there are no defaults
|
||||
|
@ -102,7 +102,7 @@ void AppletScript::configChanged()
|
||||
QString AppletScript::mainScript() const
|
||||
{
|
||||
Q_ASSERT(d->applet);
|
||||
return d->applet->package().filePath("mainscript");
|
||||
return d->applet->kPackage().filePath("mainscript");
|
||||
}
|
||||
|
||||
Package AppletScript::package() const
|
||||
|
@ -480,7 +480,7 @@ void AppletQuickItem::init()
|
||||
//if the engine of the qmlObject is different from the static one, then we
|
||||
//are using an old version of the api in which every applet had one engine
|
||||
//so initialize a private url interceptor
|
||||
if (d->applet->package().isValid() && !qobject_cast<KDeclarative::QmlObjectSharedEngine *>(d->qmlObject)) {
|
||||
if (d->applet->kPackage().isValid() && !qobject_cast<KDeclarative::QmlObjectSharedEngine *>(d->qmlObject)) {
|
||||
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(engine, d->applet->package());
|
||||
interceptor->addAllowedPath(d->coronaPackage.path());
|
||||
engine->setUrlInterceptor(interceptor);
|
||||
@ -501,11 +501,11 @@ void AppletQuickItem::init()
|
||||
QObject *o = c.create();
|
||||
o->deleteLater();
|
||||
|
||||
d->qmlObject->setSource(QUrl::fromLocalFile(d->applet->package().filePath("mainscript")));
|
||||
d->qmlObject->setSource(QUrl::fromLocalFile(d->applet->kPackage().filePath("mainscript")));
|
||||
|
||||
if (!engine || !engine->rootContext() || !engine->rootContext()->isValid() || !d->qmlObject->mainComponent() || d->qmlObject->mainComponent()->isError()) {
|
||||
QString reason;
|
||||
if (d->applet->package().isValid()) {
|
||||
if (d->applet->kPackage().isValid()) {
|
||||
foreach (QQmlError error, d->qmlObject->mainComponent()->errors()) {
|
||||
reason += error.toString() + '\n';
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ void ConfigViewPrivate::init()
|
||||
if (a) {
|
||||
corona = a->containment()->corona();
|
||||
}
|
||||
} else if (!applet.data()->containment()->corona()->package().isValid()) {
|
||||
} else if (!applet.data()->containment()->corona()->kPackage().isValid()) {
|
||||
qWarning() << "Invalid home screen package";
|
||||
} else {
|
||||
corona = applet.data()->containment()->corona();
|
||||
@ -124,7 +124,7 @@ void ConfigViewPrivate::init()
|
||||
return;
|
||||
}
|
||||
|
||||
if (corona->package().isValid()) {
|
||||
if (corona->kPackage().isValid()) {
|
||||
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(q->engine(), corona->package());
|
||||
interceptor->addAllowedPath(applet.data()->package().path());
|
||||
q->engine()->setUrlInterceptor(interceptor);
|
||||
@ -133,7 +133,7 @@ void ConfigViewPrivate::init()
|
||||
q->setResizeMode(QQuickView::SizeViewToRootObject);
|
||||
|
||||
//config model local of the applet
|
||||
QQmlComponent *component = new QQmlComponent(q->engine(), QUrl::fromLocalFile(applet.data()->package().filePath("configmodel")), q);
|
||||
QQmlComponent *component = new QQmlComponent(q->engine(), QUrl::fromLocalFile(applet.data()->kPackage().filePath("configmodel")), q);
|
||||
QObject *object = component->beginCreate(q->engine()->rootContext());
|
||||
configModel = qobject_cast<ConfigModel *>(object);
|
||||
|
||||
@ -289,7 +289,7 @@ ConfigView::~ConfigView()
|
||||
|
||||
void ConfigView::init()
|
||||
{
|
||||
setSource(QUrl::fromLocalFile(d->corona->package().filePath("appletconfigurationui")));
|
||||
setSource(QUrl::fromLocalFile(d->corona->kPackage().filePath("appletconfigurationui")));
|
||||
}
|
||||
|
||||
Plasma::Applet *ConfigView::applet()
|
||||
|
@ -205,7 +205,7 @@ ContainmentView::ContainmentView(Plasma::Corona *corona, QWindow *parent)
|
||||
QObject::connect(screen(), &QScreen::geometryChanged,
|
||||
this, &ContainmentView::screenGeometryChanged);
|
||||
|
||||
if (corona->package().isValid()) {
|
||||
if (corona->kPackage().isValid()) {
|
||||
KPluginInfo info = corona->package().metadata();
|
||||
if (info.isValid()) {
|
||||
setTranslationDomain("plasma_shell_" + info.pluginName());
|
||||
|
@ -188,14 +188,14 @@ View::View(Plasma::Corona *corona, QWindow *parent)
|
||||
QObject::connect(screen(), &QScreen::geometryChanged,
|
||||
this, &View::screenGeometryChanged);
|
||||
|
||||
if (corona->package().isValid()) {
|
||||
if (corona->kPackage().isValid()) {
|
||||
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(engine(), corona->package());
|
||||
engine()->setUrlInterceptor(interceptor);
|
||||
|
||||
KDeclarative::KDeclarative kdeclarative;
|
||||
kdeclarative.setDeclarativeEngine(engine());
|
||||
//binds things like kconfig and icons
|
||||
kdeclarative.setTranslationDomain("plasma_shell_" + corona->package().metadata().pluginName());
|
||||
kdeclarative.setTranslationDomain("plasma_shell_" + corona->kPackage().metadata().pluginId());
|
||||
kdeclarative.setupBindings();
|
||||
} else {
|
||||
qWarning() << "Invalid home screen package";
|
||||
|
@ -92,9 +92,9 @@ void ContainmentInterface::init()
|
||||
if (m_containment) {
|
||||
KConfigGroup defaults;
|
||||
if (m_containment->containmentType() == Plasma::Types::DesktopContainment) {
|
||||
defaults = KConfigGroup(KSharedConfig::openConfig(m_containment->corona()->package().filePath("defaults")), "Desktop");
|
||||
defaults = KConfigGroup(KSharedConfig::openConfig(m_containment->corona()->kPackage().filePath("defaults")), "Desktop");
|
||||
} else if (m_containment->containmentType() == Plasma::Types::PanelContainment) {
|
||||
defaults = KConfigGroup(KSharedConfig::openConfig(m_containment->corona()->package().filePath("defaults")), "Panel");
|
||||
defaults = KConfigGroup(KSharedConfig::openConfig(m_containment->corona()->kPackage().filePath("defaults")), "Panel");
|
||||
}
|
||||
|
||||
if (defaults.isValid()) {
|
||||
|
@ -94,7 +94,7 @@ bool DeclarativeAppletScript::init()
|
||||
|
||||
QString DeclarativeAppletScript::filePath(const QString &type, const QString &file) const
|
||||
{
|
||||
return package().filePath(type.toLocal8Bit().constData(), file);
|
||||
return applet()->kPackage().filePath(type.toLocal8Bit().constData(), file);
|
||||
}
|
||||
|
||||
void DeclarativeAppletScript::constraintsEvent(Plasma::Types::Constraints constraints)
|
||||
|
Loading…
x
Reference in New Issue
Block a user