vcsbase: refactor status parsing in VCSBaseClient

This impacts Bazaar and Mercurial plugins

Change-Id: Ife1e83083b268e597928fbae30378e488e31ee96
Merge-request: 358
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/3335
This commit is contained in:
cerf
2011-08-22 15:33:03 +00:00
committed by Tobias Hunger
parent 96819ddb7a
commit 3907824b4d
14 changed files with 82 additions and 63 deletions

View File

@@ -541,17 +541,17 @@ void BazaarPlugin::commit()
m_submitRepository = state.topLevel();
connect(m_client, SIGNAL(parsedStatus(QList<QPair<QString,QString> >)),
this, SLOT(showCommitWidget(QList<QPair<QString,QString> >)));
connect(m_client, SIGNAL(parsedStatus(QList<VCSBase::VCSBaseClient::StatusItem>)),
this, SLOT(showCommitWidget(QList<VCSBase::VCSBaseClient::StatusItem>)));
m_client->statusWithSignal(m_submitRepository);
}
void BazaarPlugin::showCommitWidget(const QList<QPair<QString, QString> > &status)
void BazaarPlugin::showCommitWidget(const QList<VCSBase::VCSBaseClient::StatusItem> &status)
{
VCSBase::VCSBaseOutputWindow *outputWindow = VCSBase::VCSBaseOutputWindow::instance();
//Once we receive our data release the connection so it can be reused elsewhere
disconnect(m_client, SIGNAL(parsedStatus(QList<QPair<QString,QString> >)),
this, SLOT(showCommitWidget(QList<QPair<QString,QString> >)));
disconnect(m_client, SIGNAL(parsedStatus(QList<VCSBase::VCSBaseClient::StatusItem>)),
this, SLOT(showCommitWidget(QList<VCSBase::VCSBaseClient::StatusItem>)));
if (status.isEmpty()) {
outputWindow->appendError(tr("There are no changes to commit."));