get rid of appletAt()

still two uses commented out in conteinmentactions
This commit is contained in:
Marco Martin 2012-11-09 15:46:12 +01:00
parent 798fc9271b
commit 1021ecf18f
5 changed files with 5 additions and 41 deletions

View File

@ -438,7 +438,8 @@ void Containment::contextMenuEvent(QContextMenuEvent *event)
}
KMenu desktopMenu;
Applet *applet = d->appletAt(event->pos());
//TODO: port to the new containmentactions architecture
Applet *applet = 0;//d->appletAt(event->pos());
//kDebug() << "context menu event " << (QObject*)applet;
if (applet) {
@ -767,9 +768,6 @@ void Containment::keyPressEvent(QKeyEvent *event)
void Containment::wheelEvent(QWheelEvent *event)
{
event->ignore();
if (d->appletAt(event->pos())) {
return; //no unexpected click-throughs
}
if (d->wallpaper && d->wallpaper->isInitialized()) {
event->ignore();

View File

@ -274,7 +274,8 @@ QPoint ContainmentActions::popupPosition(const QSize &s, QEvent *event)
return screenPosFromEvent(event);
}
Applet *applet = c->d->appletAt(scenePosFromEvent(event));
//TODO: port to new architecture
Applet *applet = 0;//c->d->appletAt(scenePosFromEvent(event));
QPoint screenPos = screenPosFromEvent(event);
QPoint pos = screenPos;
if (applet && containment()->d->isPanelContainment()) {

View File

@ -24,7 +24,7 @@ Functionality Blocks
Porting of Applet and Containment
=================================
* ContainmentPrivate::appletAt(const QPointF &point)
* ContainmentPrivate::appletAt(const QPointF &point) -> depends from ContainmentActions refactoring : disabled now in the code
* ContainmentPrivate::setScreen(int newScreen, int newDesktop, bool preventInvalidDesktops)
* all geometry functions in Applet and Containment (width, height, geometry, raise, lower...)

View File

@ -208,39 +208,6 @@ void ContainmentPrivate::addAppletActions(KMenu &desktopMenu, Applet *applet, QE
}
}
Applet* ContainmentPrivate::appletAt(const QPointF &point)
{
return 0;
/*TODO: port away qgv
Applet *applet = 0;
QGraphicsItem *item = q->scene()->itemAt(point);
if (item == q) {
item = 0;
}
while (item) {
if (item->isWidget()) {
applet = qobject_cast<Applet*>(static_cast<QGraphicsWidget*>(item));
if (applet) {
if (applet->isContainment()) {
applet = 0;
}
break;
}
}
AppletHandle *handle = dynamic_cast<AppletHandle*>(item);
if (handle) {
//pretend it was on the applet
applet = handle->applet();
break;
}
item = item->parentItem();
}
return applet;
*/
}
void ContainmentPrivate::setScreen(int newScreen, int newDesktop, bool preventInvalidDesktops)
{
// What we want to do in here is:

View File

@ -141,8 +141,6 @@ public:
*/
bool prepareContainmentActions(const QString &trigger, const QPoint &screenPos, KMenu *menu = 0);
Applet *appletAt(const QPointF &point);
/**
* Delayed drop zone display
*/