Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/corelib/io/qfilesystemwatcher.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    250250{
    251251    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    }
    255287}
    256288
     
    272304    return eng;
    273305#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
    274 #  if 0 && (defined Q_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)
    275307    if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5)
    276308        return QFSEventsFileSystemWatcherEngine::create();
     
    450482/*!
    451483    Destroys the file system watcher.
     484
     485
     486
     487
     488
    452489*/
    453490QFileSystemWatcher::~QFileSystemWatcher()
Note: See TracChangeset for help on using the changeset viewer.