Git: fetch from remote

Task-number: QTCREATORBUG-4942
Change-Id: Ifd8586e110379a621c43233fe9b912bd82f7f28a
Reviewed-on: http://codereview.qt.nokia.com/218
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Tobias Hunger
2011-05-26 10:20:09 +02:00
parent 7f33ef02e7
commit 7d573006a9
8 changed files with 31 additions and 3 deletions

View File

@@ -101,6 +101,7 @@ RemoteDialog::RemoteDialog(QWidget *parent) :
m_ui->remoteView->verticalHeader()->setDefaultSectionSize(qMax(static_cast<int>(fm.height() * 1.2), fm.height() + 4));
connect(m_ui->addButton, SIGNAL(clicked()), this, SLOT(addRemote()));
connect(m_ui->fetchButton, SIGNAL(clicked()), this, SLOT(fetchFromRemote()));
connect(m_ui->removeButton, SIGNAL(clicked()), this, SLOT(removeRemote()));
}
@@ -152,6 +153,17 @@ void RemoteDialog::removeRemote()
}
}
void RemoteDialog::fetchFromRemote()
{
const QModelIndexList indexList = m_ui->remoteView->selectionModel()->selectedIndexes();
if (indexList.count() == 0)
return;
int row = indexList.at(0).row();
const QString remoteName = m_remoteModel->remoteName(row);
m_remoteModel->client()->synchronousFetch(m_remoteModel->workingDirectory(), remoteName);
}
void RemoteDialog::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);