diff --git a/src/declarativeimports/core/dialog.cpp b/src/declarativeimports/core/dialog.cpp index b225a313d..6dfb6196d 100644 --- a/src/declarativeimports/core/dialog.cpp +++ b/src/declarativeimports/core/dialog.cpp @@ -208,13 +208,16 @@ QPoint DialogProxy::popupPosition(QQuickItem *item, Qt::AlignmentFlag 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() << "NO visual parent ... Centering at " << (parentItem->window()->geometry().center() - QPoint(width()/2, height()/2)); return parentItem->window()->geometry().center() - QPoint(width()/2, height()/2); } else { + qDebug() << "No QQuickItem as parent found"; return QPoint(); } } - + qDebug() << "I've an Item"; QPointF pos = item->mapToScene(QPointF(0, 0)); + qDebug() << "I've an Item at " << pos; if (item->window() && item->window()->screen()) { pos = item->window()->mapToGlobal(pos.toPoint()); } else { @@ -309,7 +312,7 @@ bool DialogProxy::isActiveWindow() const void DialogProxy::activateWindow() { qDebug(); - setWindowState(Qt::WindowActive); + //setWindowState(Qt::WindowActive); } int DialogProxy::windowFlags() const diff --git a/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml b/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml index 6761b1cd4..68d27dc0c 100644 --- a/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml +++ b/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml @@ -162,12 +162,15 @@ PlasmaComponents.Page { PlasmaComponents.QueryDialog { id: queryDialog //windowFlags: Qt.Popup - //visualParent: root + visualParent: root titleText: "Fruit Inquiry" message: "Would you rather have apples or oranges?" - acceptButtonText: i18n("Apples") - rejectButtonText: i18n("Oranges") - onButtonClicked: close() + acceptButtonText: "Apples" + rejectButtonText: "Oranges" + onButtonClicked: { + print("hey"); + queryDialog.close(); + } } } PlasmaComponents.ButtonRow {