forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user