forked from qt-creator/qt-creator
ScxmlEditor: Use ICore::dialogParent() as dialog parent
Change-Id: I0f8f0cb29b4fca1ecaf400ddc0b79e0616b27c79 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "colorthemeview.h"
|
#include "colorthemeview.h"
|
||||||
|
|
||||||
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <QBrush>
|
#include <QBrush>
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
#include <QLinearGradient>
|
#include <QLinearGradient>
|
||||||
@@ -58,7 +60,7 @@ void ColorThemeItem::openColorDialog()
|
|||||||
{
|
{
|
||||||
QColor oldColor = m_color;
|
QColor oldColor = m_color;
|
||||||
|
|
||||||
QColorDialog dialog(oldColor, 0);
|
QColorDialog dialog(oldColor, Core::ICore::dialogParent());
|
||||||
dialog.setWindowTitle(tr("Pick Color"));
|
dialog.setWindowTitle(tr("Pick Color"));
|
||||||
connect(&dialog, &QColorDialog::currentColorChanged, this, &ColorThemeItem::setColor);
|
connect(&dialog, &QColorDialog::currentColorChanged, this, &ColorThemeItem::setColor);
|
||||||
QPoint topRight = parentWidget()->mapToGlobal(parentWidget()->rect().topRight());
|
QPoint topRight = parentWidget()->mapToGlobal(parentWidget()->rect().topRight());
|
||||||
|
@@ -31,6 +31,8 @@
|
|||||||
#include "scxmluifactory.h"
|
#include "scxmluifactory.h"
|
||||||
#include "shapeprovider.h"
|
#include "shapeprovider.h"
|
||||||
|
|
||||||
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
@@ -246,7 +248,8 @@ void GraphicsView::dropEvent(QDropEvent *event)
|
|||||||
m_document->setCurrentTag(targetTag);
|
m_document->setCurrentTag(targetTag);
|
||||||
QByteArray scxmlData = m_shapeProvider->scxmlCode(groupIndex, shapeIndex, targetTag);
|
QByteArray scxmlData = m_shapeProvider->scxmlCode(groupIndex, shapeIndex, targetTag);
|
||||||
if (!scxmlData.isEmpty() && !m_document->pasteData(scxmlData, targetPos, targetPos))
|
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 {
|
} else {
|
||||||
event->ignore();
|
event->ignore();
|
||||||
|
Reference in New Issue
Block a user