forked from qt-creator/qt-creator
Git: De-noise
* Remove QLatin1{String|Char} where possible
* Use initializer lists for QStringList
Change-Id: I8479f87f4fc909b5d74d854956885564209538e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
539e33da02
commit
516161c875
@@ -48,9 +48,8 @@ bool RemoteModel::removeRemote(int row)
|
||||
{
|
||||
QString output;
|
||||
QString error;
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(m_workingDirectory,
|
||||
QStringList() << QLatin1String("rm") << remoteName(row),
|
||||
&output, &error);
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(
|
||||
m_workingDirectory, { "rm", remoteName(row) }, &output, &error);
|
||||
if (success)
|
||||
success = refresh(m_workingDirectory, &error);
|
||||
return success;
|
||||
@@ -63,9 +62,8 @@ bool RemoteModel::addRemote(const QString &name, const QString &url)
|
||||
if (name.isEmpty() || url.isEmpty())
|
||||
return false;
|
||||
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(m_workingDirectory,
|
||||
QStringList() << QLatin1String("add") << name << url,
|
||||
&output, &error);
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(
|
||||
m_workingDirectory, { "add", name, url }, &output, &error);
|
||||
if (success)
|
||||
success = refresh(m_workingDirectory, &error);
|
||||
return success;
|
||||
@@ -75,9 +73,8 @@ bool RemoteModel::renameRemote(const QString &oldName, const QString &newName)
|
||||
{
|
||||
QString output;
|
||||
QString error;
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(m_workingDirectory,
|
||||
QStringList() << QLatin1String("rename") << oldName << newName,
|
||||
&output, &error);
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(
|
||||
m_workingDirectory, { "rename", oldName, newName }, &output, &error);
|
||||
if (success)
|
||||
success = refresh(m_workingDirectory, &error);
|
||||
return success;
|
||||
@@ -87,9 +84,8 @@ bool RemoteModel::updateUrl(const QString &name, const QString &newUrl)
|
||||
{
|
||||
QString output;
|
||||
QString error;
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(m_workingDirectory,
|
||||
QStringList() << QLatin1String("set-url") << name << newUrl,
|
||||
&output, &error);
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(
|
||||
m_workingDirectory, { "set-url", name, newUrl }, &output, &error);
|
||||
if (success)
|
||||
success = refresh(m_workingDirectory, &error);
|
||||
return success;
|
||||
|
||||
Reference in New Issue
Block a user