Changeset 846 for trunk/src/corelib/io/qfilesystemwatcher.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/corelib/io/qfilesystemwatcher.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 250 250 { 251 251 QMutexLocker locker(&mutex); 252 startOver = true; 253 askedToFinish = true; 254 waitCond.wakeAll(); 252 QMutableHashIterator<QString, FileInfo> fit(files); 253 while (fit.hasNext()) { 254 QHash<QString, FileInfo>::iterator x = fit.next(); 255 QString path = x.key(); 256 QFileInfo fi(path); 257 if (!fi.exists()) { 258 fit.remove(); 259 emit fileChanged(path, true); 260 } else if (x.value() != fi) { 261 x.value() = fi; 262 emit fileChanged(path, false); 263 } 264 } 265 QMutableHashIterator<QString, FileInfo> dit(directories); 266 while (dit.hasNext()) { 267 QHash<QString, FileInfo>::iterator x = dit.next(); 268 QString path = x.key(); 269 QFileInfo fi(path); 270 if (!path.endsWith(QLatin1Char('/'))) 271 fi = QFileInfo(path + QLatin1Char('/')); 272 if (!fi.exists()) { 273 dit.remove(); 274 emit directoryChanged(path, true); 275 } else if (x.value() != fi) { 276 fi.refresh(); 277 if (!fi.exists()) { 278 dit.remove(); 279 emit directoryChanged(path, true); 280 } else { 281 x.value() = fi; 282 emit directoryChanged(path, false); 283 } 284 } 285 286 } 255 287 } 256 288 … … 272 304 return eng; 273 305 #elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC) 274 # if 0 && (definedQ_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)306 # if 0 && Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) 275 307 if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) 276 308 return QFSEventsFileSystemWatcherEngine::create(); … … 450 482 /*! 451 483 Destroys the file system watcher. 484 485 486 487 488 452 489 */ 453 490 QFileSystemWatcher::~QFileSystemWatcher()
Note:
See TracChangeset
for help on using the changeset viewer.