Commit 5fb2f2d6 authored by Daniel Teske's avatar Daniel Teske

Utils::FileName: Rename append to appendString()

The function's operation of simply appending the string as is would be
fine if FileNames were strings. But they aren't, so the function name
should be intentionally ugly to stand out.

Change-Id: I85e16844e2d69cacb6566c538182b84300c45161
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 8b64e859
...@@ -635,18 +635,18 @@ FileName FileName::relativeChildPath(const FileName &parent) const ...@@ -635,18 +635,18 @@ FileName FileName::relativeChildPath(const FileName &parent) const
FileName &FileName::appendPath(const QString &s) FileName &FileName::appendPath(const QString &s)
{ {
if (!isEmpty() && !QString::endsWith(QLatin1Char('/'))) if (!isEmpty() && !QString::endsWith(QLatin1Char('/')))
append(QLatin1Char('/')); appendString(QLatin1Char('/'));
append(s); appendString(s);
return *this; return *this;
} }
FileName &FileName::append(const QString &str) FileName &FileName::appendString(const QString &str)
{ {
QString::append(str); QString::append(str);
return *this; return *this;
} }
FileName &FileName::append(QChar str) FileName &FileName::appendString(QChar str)
{ {
QString::append(str); QString::append(str);
return *this; return *this;
......
...@@ -75,8 +75,8 @@ public: ...@@ -75,8 +75,8 @@ public:
Utils::FileName relativeChildPath(const FileName &parent) const; Utils::FileName relativeChildPath(const FileName &parent) const;
Utils::FileName &appendPath(const QString &s); Utils::FileName &appendPath(const QString &s);
Utils::FileName &append(const QString &str); Utils::FileName &appendString(const QString &str);
Utils::FileName &append(QChar str); Utils::FileName &appendString(QChar str);
using QString::size; using QString::size;
using QString::count; using QString::count;
......
...@@ -334,22 +334,22 @@ FileName AndroidConfigurations::toolPath(Abi::Architecture architecture, const Q ...@@ -334,22 +334,22 @@ FileName AndroidConfigurations::toolPath(Abi::Architecture architecture, const Q
FileName AndroidConfigurations::stripPath(Abi::Architecture architecture, const QString &ndkToolChainVersion) const FileName AndroidConfigurations::stripPath(Abi::Architecture architecture, const QString &ndkToolChainVersion) const
{ {
return toolPath(architecture, ndkToolChainVersion).append(QLatin1String("-strip" QTC_HOST_EXE_SUFFIX)); return toolPath(architecture, ndkToolChainVersion).appendString(QLatin1String("-strip" QTC_HOST_EXE_SUFFIX));
} }
FileName AndroidConfigurations::readelfPath(Abi::Architecture architecture, const QString &ndkToolChainVersion) const FileName AndroidConfigurations::readelfPath(Abi::Architecture architecture, const QString &ndkToolChainVersion) const
{ {
return toolPath(architecture, ndkToolChainVersion).append(QLatin1String("-readelf" QTC_HOST_EXE_SUFFIX)); return toolPath(architecture, ndkToolChainVersion).appendString(QLatin1String("-readelf" QTC_HOST_EXE_SUFFIX));
} }
FileName AndroidConfigurations::gccPath(Abi::Architecture architecture, const QString &ndkToolChainVersion) const FileName AndroidConfigurations::gccPath(Abi::Architecture architecture, const QString &ndkToolChainVersion) const
{ {
return toolPath(architecture, ndkToolChainVersion).append(QLatin1String("-gcc" QTC_HOST_EXE_SUFFIX)); return toolPath(architecture, ndkToolChainVersion).appendString(QLatin1String("-gcc" QTC_HOST_EXE_SUFFIX));
} }
FileName AndroidConfigurations::gdbPath(Abi::Architecture architecture, const QString &ndkToolChainVersion) const FileName AndroidConfigurations::gdbPath(Abi::Architecture architecture, const QString &ndkToolChainVersion) const
{ {
return toolPath(architecture, ndkToolChainVersion).append(QLatin1String("-gdb" QTC_HOST_EXE_SUFFIX)); return toolPath(architecture, ndkToolChainVersion).appendString(QLatin1String("-gdb" QTC_HOST_EXE_SUFFIX));
} }
FileName AndroidConfigurations::openJDKPath() const FileName AndroidConfigurations::openJDKPath() const
......
...@@ -288,7 +288,7 @@ Utils::FileName AndroidManager::libsPath(ProjectExplorer::Target *target) ...@@ -288,7 +288,7 @@ Utils::FileName AndroidManager::libsPath(ProjectExplorer::Target *target)
Utils::FileName AndroidManager::stringsPath(ProjectExplorer::Target *target) Utils::FileName AndroidManager::stringsPath(ProjectExplorer::Target *target)
{ {
return dirPath(target).append(AndroidStringsFileName); return dirPath(target).appendString(AndroidStringsFileName);
} }
Utils::FileName AndroidManager::defaultPropertiesPath(ProjectExplorer::Target *target) Utils::FileName AndroidManager::defaultPropertiesPath(ProjectExplorer::Target *target)
......
...@@ -182,7 +182,7 @@ Utils::FileName QnxUtils::executableWithExtension(const Utils::FileName &fileNam ...@@ -182,7 +182,7 @@ Utils::FileName QnxUtils::executableWithExtension(const Utils::FileName &fileNam
{ {
Utils::FileName result = fileName; Utils::FileName result = fileName;
if (Utils::HostOsInfo::isWindowsHost()) if (Utils::HostOsInfo::isWindowsHost())
result.append(QLatin1String(".exe")); result.appendString(QLatin1String(".exe"));
return result; return result;
} }
......
...@@ -77,6 +77,6 @@ Utils::FileName Settings::getPath(const QString &file) ...@@ -77,6 +77,6 @@ Utils::FileName Settings::getPath(const QString &file)
result.appendPath(QLatin1String("debuggers")); result.appendPath(QLatin1String("debuggers"));
else else
return Utils::FileName(); return Utils::FileName();
result.append(QLatin1String(".xml")); result.appendString(QLatin1String(".xml"));
return result; return result;
} }
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