Merge remote-tracking branch 'origin/master' into libplasma2

Conflicts:
	plasma/containment.cpp
	plasma/package.cpp
	plasma/packagestructure.cpp
	plasma/private/package_p.h
	plasma/scripting/scriptengine.cpp
This commit is contained in:
Aaron Seigo 2011-07-21 15:31:07 +02:00
commit bd10c7175e
3 changed files with 13 additions and 7 deletions

View File

@ -1620,8 +1620,10 @@ void Applet::unregisterAsDragHandle(QGraphicsItem *item)
} }
if (d->registeredAsDragHandle.remove(item)) { if (d->registeredAsDragHandle.remove(item)) {
if (item != this) {
item->removeSceneEventFilter(this); item->removeSceneEventFilter(this);
} }
}
} }
bool Applet::isRegisteredAsDragHandle(QGraphicsItem *item) bool Applet::isRegisteredAsDragHandle(QGraphicsItem *item)
@ -1750,7 +1752,6 @@ bool Applet::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
break; break;
} }
return false;
} }
switch (event->type()) { switch (event->type()) {
@ -2346,6 +2347,9 @@ QVariant Applet::itemChange(GraphicsItemChange change, const QVariant &value)
break; break;
case ItemParentHasChanged: case ItemParentHasChanged:
{ {
if (isContainment()) {
removeSceneEventFilter(this);
} else {
Containment *c = containment(); Containment *c = containment();
if (c && c->containmentType() == Containment::DesktopContainment) { if (c && c->containmentType() == Containment::DesktopContainment) {
installSceneEventFilter(this); installSceneEventFilter(this);
@ -2353,6 +2357,7 @@ QVariant Applet::itemChange(GraphicsItemChange change, const QVariant &value)
removeSceneEventFilter(this); removeSceneEventFilter(this);
} }
} }
}
break; break;
case ItemPositionHasChanged: case ItemPositionHasChanged:
emit geometryChanged(); emit geometryChanged();

View File

@ -17,6 +17,7 @@ Description[de]=Ein Protokoll für Plasma-Dienste
Description[el]=Ένα πρωτόκολλο υπηρεσιών Plasma Description[el]=Ένα πρωτόκολλο υπηρεσιών Plasma
Description[es]=Un protocolo para los servicios de Plasma Description[es]=Un protocolo para los servicios de Plasma
Description[et]=Plasma teenuste protokoll Description[et]=Plasma teenuste protokoll
Description[fi]=Plasma-palvelujen protokolla
Description[hr]=Protokol za servise u Plasmi Description[hr]=Protokol za servise u Plasmi
Description[hu]=Protokoll a Plazma-szolgáltatáshoz Description[hu]=Protokoll a Plazma-szolgáltatáshoz
Description[ia]=un protocollo per servicios de Plasma Description[ia]=un protocollo per servicios de Plasma

View File

@ -78,5 +78,5 @@ private:
} // namespace Plasma } // namespace Plasma
Q_DECLARE_METATYPE(Plasma::WallpaperRenderRequest); Q_DECLARE_METATYPE(Plasma::WallpaperRenderRequest)
#endif // PLASMA_WALLPAPERRENDERTHREAD_P_H #endif // PLASMA_WALLPAPERRENDERTHREAD_P_H