summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-05-07 08:51:10 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-05-07 08:55:52 (GMT)
commitdb1254131c8d372e1d47acbaaa7c5c2b2be5b7d7 (patch)
treea1426d3a70e9f55a2581ee8695d7d476be5e440b /src/gui/dialogs
parent175eedd991d321d0902ea0065f9b288c62958a5d (diff)
downloadQt-db1254131c8d372e1d47acbaaa7c5c2b2be5b7d7.zip
Qt-db1254131c8d372e1d47acbaaa7c5c2b2be5b7d7.tar.gz
Qt-db1254131c8d372e1d47acbaaa7c5c2b2be5b7d7.tar.bz2
Fix fetchedRoot test variable to work also in Symbian
RVCT builds cannot seem to be able to deal with data symbols at runtime, so made accessors for fetchedRoot test variable. Also moved it out of QFileInfoGatherer class as there is no need to have it there. Reviewed-by: Janne Koskinen
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfileinfogatherer.cpp15
-rw-r--r--src/gui/dialogs/qfileinfogatherer_p.h3
2 files changed, 13 insertions, 5 deletions
diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp
index 3b279ae..af0506f 100644
--- a/src/gui/dialogs/qfileinfogatherer.cpp
+++ b/src/gui/dialogs/qfileinfogatherer.cpp
@@ -55,7 +55,18 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_FILESYSTEMMODEL
-bool QFileInfoGatherer::fetchedRoot = false;
+#ifdef QT_BUILD_INTERNAL
+static bool fetchedRoot = false;
+Q_AUTOTEST_EXPORT void qt_test_resetFetchedRoot()
+{
+ fetchedRoot = false;
+}
+
+Q_AUTOTEST_EXPORT bool qt_test_isFetchedRoot()
+{
+ return fetchedRoot;
+}
+#endif
/*!
Creates thread
@@ -278,7 +289,7 @@ void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &fil
// List drives
if (path.isEmpty()) {
-#if defined Q_AUTOTEST_EXPORT
+#ifdef QT_BUILD_INTERNAL
fetchedRoot = true;
#endif
QFileInfoList infoList;
diff --git a/src/gui/dialogs/qfileinfogatherer_p.h b/src/gui/dialogs/qfileinfogatherer_p.h
index 5abcd94..8681eb5 100644
--- a/src/gui/dialogs/qfileinfogatherer_p.h
+++ b/src/gui/dialogs/qfileinfogatherer_p.h
@@ -195,9 +195,6 @@ private:
uint userId;
uint groupId;
#endif
-public :
- //for testing purpose
- static bool fetchedRoot;
};
#endif // QT_NO_FILESYSTEMMODEL