diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index a476cd8d892..411dbf777d9 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -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; diff --git a/src/libs/utils/fileutils.h b/src/libs/utils/fileutils.h index aa6310c7601..00278a55a19 100644 --- a/src/libs/utils/fileutils.h +++ b/src/libs/utils/fileutils.h @@ -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); diff --git a/src/plugins/coreplugin/corejsextensions.cpp b/src/plugins/coreplugin/corejsextensions.cpp index 7398d60a944..02e66016407 100644 --- a/src/plugins/coreplugin/corejsextensions.cpp +++ b/src/plugins/coreplugin/corejsextensions.cpp @@ -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 diff --git a/src/plugins/cpptools/cpptoolsjsextension.cpp b/src/plugins/cpptools/cpptoolsjsextension.cpp index d5efc1db6d6..2d3b7f01ea4 100644 --- a/src/plugins/cpptools/cpptoolsjsextension.cpp +++ b/src/plugins/cpptools/cpptoolsjsextension.cpp @@ -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)