diff options
Diffstat (limited to 'src/plugins/git/remotemodel.cpp')
-rw-r--r-- | src/plugins/git/remotemodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/git/remotemodel.cpp b/src/plugins/git/remotemodel.cpp index a260ac76ac..c2fd62094d 100644 --- a/src/plugins/git/remotemodel.cpp +++ b/src/plugins/git/remotemodel.cpp @@ -185,8 +185,9 @@ void RemoteModel::clear() { if (m_remotes.isEmpty()) return; + beginResetModel(); m_remotes.clear(); - reset(); + endResetModel(); } bool RemoteModel::refresh(const QString &workingDirectory, QString *errorMessage) @@ -199,6 +200,7 @@ bool RemoteModel::refresh(const QString &workingDirectory, QString *errorMessage return false; // Parse output m_workingDirectory = workingDirectory; + beginResetModel(); m_remotes.clear(); const QStringList lines = output.split(QLatin1Char('\n')); for (int r = 0; r < lines.count(); ++r) { @@ -206,7 +208,7 @@ bool RemoteModel::refresh(const QString &workingDirectory, QString *errorMessage if (newRemote.parse(lines.at(r))) m_remotes.push_back(newRemote); } - reset(); + endResetModel(); return true; } |