Commit 5162596f authored by Tobias Hunger's avatar Tobias Hunger
Browse files

ProjectExplorer: Fix listing of project nodes in the wizard's summary page



The wizards summary page did no longer list existing project nodes. Wire up that logic
so that projects and files can finally get added to existing qmake projects again.

Task-number: QTCREATORBUG-17994
Change-Id: Icc019bdf0f569440eaa01c55fc69b17e7f831b20
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
Reviewed-by: default avatarhjk <hjk@qt.io>
parent da831abb
......@@ -293,6 +293,8 @@ ProjectWizardPage::ProjectWizardPage(QWidget *parent) : WizardPage(parent),
connect(VcsManager::instance(), &VcsManager::configurationChanged,
this, &ProjectExplorer::Internal::ProjectWizardPage::initializeVersionControls);
m_ui->projectComboBox->setModel(&m_model);
}
ProjectWizardPage::~ProjectWizardPage()
......@@ -302,16 +304,6 @@ ProjectWizardPage::~ProjectWizardPage()
delete m_ui;
}
void ProjectWizardPage::setModel(Utils::TreeModel<> *model)
{
// TODO see OverViewCombo and OverView for click event filter
m_ui->projectComboBox->setModel(model);
bool enabled = m_model.rowCount(QModelIndex()) > 1;
m_ui->projectComboBox->setEnabled(enabled);
expandTree(QModelIndex());
}
bool ProjectWizardPage::expandTree(const QModelIndex &root)
{
bool expand = false;
......@@ -467,6 +459,8 @@ void ProjectWizardPage::initializeProjectTree(Node *context, const QStringList &
setAdditionalInfo(selector.deployingProjects());
setBestNode(selector.bestChoice());
setAddingSubProject(action == AddSubProject);
m_ui->projectComboBox->setEnabled(m_model.rowCount(QModelIndex()) > 1);
}
void ProjectWizardPage::setNoneLabel(const QString &label)
......
......@@ -87,7 +87,6 @@ private:
void setAdditionalInfo(const QString &text);
void setAddingSubProject(bool addingSubProject);
void setModel(Utils::TreeModel<> *model);
void setBestNode(ProjectExplorer::Internal::AddNewTree *tree);
void setVersionControls(const QStringList &);
void setProjectToolTip(const QString &);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment