Commit e6d0e687 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Replace QStringList with QString in readConfig

All the calls pass a single argument

Change-Id: I95a7c44114ff2bb38cd65ab79a1e455dc969a62b
Reviewed-by: default avatarTobias Hunger <>
parent 0d61ddce
......@@ -2400,9 +2400,8 @@ SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory)
if (cachedSubmoduleData.contains(workingDirectory))
return cachedSubmoduleData.value(workingDirectory);
QStringList args(QLatin1String("-l"));
QStringList allConfigs = readConfig(workingDirectory, args).split(QLatin1Char('\n'));
QStringList allConfigs = readConfig(workingDirectory, QLatin1String("-l")).split(QLatin1Char('\n'));
const QString submoduleLineStart = QLatin1String("submodule.");
foreach (const QString &configLine, allConfigs) {
if (!configLine.startsWith(submoduleLineStart))
......@@ -3743,7 +3742,7 @@ bool GitClient::synchronousStashList(const QString &workingDirectory,
return true;
QString GitClient::readConfig(const QString &workingDirectory, const QStringList &configVar) const
QString GitClient::readConfig(const QString &workingDirectory, const QString &configVar) const
QStringList arguments;
arguments << QLatin1String("config") << configVar;
......@@ -3761,7 +3760,7 @@ QString GitClient::readConfig(const QString &workingDirectory, const QStringList
// Read a single-line config value, return trimmed
QString GitClient::readConfigValue(const QString &workingDirectory, const QString &configVar) const
return readConfig(workingDirectory, QStringList(configVar)).remove(QLatin1Char('\n'));
return readConfig(workingDirectory, configVar).remove(QLatin1Char('\n'));
bool GitClient::cloneRepository(const QString &directory,const QByteArray &url)
......@@ -281,7 +281,7 @@ public:
const QString &messge, QString *name,
QString *errorMessage = 0);
QString readConfig(const QString &workingDirectory, const QStringList &configVar) const;
QString readConfig(const QString &workingDirectory, const QString &configVar) const;
QString readConfigValue(const QString &workingDirectory, const QString &configVar) const;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment