summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemwatcher.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-11-12 09:49:13 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-22 14:09:07 (GMT)
commit9036fe3d2ffabde9b49ced0ba8835d8403b11ff4 (patch)
treed972f72c37b2c3ae7a5f8d0a0e104b208a9c7c61 /src/corelib/io/qfilesystemwatcher.cpp
parent39f2dc87dbec95934cb4596c46f8b17994048de2 (diff)
downloadQt-9036fe3d2ffabde9b49ced0ba8835d8403b11ff4.zip
Qt-9036fe3d2ffabde9b49ced0ba8835d8403b11ff4.tar.gz
Qt-9036fe3d2ffabde9b49ced0ba8835d8403b11ff4.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.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 18c3c9f..3a7d795 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()
@@ -426,11 +426,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()
{