From d0756657f449d2bf835475c3686e89435a63006a Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 26 Nov 2018 23:15:41 +0100 Subject: [PATCH] ScxmlEditor: Use ICore::dialogParent() as dialog parent Change-Id: I0f8f0cb29b4fca1ecaf400ddc0b79e0616b27c79 Reviewed-by: Orgad Shaneh --- src/plugins/scxmleditor/common/colorthemeview.cpp | 4 +++- src/plugins/scxmleditor/common/graphicsview.cpp | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/scxmleditor/common/colorthemeview.cpp b/src/plugins/scxmleditor/common/colorthemeview.cpp index 729da31fe12..54fb006d33c 100644 --- a/src/plugins/scxmleditor/common/colorthemeview.cpp +++ b/src/plugins/scxmleditor/common/colorthemeview.cpp @@ -25,6 +25,8 @@ #include "colorthemeview.h" +#include + #include #include #include @@ -58,7 +60,7 @@ void ColorThemeItem::openColorDialog() { QColor oldColor = m_color; - QColorDialog dialog(oldColor, 0); + QColorDialog dialog(oldColor, Core::ICore::dialogParent()); dialog.setWindowTitle(tr("Pick Color")); connect(&dialog, &QColorDialog::currentColorChanged, this, &ColorThemeItem::setColor); QPoint topRight = parentWidget()->mapToGlobal(parentWidget()->rect().topRight()); diff --git a/src/plugins/scxmleditor/common/graphicsview.cpp b/src/plugins/scxmleditor/common/graphicsview.cpp index d702df14422..d44dd5484bb 100644 --- a/src/plugins/scxmleditor/common/graphicsview.cpp +++ b/src/plugins/scxmleditor/common/graphicsview.cpp @@ -31,6 +31,8 @@ #include "scxmluifactory.h" #include "shapeprovider.h" +#include + #include #include #include @@ -246,7 +248,8 @@ void GraphicsView::dropEvent(QDropEvent *event) m_document->setCurrentTag(targetTag); QByteArray scxmlData = m_shapeProvider->scxmlCode(groupIndex, shapeIndex, targetTag); if (!scxmlData.isEmpty() && !m_document->pasteData(scxmlData, targetPos, targetPos)) - QMessageBox::warning(0, tr("SCXML Generation Failed"), m_document->lastError()); + QMessageBox::warning(Core::ICore::dialogParent(), tr("SCXML Generation Failed"), + m_document->lastError()); } } else { event->ignore();