From e96671be05a8a44a6a769acd51eeef5c053a153b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Fri, 22 Feb 2013 02:14:09 +0100 Subject: [PATCH] Add debugsels for popupPosition --- src/declarativeimports/core/dialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/declarativeimports/core/dialog.cpp b/src/declarativeimports/core/dialog.cpp index f111680fd..d1beaacad 100644 --- a/src/declarativeimports/core/dialog.cpp +++ b/src/declarativeimports/core/dialog.cpp @@ -167,15 +167,19 @@ QPoint DialogProxy::popupPosition(QQuickItem *item, int alignment) //If no item was specified try to align at the center of the parent view QQuickItem *parentItem = qobject_cast(parent()); if (parentItem && parentItem->window()) { + qDebug() << "popping up at " << parentItem->window()->geometry().center() - QPoint(width()/2, height()/2); return parentItem->window()->geometry().center() - QPoint(width()/2, height()/2); } else { + qDebug() << "zero-zero"; return QPoint(); } } QPointF pos = item->mapToScene(QPointF(0, 0)); + qDebug() << " we have an item at " << pos; if (item->window() && item->window()->screen()) { pos = item->window()->mapToGlobal(pos.toPoint()); + qDebug() << "popping up at " << pos; } else { return QPoint(); }