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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QObject::connect(item, SIGNAL(destroyed(QObject *)), q, SLOT(extenderItemDestroyed(QObject *)));
|
QObject::connect(item, SIGNAL(destroyed(ExtenderItem*)), q, SLOT(extenderItemDestroyed(ExtenderItem*)));
|
||||||
attachedExtenderItems.append(item);
|
attachedExtenderItems.append(item);
|
||||||
q->itemHoverLeaveEvent(item);
|
q->itemHoverLeaveEvent(item);
|
||||||
q->itemAddedEvent(item, pos);
|
q->itemAddedEvent(item, pos);
|
||||||
@ -721,9 +721,8 @@ ExtenderGroup *ExtenderPrivate::findGroup(const QString &name) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtenderPrivate::extenderItemDestroyed(QObject *object)
|
void ExtenderPrivate::extenderItemDestroyed(ExtenderItem *item)
|
||||||
{
|
{
|
||||||
ExtenderItem *item = qobject_cast<ExtenderItem *>(object);
|
|
||||||
if (item && attachedExtenderItems.contains(item)) {
|
if (item && attachedExtenderItems.contains(item)) {
|
||||||
removeExtenderItem(item);
|
removeExtenderItem(item);
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ class PLASMA_EXPORT Extender : public QGraphicsWidget
|
|||||||
private:
|
private:
|
||||||
ExtenderPrivate *const d;
|
ExtenderPrivate *const d;
|
||||||
|
|
||||||
Q_PRIVATE_SLOT(d, void extenderItemDestroyed(QObject *object))
|
Q_PRIVATE_SLOT(d, void extenderItemDestroyed(ExtenderItem *item))
|
||||||
|
|
||||||
friend class ExtenderPrivate;
|
friend class ExtenderPrivate;
|
||||||
friend class ExtenderGroup;
|
friend class ExtenderGroup;
|
||||||
|
@ -141,6 +141,7 @@ ExtenderItem::ExtenderItem(Extender *hostExtender, uint extenderItemId)
|
|||||||
|
|
||||||
ExtenderItem::~ExtenderItem()
|
ExtenderItem::~ExtenderItem()
|
||||||
{
|
{
|
||||||
|
emit destroyed(this);
|
||||||
//make sure the original mousepointer always get's restored.
|
//make sure the original mousepointer always get's restored.
|
||||||
if (d->mouseOver) {
|
if (d->mouseOver) {
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
|
@ -254,6 +254,13 @@ class PLASMA_EXPORT ExtenderItem : public QGraphicsWidget
|
|||||||
*/
|
*/
|
||||||
void hideCloseButton();
|
void hideCloseButton();
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
/**
|
||||||
|
* Emitted when the extender item is destroyed
|
||||||
|
* @since 4.4.1
|
||||||
|
*/
|
||||||
|
void destroyed(ExtenderItem *item);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class ExtenderPrivate
|
|||||||
~ExtenderPrivate();
|
~ExtenderPrivate();
|
||||||
|
|
||||||
void addExtenderItem(ExtenderItem *item, const QPointF &pos = QPointF(-1, -1));
|
void addExtenderItem(ExtenderItem *item, const QPointF &pos = QPointF(-1, -1));
|
||||||
void extenderItemDestroyed(QObject *object);
|
void extenderItemDestroyed(ExtenderItem *item);
|
||||||
void removeExtenderItem(ExtenderItem *item);
|
void removeExtenderItem(ExtenderItem *item);
|
||||||
int insertIndexFromPos(const QPointF &pos) const;
|
int insertIndexFromPos(const QPointF &pos) const;
|
||||||
void loadExtenderItems();
|
void loadExtenderItems();
|
||||||
|
Loading…
Reference in New Issue
Block a user