Commit 036c5ac1 authored by hjk's avatar hjk Committed by Tobias Hunger

vcsbase: "inline" configure button

Having a single button as separate form is wasteful.

Change-Id: I8d1f6dd9c88293c5e3d01fdc56db2aa094e82598
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 12440fa1
......@@ -67,6 +67,5 @@ FORMS += commonsettingspage.ui \
nicknamedialog.ui \
checkoutprogresswizardpage.ui \
basecheckoutwizardpage.ui \
cleandialog.ui \
vcsconfigurationpage.ui \
cleandialog.ui
......@@ -84,7 +84,6 @@ QtcPlugin {
"vcsbasesubmiteditor.h",
"vcsconfigurationpage.cpp",
"vcsconfigurationpage.h",
"vcsconfigurationpage.ui",
"vcsplugin.cpp",
"vcsplugin.h",
"images/diff.png",
......
......@@ -32,31 +32,24 @@
#include "vcsbaseconstants.h"
#include "ui_vcsconfigurationpage.h"
#include <coreplugin/dialogs/iwizard.h>
#include <coreplugin/icore.h>
#include <coreplugin/iversioncontrol.h>
#include <utils/qtcassert.h>
#include <QPushButton>
#include <QVBoxLayout>
#include <QWizardPage>
namespace VcsBase {
namespace Internal {
class VcsConfigurationPagePrivate
{
public:
VcsConfigurationPagePrivate() :
m_ui(new Ui::VcsConfigurationPage)
{ }
~VcsConfigurationPagePrivate()
{
delete m_ui;
}
Ui::VcsConfigurationPage *m_ui;
const Core::IVersionControl *m_versionControl;
QPushButton *m_configureButton;
};
} // namespace Internal
......@@ -70,14 +63,13 @@ VcsConfigurationPage::VcsConfigurationPage(const Core::IVersionControl *vc, QWid
setSubTitle(tr("Please configure <b>%1</b> now.").arg(vc->displayName()));
d->m_versionControl = vc;
d->m_configureButton = new QPushButton(tr("Configure..."), this);
connect(d->m_versionControl, SIGNAL(configurationChanged()),
this, SIGNAL(completeChanged()));
d->m_ui->setupUi(this);
QVBoxLayout *verticalLayout = new QVBoxLayout(this);
verticalLayout->addWidget(d->m_configureButton);
connect(d->m_ui->configureButton, SIGNAL(clicked()),
this, SLOT(openConfiguration()));
connect(d->m_versionControl, SIGNAL(configurationChanged()), SIGNAL(completeChanged()));
connect(d->m_configureButton, SIGNAL(clicked()), SLOT(openConfiguration()));
}
VcsConfigurationPage::~VcsConfigurationPage()
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>VcsBase::Internal::VcsConfigurationPage</class>
<widget class="QWizardPage" name="VcsBase::Internal::VcsConfigurationPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>264</width>
<height>200</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="configureButton">
<property name="text">
<string>Configure...</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
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