Merge remote-tracking branch 'origin/KDE/4.8' into origin-frameworks

Conflicts:
	CMakeLists.txt
	kdeui/actions/kaction.cpp
	tier1/solid/src/solid/powermanagement.cpp
This commit is contained in:
David Faure 2012-06-26 19:27:14 +02:00
commit ca9720b3d8
3 changed files with 24 additions and 6 deletions

View File

@ -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 {

View File

@ -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<Containment *>(pw)) {
break;
} else if (qobject_cast<Applet *>(pw)) {
return false;
}
}
QGraphicsSceneHoverEvent *he = static_cast<QGraphicsSceneHoverEvent*>(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<KCModule>(dialog, QVariantList(), &error);
if (module) {
module->load();
connect(module, SIGNAL(changed(bool)), dialog, SLOT(settingsModified(bool)));
connect(dialog, SIGNAL(okClicked()),
module, SLOT(save()));

View File

@ -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");