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:
Samuel Ghinet
2022-06-01 14:56:12 +03:00
parent c3b90c0ce5
commit e5ce1f98f7
2 changed files with 7 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ void saveBackgroundColorConfiguration(const QList<QColor> &colorConfig)
} // namespace
QPointer<QColorDialog> BackgroundColorSelection::createDialog(QWidget *parent)
QColorDialog *BackgroundColorSelection::createDialog(QWidget *parent)
{
auto dialog = new QColorDialog(parent);
@@ -100,4 +100,8 @@ void BackgroundColorSelection::showBackgroundColorSelectionWidget(QWidget *paren
m_dialog = BackgroundColorSelection::createDialog(parent);
QTC_ASSERT(m_dialog, return);
QObject::connect(m_dialog, &QWidget::destroyed, m_dialog, [&]() {
m_dialog = nullptr;
});
}

View File

@@ -40,8 +40,8 @@ public:
static void showBackgroundColorSelectionWidget(QWidget *parent);
private:
static QPointer<QColorDialog> createDialog(QWidget *parent);
inline static QPointer<QColorDialog> m_dialog;
static QColorDialog *createDialog(QWidget *parent);
inline static QColorDialog *m_dialog = nullptr;
};
} // namespace QmlDesigner