Commit 27eb0418 authored by hjk's avatar hjk

projectexplorer: make toolchain "Clone" option more obvious

Reviewed-By: Tobias Hunger
parent e849fb6c
......@@ -432,7 +432,7 @@ void ToolChainModel::removeToolChain(ToolChain *tc)
// --------------------------------------------------------------------------
ToolChainOptionsPage::ToolChainOptionsPage() :
m_ui(0), m_cloneAction(0), m_model(0), m_selectionModel(0), m_currentTcWidget(0)
m_ui(0), m_model(0), m_selectionModel(0), m_currentTcWidget(0)
{ }
QString ToolChainOptionsPage::id() const
......@@ -501,14 +501,9 @@ QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
addMenu->addAction(action);
}
}
m_cloneAction = new QAction(addMenu);
m_cloneAction->setText(tr("Clone ..."));
connect(m_cloneAction, SIGNAL(triggered()), mapper, SLOT(map()));
mapper->setMapping(m_cloneAction, static_cast<QObject *>(0));
if (!addMenu->isEmpty())
addMenu->addSeparator();
addMenu->addAction(m_cloneAction);
connect(m_ui->cloneButton, SIGNAL(clicked()), mapper, SLOT(map()));
mapper->setMapping(m_ui->cloneButton, static_cast<QObject *>(0));
m_ui->addButton->setMenu(addMenu);
connect(m_ui->delButton, SIGNAL(clicked()), this, SLOT(removeToolChain()));
......@@ -599,7 +594,7 @@ void ToolChainOptionsPage::updateState()
canDelete = !tc->isAutoDetected();
}
m_cloneAction->setEnabled(canCopy);
m_ui->cloneButton->setEnabled(canCopy);
m_ui->delButton->setEnabled(canDelete);
}
......
......@@ -144,7 +144,6 @@ private:
Ui::ToolChainOptionsPage *m_ui;
QWidget *m_configWidget;
QString m_searchKeywords;
QAction *m_cloneAction;
ToolChainModel *m_model;
QList<ToolChainFactory *> m_factories;
......
......@@ -50,6 +50,25 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cloneButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>21</width>
<height>23</height>
</size>
</property>
<property name="text">
<string>Clone</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="delButton">
<property name="sizePolicy">
......
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