Git: Initialize remote model directory even when no remotes found

Task-number: QTCREATORBUG-9789
Change-Id: If3626e244b9d85ad670d586438710e17bba8e927
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-07-26 17:24:13 +03:00
committed by Orgad Shaneh
parent 044a78f750
commit 60fa56db8e
3 changed files with 6 additions and 8 deletions

View File

@@ -177,6 +177,8 @@ void RemoteModel::clear()
bool RemoteModel::refresh(const QString &workingDirectory, QString *errorMessage)
{
m_workingDirectory = workingDirectory;
// get list of remotes.
QMap<QString,QString> remotesList =
m_client->synchronousRemotesList(workingDirectory, errorMessage);
@@ -184,7 +186,6 @@ bool RemoteModel::refresh(const QString &workingDirectory, QString *errorMessage
if (remotesList.isEmpty())
return false;
m_workingDirectory = workingDirectory;
beginResetModel();
m_remotes.clear();
foreach (const QString &remoteName, remotesList.keys()) {