forked from qt-creator/qt-creator
FilePath: Fix fromStringWithExtension
Amends a04e1eaf84
Change-Id: I440e8b79d52f0a77ef1ee1aae278c34e815e877a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -911,8 +911,8 @@ FilePath FilePath::fromStringWithExtension(const QString &filepath, const QStrin
|
||||
const QChar dot = QLatin1Char('.');
|
||||
if (!rc.fileName().contains(dot)) {
|
||||
if (!defaultExtension.startsWith(dot))
|
||||
rc.stringAppended(dot);
|
||||
rc.stringAppended(defaultExtension);
|
||||
rc = rc.stringAppended(dot);
|
||||
rc = rc.stringAppended(defaultExtension);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user