diff options
author | hjk <hjk@qt.io> | 2019-03-19 09:01:18 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-03-19 09:05:47 +0000 |
commit | 4f3f73bc3b591ce423d90801e6bbd3febfc049cb (patch) | |
tree | b7fb1cefd3a68bb37c5d56b09a85fe13e1d10230 /src | |
parent | 2a2a2a6ed26d7b1f57a829303b0f9c16375a0b52 (diff) | |
download | qt-creator-4f3f73bc3b591ce423d90801e6bbd3febfc049cb.tar.gz |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/utils/fileutils.cpp | 2 | ||||
-rw-r--r-- | src/libs/utils/fileutils.h | 2 | ||||
-rw-r--r-- | src/plugins/coreplugin/corejsextensions.cpp | 2 | ||||
-rw-r--r-- | src/plugins/cpptools/cpptoolsjsextension.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index a476cd8d89..411dbf777d 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 aa6310c760..00278a55a1 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 7398d60a94..02e6601640 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 d5efc1db6d..2d3b7f01ea 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) |