Commit 240e6a8a authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Fix missing import widget



Show the import widget, even if no targets are defined. This makes it
possible to import existing build directories.

Task-number: QTCREATORBUG-7681
Change-Id: Ib7807fb03f63a42277e16561c26d0d4cffae5099
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 319334bb
......@@ -94,8 +94,6 @@ TargetSetupPage::TargetSetupPage(QWidget *parent) :
this, SLOT(handleProfileUpdate(ProjectExplorer::Profile*)));
connect(m_importWidget, SIGNAL(importFrom(Utils::FileName)),
this, SLOT(import(Utils::FileName)));
connect(m_ui->noValidProfileLabel, SIGNAL(linkActivated(QString)),
this, SLOT(openTargetPreferences()));
}
void TargetSetupPage::initializePage()
......@@ -489,28 +487,13 @@ void TargetSetupPage::selectAtLeastOneTarget()
void TargetSetupPage::updateVisibility()
{
if (m_widgets.isEmpty()) {
// Oh no one can create any targets
m_ui->scrollAreaWidget->setVisible(false);
m_ui->centralWidget->setVisible(false);
m_ui->descriptionLabel->setVisible(false);
m_ui->noValidProfileLabel->setVisible(true);
} else {
m_ui->scrollAreaWidget->setVisible(m_baseLayout == m_ui->scrollArea->widget()->layout());
m_ui->centralWidget->setVisible(m_baseLayout == m_ui->centralWidget->layout());
m_ui->descriptionLabel->setVisible(true);
m_ui->noValidProfileLabel->setVisible(false);
}
// Always show the widgets, the import widget always makes sense to show.
m_ui->scrollAreaWidget->setVisible(m_baseLayout == m_ui->scrollArea->widget()->layout());
m_ui->centralWidget->setVisible(m_baseLayout == m_ui->centralWidget->layout());
emit completeChanged();
}
void TargetSetupPage::openTargetPreferences()
{
Core::ICore::showOptionsDialog(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
ProjectExplorer::Constants::PROFILE_SETTINGS_PAGE_ID);
}
void TargetSetupPage::removeWidget(ProjectExplorer::Profile *p)
{
Qt4TargetSetupWidget *widget = m_widgets.value(p->id());
......
......@@ -94,7 +94,6 @@ private slots:
void handleProfileRemoval(ProjectExplorer::Profile *p);
void handleProfileUpdate(ProjectExplorer::Profile *p);
void updateVisibility();
void openTargetPreferences();
private:
void selectAtLeastOneTarget();
......
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