Utils: Rename one of the FileName::fromString overloads

Overloaded functions are ugly to use in algorithms like transform().

Change-Id: Ia4f191e1cd9a21ceb99dec23a8f4fd1ce5f24182
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-03-19 09:01:18 +01:00
parent 2a2a2a6ed2
commit 4f3f73bc3b
4 changed files with 4 additions and 4 deletions

View File

@@ -654,7 +654,7 @@ FileName FileName::fromString(const QString &filename)
/// Constructs a FileName from \a fileName. The \a defaultExtension is appended
/// to \a filename if that does not have an extension already.
/// \a fileName is not checked for validity.
FileName FileName::fromString(const QString &filename, const QString &defaultExtension)
FileName FileName::fromStringWithExtension(const QString &filename, const QString &defaultExtension)
{
if (filename.isEmpty() || defaultExtension.isEmpty())
return filename;

View File

@@ -67,7 +67,7 @@ public:
explicit FileName(const QFileInfo &info);
QFileInfo toFileInfo() const;
static FileName fromString(const QString &filename);
static FileName fromString(const QString &filename, const QString &defaultExtension);
static FileName fromStringWithExtension(const QString &filename, const QString &defaultExtension);
static FileName fromLatin1(const QByteArray &filename);
static FileName fromUserInput(const QString &filename);
static FileName fromUtf8(const char *filename, int filenameSize = -1);

View File

@@ -118,7 +118,7 @@ QString UtilsJsExtension::preferredSuffix(const QString &mimetype) const
QString UtilsJsExtension::fileName(const QString &path, const QString &extension) const
{
return Utils::FileName::fromString(path, extension).toString();
return Utils::FileName::fromStringWithExtension(path, extension).toString();
}
QString UtilsJsExtension::mktemp(const QString &pattern) const

View File

@@ -45,7 +45,7 @@ QString CppToolsJsExtension::headerGuard(const QString &in) const
QString CppToolsJsExtension::fileName(const QString &path, const QString &extension) const
{
QString raw = Utils::FileName::fromString(path, extension).toString();
QString raw = Utils::FileName::fromStringWithExtension(path, extension).toString();
CppFileSettings settings;
settings.fromSettings(Core::ICore::settings());
if (!settings.lowerCaseFiles)