Use Widget::view() to find the view rather than emmiting
QGraphicsSceneMouseEvent from Plasma::Icon for only that purpose svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746549
This commit is contained in:
parent
a98f0b9838
commit
5db83950c4
@ -922,7 +922,6 @@ void Icon::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
|
||||
d->state = Private::PressedState;
|
||||
emit pressed(true);
|
||||
emit pressed(true, event);
|
||||
|
||||
event->accept();
|
||||
update();
|
||||
@ -949,11 +948,9 @@ void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
|
||||
if (was == Private::PressedState) {
|
||||
emit pressed(false);
|
||||
emit pressed(false, event);
|
||||
|
||||
if (inside) {
|
||||
emit clicked();
|
||||
emit clicked(event);
|
||||
}
|
||||
d->state = Private::NoState;
|
||||
}
|
||||
|
@ -163,13 +163,11 @@ Q_SIGNALS:
|
||||
* Indicates when the icon has been pressed.
|
||||
*/
|
||||
void pressed(bool down);
|
||||
void pressed(bool down, QGraphicsSceneMouseEvent *event);
|
||||
|
||||
/**
|
||||
* Indicates when the icon has been clicked.
|
||||
*/
|
||||
void clicked();
|
||||
void clicked(QGraphicsSceneMouseEvent *event);
|
||||
|
||||
protected:
|
||||
bool isDown();
|
||||
|
Loading…
x
Reference in New Issue
Block a user