diff --git a/src/plasma/applet.cpp b/src/plasma/applet.cpp index 473e7a626..5480d3a0c 100644 --- a/src/plasma/applet.cpp +++ b/src/plasma/applet.cpp @@ -92,6 +92,10 @@ Applet::Applet(QObject *parentObject, const QVariantList &args) d->appletDescription = KPluginInfo(args); } + if (args.contains("org.kde.plasma:force-create")) { + setProperty("org.kde.plasma:force-create", true); + } + // WARNING: do not access config() OR globalConfig() in this method! // that requires a scene, which is not available at this point d->init(QString(), args.mid(2)); diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index 84a130154..c7a8b7d48 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -372,10 +372,6 @@ Applet *Containment::createApplet(const QString &name, const QVariantList &args) void Containment::addApplet(Applet *applet) { - if (immutability() != Types::Mutable) { - return; - } - if (!applet) { #ifndef NDEBUG // qCDebug(LOG_PLASMA) << "adding null applet!?!"; @@ -383,6 +379,10 @@ void Containment::addApplet(Applet *applet) return; } + if (immutability() != Types::Mutable && !applet->property("org.kde.plasma:force-create").toBool()) { + return; + } + if (d->applets.contains(applet)) { #ifndef NDEBUG // qCDebug(LOG_PLASMA) << "already have this applet!";