diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-11-12 09:49:13 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:24:43 (GMT) |
commit | 84c3b3e32612149d128d5288aebdf27badb8d43c (patch) | |
tree | 055d676266afc6393da83d8944feca1ede8aa145 /src/corelib/io/qfilesystemwatcher.cpp | |
parent | 62cfd18376a52b99516451e9dcaee6d123091b89 (diff) | |
download | Qt-84c3b3e32612149d128d5288aebdf27badb8d43c.zip Qt-84c3b3e32612149d128d5288aebdf27badb8d43c.tar.gz Qt-84c3b3e32612149d128d5288aebdf27badb8d43c.tar.bz2 |
QFileSystemWatcher: Do not require QApplication in the destructor.
QThread::quit() is threadsafe, and can safely (and should) be called
from the parent thread.
Using invokeMethod requires an instance of QCoreApplication. There
is no reason we should depend on that.
Task-number: QTBUG-15255
Task-number: QT-3305
Reviewed-by: Denis
Reviewed-by: Brad
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp index 34eff75..9739067 100644 --- a/src/corelib/io/qfilesystemwatcher.cpp +++ b/src/corelib/io/qfilesystemwatcher.cpp @@ -198,7 +198,7 @@ QStringList QPollingFileSystemWatcherEngine::removePaths(const QStringList &path void QPollingFileSystemWatcherEngine::stop() { - QMetaObject::invokeMethod(this, "quit"); + quit(); } void QPollingFileSystemWatcherEngine::timeout() @@ -432,11 +432,6 @@ QFileSystemWatcher::QFileSystemWatcher(const QStringList &paths, QObject *parent /*! Destroys the file system watcher. - - \note To avoid deadlocks on shutdown, all instances of QFileSystemWatcher - need to be destroyed before QCoreApplication. Note that passing - QCoreApplication::instance() as the parent object when creating - QFileSystemWatcher is not sufficient. */ QFileSystemWatcher::~QFileSystemWatcher() { |