diff --git a/abstractrunner.h b/abstractrunner.h index b0bed4c8a..a167d5b03 100644 --- a/abstractrunner.h +++ b/abstractrunner.h @@ -65,10 +65,10 @@ class PLASMA_EXPORT AbstractRunner : public QObject { Q_OBJECT Q_PROPERTY(bool matchingSuspended READ isMatchingSuspended WRITE suspendMatching NOTIFY matchingSuspended) - Q_PROPERTY(QString id READ id); - Q_PROPERTY(QString description READ description); - Q_PROPERTY(QString name READ name); - Q_PROPERTY(QIcon icon READ icon); + Q_PROPERTY(QString id READ id) + Q_PROPERTY(QString description READ description) + Q_PROPERTY(QString name READ name) + Q_PROPERTY(QIcon icon READ icon) public: /** Specifies a nominal speed for the runner */ enum Speed { diff --git a/applet.cpp b/applet.cpp index 4cb0a79f6..729bbad1b 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1225,6 +1225,17 @@ bool Applet::sceneEventFilter(QGraphicsItem *watched, QEvent *event) case QEvent::GraphicsSceneHoverEnter: //kDebug() << "got hoverenterEvent" << immutability() << " " << immutability(); if (immutability() == Mutable) { + QGraphicsWidget *pw = this; + //This is for the rare case of applet in applet (systray) + //if the applet is in an applet that is not a containment, don't create the handle BUG:301648 + while (pw = pw->parentWidget()) { + if (qobject_cast(pw)) { + break; + } else if (qobject_cast(pw)) { + return false; + } + } + QGraphicsSceneHoverEvent *he = static_cast(event); if (d->handle) { d->handle.data()->setHoverPos(he->pos()); @@ -1364,6 +1375,8 @@ void Applet::showConfigurationInterface() #ifndef PLASMA_NO_KUTILS KCModuleProxy *module = new KCModuleProxy(kcm); if (module->realModule()) { + //preemptively load modules to prevent save() crashing on some kcms, like powerdevil ones + module->load(); connect(module, SIGNAL(changed(bool)), dialog, SLOT(settingsModified(bool))); connect(dialog, SIGNAL(okClicked()), module->realModule(), SLOT(save())); @@ -1380,6 +1393,7 @@ void Applet::showConfigurationInterface() QString error; KCModule *module = service->createInstance(dialog, QVariantList(), &error); if (module) { + module->load(); connect(module, SIGNAL(changed(bool)), dialog, SLOT(settingsModified(bool))); connect(dialog, SIGNAL(okClicked()), module, SLOT(save())); diff --git a/widgets/meter.cpp b/widgets/meter.cpp index 8bb335d64..dcbd583ca 100644 --- a/widgets/meter.cpp +++ b/widgets/meter.cpp @@ -184,10 +184,14 @@ void MeterPrivate::paintBar(QPainter *p, const QString &prefix) image->setUsingRenderingCache(false); if (image->hasElement("hint-bar-stretch")) { + const QSize imageSize = image->size(); + image->resize(); + image->setElementPrefix(prefix); image->resizeFrame(elementRect.size()); - image->paintFrame(p); + image->paintFrame(p, elementRect.topLeft()); + image->resize(imageSize); } else { - QSize imageSize = image->size(); + const QSize imageSize = image->size(); image->resize(); QSize tileSize = image->elementSize("bar-active-center");