Commit fc73e6e67b4048a7fa79d041ee609bea508aff07
- Diff rendering mode:
- inline
- side by side
src/corelib/io/qfilesystemwatcher.cpp
(1 / 1)
|   | |||
| 248 | 248 | eng = QDnotifyFileSystemWatcherEngine::create(); | |
| 249 | 249 | return eng; | |
| 250 | 250 | #elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC) | |
| 251 | # if 0 && (defined Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) | ||
| 251 | # if defined(Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) | ||
| 252 | 252 | if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) | |
| 253 | 253 | return QFSEventsFileSystemWatcherEngine::create(); | |
| 254 | 254 | else |
src/corelib/io/qfilesystemwatcher_fsevents.cpp
(5 / 5)
|   | |||
| 94 | 94 | { | |
| 95 | 95 | PathInfoList &list = pathHash[key]; | |
| 96 | 96 | list.push_back(PathInfo(path, | |
| 97 | fileInfo.absoluteFilePath().normalized(QString::NormalizationForm_D).toUtf8())); | ||
| 97 | fileInfo.canonicalFilePath().normalized(QString::NormalizationForm_D).toUtf8())); | ||
| 98 | 98 | pathHash.insert(key, list); | |
| 99 | 99 | } | |
| 100 | 100 | ||
| … | … | ||
| 206 | 206 | } else { | |
| 207 | 207 | directories->append(path); | |
| 208 | 208 | // Full file path for dirs. | |
| 209 | QCFString cfpath(createFSStreamPath(fileInfo.absoluteFilePath())); | ||
| 209 | QCFString cfpath(createFSStreamPath(fileInfo.canonicalFilePath())); | ||
| 210 | 210 | addPathToHash(dirPathInfoHash, cfpath, fileInfo, path); | |
| 211 | 211 | CFArrayAppendValue(tmpArray, cfpath); | |
| 212 | 212 | } | |
| … | … | ||
| 216 | 216 | continue; | |
| 217 | 217 | } else { | |
| 218 | 218 | // Just the absolute path (minus it's filename) for files. | |
| 219 | QCFString cfpath(createFSStreamPath(fileInfo.absolutePath())); | ||
| 219 | QCFString cfpath(createFSStreamPath(fileInfo.canonicalPath())); | ||
| 220 | 220 | files->append(path); | |
| 221 | 221 | addPathToHash(filePathInfoHash, cfpath, fileInfo, path); | |
| 222 | 222 | CFArrayAppendValue(tmpArray, cfpath); | |
| … | … | ||
| 293 | 293 | itemCount = CFArrayGetCount(tmpArray); | |
| 294 | 294 | const QString &path = paths.at(i); | |
| 295 | 295 | QFileInfo fi(path); | |
| 296 | QCFString cfpath(createFSStreamPath(fi.absolutePath())); | ||
| 296 | QCFString cfpath(createFSStreamPath(fi.canonicalPath())); | ||
| 297 | 297 | ||
| 298 | 298 | CFIndex index = CFArrayGetFirstIndexOfValue(tmpArray, CFRangeMake(0, itemCount), cfpath); | |
| 299 | 299 | if (index != -1) { | |
| … | … | ||
| 302 | 302 | removePathFromHash(filePathInfoHash, cfpath, path); | |
| 303 | 303 | } else { | |
| 304 | 304 | // Could be a directory we are watching instead. | |
| 305 | QCFString cfdirpath(createFSStreamPath(fi.absoluteFilePath())); | ||
| 305 | QCFString cfdirpath(createFSStreamPath(fi.canonicalFilePath())); | ||
| 306 | 306 | index = CFArrayGetFirstIndexOfValue(tmpArray, CFRangeMake(0, itemCount), cfdirpath); | |
| 307 | 307 | if (index != -1) { | |
| 308 | 308 | CFArrayRemoveValueAtIndex(tmpArray, index); |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

