forked from qt-creator/qt-creator
Utils: Replace FileName::FileName(QFileInfo) by a named constructor
More consistent with the fromString case and avoiding false conversions QString -> QFileInfo -> FileName in case the inheritance of QString suddenly disappears. Change-Id: Ib14646ab1a660fd45dd1ea6862a0b5faa52ad0e3 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -641,9 +641,9 @@ FileName::FileName()
|
||||
}
|
||||
|
||||
/// Constructs a FileName from \a info
|
||||
FileName::FileName(const QFileInfo &info)
|
||||
: QString(info.absoluteFilePath())
|
||||
FileName FileName::fromFileInfo(const QFileInfo &info)
|
||||
{
|
||||
return FileName::fromString(info.absoluteFilePath());
|
||||
}
|
||||
|
||||
/// \returns a QFileInfo
|
||||
|
||||
Reference in New Issue
Block a user