summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystementry_p.h
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-03-09 15:09:46 +0100
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-03-15 18:18:01 +0100
commit11ae4b70a164ee2d7d9894302b12574773a3e57b (patch)
treedda07540eb26fc93fbfc6c4a0ebe6da4fee74715 /src/corelib/io/qfilesystementry_p.h
parent2f3f3eb0d4d77743c135d95c792f66a4272903f7 (diff)
Fix tst_qfilesystementry in unity build
Previous setup of the test was failing in minimal static build if built using the unity build because of the explicit inclusion of the qtcore source files. By removing them, it surfaced that QFileSystemEntry doesn't export all its necessary symbols for testing. So this patch does that, as well as removing the qtcore sources from the test. It also makes sense to make the test private. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Icdabe32485b7ce4ed6049bcc24918f531406b4bd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystementry_p.h')
-rw-r--r--src/corelib/io/qfilesystementry_p.h46
1 files changed, 22 insertions, 24 deletions
diff --git a/src/corelib/io/qfilesystementry_p.h b/src/corelib/io/qfilesystementry_p.h
index 049223fb91..8b5d506b0b 100644
--- a/src/corelib/io/qfilesystementry_p.h
+++ b/src/corelib/io/qfilesystementry_p.h
@@ -33,36 +33,34 @@ public:
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);
-
- QString filePath() const;
- QString fileName() const;
- QString path() const;
- NativePath nativeFilePath() const;
- QString baseName() const;
- QString completeBaseName() const;
- QString suffix() const;
- QString completeSuffix() const;
- bool isAbsolute() const;
- bool isRelative() const;
- bool isClean() const;
+ Q_AUTOTEST_EXPORT QFileSystemEntry();
+ Q_AUTOTEST_EXPORT explicit QFileSystemEntry(const QString &filePath);
+
+ Q_AUTOTEST_EXPORT QFileSystemEntry(const QString &filePath, FromInternalPath dummy);
+ Q_AUTOTEST_EXPORT QFileSystemEntry(const NativePath &nativeFilePath, FromNativePath dummy);
+ Q_AUTOTEST_EXPORT QFileSystemEntry(const QString &filePath, const NativePath &nativeFilePath);
+
+ Q_AUTOTEST_EXPORT QString filePath() const;
+ Q_AUTOTEST_EXPORT QString fileName() const;
+ Q_AUTOTEST_EXPORT QString path() const;
+ Q_AUTOTEST_EXPORT NativePath nativeFilePath() const;
+ Q_AUTOTEST_EXPORT QString baseName() const;
+ Q_AUTOTEST_EXPORT QString completeBaseName() const;
+ Q_AUTOTEST_EXPORT QString suffix() const;
+ Q_AUTOTEST_EXPORT QString completeSuffix() const;
+ Q_AUTOTEST_EXPORT bool isAbsolute() const;
+ Q_AUTOTEST_EXPORT bool isRelative() const;
+ Q_AUTOTEST_EXPORT bool isClean() const;
#if defined(Q_OS_WIN)
- bool isDriveRoot() const;
+ Q_AUTOTEST_EXPORT bool isDriveRoot() const;
static bool isDriveRootPath(const QString &path);
static QString removeUncOrLongPathPrefix(QString path);
#endif
- bool isRoot() const;
+ Q_AUTOTEST_EXPORT bool isRoot() const;
+
+ Q_AUTOTEST_EXPORT bool isEmpty() const;
- bool isEmpty() const
- {
- return m_filePath.isEmpty() && m_nativeFilePath.isEmpty();
- }
void clear()
{
*this = QFileSystemEntry();