diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp index 0c0543c2b9a84030142b7ee2c7a32e30aaa4242e..e5ffc79965fb25597e59f740382b331b0f11c0c0 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 b58876c0c322df1e29800540fd8c1c0c2e947fa3..e66b655a167061b3d70d62307b0d5a3a1f85a4f6 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;