catch the case where we have a containment, but the containment is not in a corona
CCBUG:214460 svn path=/branches/KDE/4.4/kdelibs/; revision=1088123
This commit is contained in:
parent
4670d21feb
commit
18e67bfb56
@ -550,7 +550,7 @@ void ExtenderPrivate::addExtenderItem(ExtenderItem *item, const QPointF &pos)
|
||||
return;
|
||||
}
|
||||
|
||||
QObject::connect(item, SIGNAL(destroyed(QObject *)), q, SLOT(extenderItemDestroyed(QObject *)));
|
||||
QObject::connect(item, SIGNAL(destroyed(ExtenderItem*)), q, SLOT(extenderItemDestroyed(ExtenderItem*)));
|
||||
attachedExtenderItems.append(item);
|
||||
q->itemHoverLeaveEvent(item);
|
||||
q->itemAddedEvent(item, pos);
|
||||
@ -721,9 +721,8 @@ ExtenderGroup *ExtenderPrivate::findGroup(const QString &name) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ExtenderPrivate::extenderItemDestroyed(QObject *object)
|
||||
void ExtenderPrivate::extenderItemDestroyed(ExtenderItem *item)
|
||||
{
|
||||
ExtenderItem *item = qobject_cast<ExtenderItem *>(object);
|
||||
if (item && attachedExtenderItems.contains(item)) {
|
||||
removeExtenderItem(item);
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ class PLASMA_EXPORT Extender : public QGraphicsWidget
|
||||
private:
|
||||
ExtenderPrivate *const d;
|
||||
|
||||
Q_PRIVATE_SLOT(d, void extenderItemDestroyed(QObject *object))
|
||||
Q_PRIVATE_SLOT(d, void extenderItemDestroyed(ExtenderItem *item))
|
||||
|
||||
friend class ExtenderPrivate;
|
||||
friend class ExtenderGroup;
|
||||
|
@ -141,6 +141,7 @@ ExtenderItem::ExtenderItem(Extender *hostExtender, uint extenderItemId)
|
||||
|
||||
ExtenderItem::~ExtenderItem()
|
||||
{
|
||||
emit destroyed(this);
|
||||
//make sure the original mousepointer always get's restored.
|
||||
if (d->mouseOver) {
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
@ -254,6 +254,13 @@ class PLASMA_EXPORT ExtenderItem : public QGraphicsWidget
|
||||
*/
|
||||
void hideCloseButton();
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* Emitted when the extender item is destroyed
|
||||
* @since 4.4.1
|
||||
*/
|
||||
void destroyed(ExtenderItem *item);
|
||||
|
||||
protected:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
||||
|
@ -47,7 +47,7 @@ class ExtenderPrivate
|
||||
~ExtenderPrivate();
|
||||
|
||||
void addExtenderItem(ExtenderItem *item, const QPointF &pos = QPointF(-1, -1));
|
||||
void extenderItemDestroyed(QObject *object);
|
||||
void extenderItemDestroyed(ExtenderItem *item);
|
||||
void removeExtenderItem(ExtenderItem *item);
|
||||
int insertIndexFromPos(const QPointF &pos) const;
|
||||
void loadExtenderItems();
|
||||
|
Loading…
Reference in New Issue
Block a user