Skip to content
Snippets Groups Projects
Commit f3ebc437 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Disable the 'Add to project' part when there are no projects


Or when the list is empty because it is not supported, like when
creating a new project.

Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent 6c5bebe1
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,8 @@ void ProjectWizardPage::setProjects(const QStringList &p) ...@@ -53,6 +53,8 @@ void ProjectWizardPage::setProjects(const QStringList &p)
{ {
m_ui->projectComboBox->clear(); m_ui->projectComboBox->clear();
m_ui->projectComboBox->addItems(p); m_ui->projectComboBox->addItems(p);
m_ui->projectComboBox->setEnabled(p.size() > 1);
m_ui->projectLabel->setEnabled(p.size() > 1);
} }
void ProjectWizardPage::setProjectToolTips(const QStringList &t) void ProjectWizardPage::setProjectToolTips(const QStringList &t)
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="projectLabel"> <widget class="QLabel" name="projectLabel">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text"> <property name="text">
<string>Add to &amp;project:</string> <string>Add to &amp;project:</string>
</property> </property>
...@@ -31,6 +34,9 @@ ...@@ -31,6 +34,9 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="projectComboBox"> <widget class="QComboBox" name="projectComboBox">
<property name="enabled">
<bool>false</bool>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
...@@ -44,8 +50,7 @@ ...@@ -44,8 +50,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QComboBox" name="addToVersionControlComboBox"> <widget class="QComboBox" name="addToVersionControlComboBox"/>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment