summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemwatcher.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-07-28 10:58:46 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-07-28 11:45:59 (GMT)
commit7eba68adc4a7862d9474179592e5c8393a7acdbb (patch)
tree73014cabc8b10f46203844aeb40de574d97032dc /src/corelib/io/qfilesystemwatcher.cpp
parenta20f8dcbeafa34b50ef69d1c5db0f17b09731d2a (diff)
parent3bf3981c7026de9017887d08312391b54fe8afc6 (diff)
downloadQt-7eba68adc4a7862d9474179592e5c8393a7acdbb.zip
Qt-7eba68adc4a7862d9474179592e5c8393a7acdbb.tar.gz
Qt-7eba68adc4a7862d9474179592e5c8393a7acdbb.tar.bz2
Merge commit 'qt/master-stable'
Conflicts: configure.exe src/corelib/io/io.pri src/corelib/io/qfilesystemwatcher.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tools/configure/configureapp.cpp
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher.cpp')
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 8f18df8..883a77a 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -58,6 +58,9 @@
# include "qfilesystemwatcher_inotify_p.h"
# include "qfilesystemwatcher_dnotify_p.h"
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
+# if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+# include "qfilesystemwatcher_fsevents_p.h"
+# endif //MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
# include "qfilesystemwatcher_kqueue_p.h"
#elif defined(Q_OS_SYMBIAN)
# include "qfilesystemwatcher_symbian_p.h"
@@ -245,7 +248,12 @@ QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine()
eng = QDnotifyFileSystemWatcherEngine::create();
return eng;
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
- return QKqueueFileSystemWatcherEngine::create();
+# if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5)
+ return QFSEventsFileSystemWatcherEngine::create();
+ else
+# endif
+ return QKqueueFileSystemWatcherEngine::create();
#elif defined(Q_OS_SYMBIAN)
return new QSymbianFileSystemWatcherEngine;
#else
@@ -380,15 +388,17 @@ void QFileSystemWatcherPrivate::_q_directoryChanged(const QString &path, bool re
\note The act of monitoring files and directories for
modifications consumes system resources. This implies there is a
limit to the number of files and directories your process can
- monitor simultaneously. On Mac OS and all BSD variants, for
+ monitor simultaneously. On Mac OS X 10.4 and all BSD variants, for
example, an open file descriptor is required for each monitored
- file. The system limits the number of open file descriptors to 256
+ file. Some system limits the number of open file descriptors to 256
by default. This means that addPath() and addPaths() will fail if
your process tries to add more than 256 files or directories to
the file system monitor. Also note that your process may have
other file descriptors open in addition to the ones for files
being monitored, and these other open descriptors also count in
- the total.
+ the total. Mac OS X 10.5 and up use a different backend and do not
+ suffer from this issue.
+
\sa QFile, QDir
*/