p.truncate(p.length() - 1);
}
- dirEntry = QFileSystemEntry(p, QFileSystemEntry::FromInternalPath());
+ dirEntry = QFileSystemEntry(p);
metaData.clear();
initFileEngine();
clearFileLists();
absoluteName = fileEngine->fileName(QAbstractFileEngine::AbsoluteName);
}
- absoluteDirEntry = QFileSystemEntry(QDir::cleanPath(absoluteName), QFileSystemEntry::FromInternalPath());
+ absoluteDirEntry = QFileSystemEntry(QDir::cleanPath(absoluteName));
}
/* For sorting */
/*!
\internal
- Use this constructor when the path is guaranteed to be in internal format, i.e. all
- directory separators are '/' and not the native separator.
- */
-QFileSystemEntry::QFileSystemEntry(const QString &filePath, FromInternalPath /* dummy */)
- : m_filePath(filePath),
- m_lastSeparator(-2),
- m_firstDotInFileName(-2),
- m_lastDotInFileName(0)
-{
- resolveFilePath();
- resolveNativeFilePath();
- findLastSeparator();
- findFileNameSeparators();
-}
-
-/*!
- \internal
Use this constructor when the path comes from a native API
*/
QFileSystemEntry::QFileSystemEntry(const NativePath &nativeFilePath, FromNativePath /* dummy */)
public:
typedef QByteArray NativePath;
struct FromNativePath{};
- struct FromInternalPath{};
QFileSystemEntry();
explicit QFileSystemEntry(const QString &filePath);
-
- QFileSystemEntry(const QString &filePath, FromInternalPath dummy);
- QFileSystemEntry(const NativePath &nativeFilePath, FromNativePath dummy);
- QFileSystemEntry(const QString &filePath, const NativePath &nativeFilePath);
+ explicit QFileSystemEntry(const NativePath &nativeFilePath, FromNativePath dummy);
+ explicit QFileSystemEntry(const QString &filePath, const NativePath &nativeFilePath);
QString filePath() const;
QString fileName() const;
qfilename.append(QLatin1String(".XXXXXX"));
// "Nativify" :-)
- QFileSystemEntry::NativePath filename = QFileSystemEngine::absoluteName(
- QFileSystemEntry(qfilename, QFileSystemEntry::FromInternalPath()))
- .nativeFilePath();
+ QFileSystemEntry::NativePath filename =
+ QFileSystemEngine::absoluteName(QFileSystemEntry(qfilename)).nativeFilePath();
// Find mask in native path
phPos = filename.length();