diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp index 0c0543c2b9a..e5ffc79965f 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp @@ -32,8 +32,11 @@ #include "jsonwizardgeneratorfactory.h" +#include + #include #include +#include #include #include @@ -213,4 +216,18 @@ void JsonWizard::accept() emit allDone(m_files); } +void JsonWizard::handleNewPages(int pageId) +{ + Utils::WizardPage *wp = qobject_cast(page(pageId)); + if (!wp) + return; + + connect(wp, &Utils::WizardPage::reportError, this, &JsonWizard::handleError); +} + +void JsonWizard::handleError(const QString &message) +{ + Core::MessageManager::write(message, Core::MessageManager::ModeSwitch); +} + } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard.h b/src/plugins/projectexplorer/jsonwizard/jsonwizard.h index b58876c0c32..e66b655a167 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizard.h +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard.h @@ -95,6 +95,10 @@ signals: public slots: void accept(); +private slots: + void handleNewPages(int pageId); + void handleError(const QString &message); + private: QList m_generators;