Git: Avoid running unnecessary git commands

Change-Id: I09d6ac15a53e29a7a916be4b80ff2b99372eb079
Reviewed-on: http://codereview.qt.nokia.com/219
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:37:55 +02:00
parent 7d573006a9
commit 4a7a121436

View File

@@ -168,10 +168,15 @@ bool RemoteModel::setData(const QModelIndex &index, const QVariant &value, int r
return false;
const QString name = remoteName(index.row());
const QString url = remoteUrl(index.row());
switch (index.column()) {
case 0:
if (name == value.toString())
return true;
return renameRemote(name, value.toString());
case 1:
if (url == value.toString())
return true;
return updateUrl(name, value.toString());
default:
return false;