forked from qt-creator/qt-creator
Fix build error: Allow changing the 3D Editor's background color
Task-number: QDS-6585 Change-Id: Id87e5403a3c6d398aa9ebf85cc97cc4c9bf7a2a2 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -65,7 +65,7 @@ void saveBackgroundColorConfiguration(const QList<QColor> &colorConfig)
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
QPointer<QColorDialog> BackgroundColorSelection::createDialog(QWidget *parent)
|
QColorDialog *BackgroundColorSelection::createDialog(QWidget *parent)
|
||||||
{
|
{
|
||||||
auto dialog = new QColorDialog(parent);
|
auto dialog = new QColorDialog(parent);
|
||||||
|
|
||||||
@@ -100,4 +100,8 @@ void BackgroundColorSelection::showBackgroundColorSelectionWidget(QWidget *paren
|
|||||||
|
|
||||||
m_dialog = BackgroundColorSelection::createDialog(parent);
|
m_dialog = BackgroundColorSelection::createDialog(parent);
|
||||||
QTC_ASSERT(m_dialog, return);
|
QTC_ASSERT(m_dialog, return);
|
||||||
|
|
||||||
|
QObject::connect(m_dialog, &QWidget::destroyed, m_dialog, [&]() {
|
||||||
|
m_dialog = nullptr;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@@ -40,8 +40,8 @@ public:
|
|||||||
static void showBackgroundColorSelectionWidget(QWidget *parent);
|
static void showBackgroundColorSelectionWidget(QWidget *parent);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static QPointer<QColorDialog> createDialog(QWidget *parent);
|
static QColorDialog *createDialog(QWidget *parent);
|
||||||
inline static QPointer<QColorDialog> m_dialog;
|
inline static QColorDialog *m_dialog = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
Reference in New Issue
Block a user