forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user