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