Remove old code from itembackground and fix possible cause
of segfault with device notifier svn path=/trunk/KDE/kdelibs/; revision=1053424
This commit is contained in:
parent
0317154954
commit
b0630bfd58
@ -85,15 +85,6 @@ ItemBackground::ItemBackground(QGraphicsWidget *parent)
|
|||||||
|
|
||||||
setAcceptedMouseButtons(0);
|
setAcceptedMouseButtons(0);
|
||||||
setZValue(-800);
|
setZValue(-800);
|
||||||
|
|
||||||
/***************
|
|
||||||
* HACK: this is needed in order to show the itemBackground correctly the first time
|
|
||||||
* it appears to be a workaround for some other qt 4.5 clipping bug
|
|
||||||
* will be removed when trunk depends on 4.6
|
|
||||||
*/
|
|
||||||
resize( 1, 1 );
|
|
||||||
hide();
|
|
||||||
//**************
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemBackground::~ItemBackground()
|
ItemBackground::~ItemBackground()
|
||||||
@ -158,6 +149,10 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!target) {
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
bool newTarget = (d->target != target);
|
bool newTarget = (d->target != target);
|
||||||
d->target = target;
|
d->target = target;
|
||||||
if (target) {
|
if (target) {
|
||||||
@ -189,8 +184,6 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
|
|||||||
connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(targetDestroyed(QObject*)));
|
connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(targetDestroyed(QObject*)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user