diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-09-30 01:00:19 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-09-30 01:00:19 +0200 |
commit | 07e92611050f78dae93bcd362112efd8efa7b41e (patch) | |
tree | 6951f77a6344436150c4f83f407e09d946f2c6c3 /src/corelib/io | |
parent | 69e68218e5082166d5c4ab1903fbacde00418a1c (diff) | |
parent | caa598c843eb27fd0c645e62723fd2d4e3e12f60 (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/io.pri | 48 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_fsevents.mm | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_fsevents_p.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_inotify.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_inotify_p.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_kqueue.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_kqueue_p.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_p.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_polling.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_polling_p.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_win.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_win_p.h | 4 | ||||
-rw-r--r-- | src/corelib/io/qurl.cpp | 16 |
15 files changed, 40 insertions, 70 deletions
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index d138ab2f00..c6a5407e51 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -38,9 +38,6 @@ HEADERS += \ io/qsettings_p.h \ io/qfsfileengine_p.h \ io/qfsfileengine_iterator_p.h \ - io/qfilesystemwatcher.h \ - io/qfilesystemwatcher_p.h \ - io/qfilesystemwatcher_polling_p.h \ io/qfilesystementry_p.h \ io/qfilesystemengine_p.h \ io/qfilesystemmetadata_p.h \ @@ -79,14 +76,38 @@ SOURCES += \ io/qsettings.cpp \ io/qfsfileengine.cpp \ io/qfsfileengine_iterator.cpp \ - io/qfilesystemwatcher.cpp \ - io/qfilesystemwatcher_polling.cpp \ io/qfilesystementry.cpp \ io/qfilesystemengine.cpp \ io/qfileselector.cpp \ io/qloggingcategory.cpp \ io/qloggingregistry.cpp +qtConfig(filesystemwatcher) { + HEADERS += \ + io/qfilesystemwatcher.h \ + io/qfilesystemwatcher_p.h \ + io/qfilesystemwatcher_polling_p.h + SOURCES += \ + io/qfilesystemwatcher.cpp \ + io/qfilesystemwatcher_polling.cpp + + win32 { + SOURCES += io/qfilesystemwatcher_win.cpp + HEADERS += io/qfilesystemwatcher_win_p.h + } else:macos { + OBJECTIVE_SOURCES += io/qfilesystemwatcher_fsevents.mm + HEADERS += io/qfilesystemwatcher_fsevents_p.h + } else:qtConfig(inotify) { + SOURCES += io/qfilesystemwatcher_inotify.cpp + HEADERS += io/qfilesystemwatcher_inotify_p.h + } else { + freebsd|darwin|openbsd|netbsd { + SOURCES += io/qfilesystemwatcher_kqueue.cpp + HEADERS += io/qfilesystemwatcher_kqueue_p.h + } + } +} + qtConfig(processenvironment) { SOURCES += \ io/qprocess.cpp @@ -103,9 +124,6 @@ qtConfig(processenvironment) { win32 { SOURCES += io/qfsfileengine_win.cpp SOURCES += io/qlockfile_win.cpp - - SOURCES += io/qfilesystemwatcher_win.cpp - HEADERS += io/qfilesystemwatcher_win_p.h SOURCES += io/qfilesystemengine_win.cpp qtConfig(filesystemiterator) { @@ -153,8 +171,6 @@ win32 { OBJECTIVE_SOURCES += io/qprocess_darwin.mm OBJECTIVE_SOURCES += io/qstandardpaths_mac.mm osx { - OBJECTIVE_SOURCES += io/qfilesystemwatcher_fsevents.mm - HEADERS += io/qfilesystemwatcher_fsevents_p.h LIBS += -framework DiskArbitration -framework IOKit } else { LIBS += -framework MobileCoreServices @@ -173,17 +189,5 @@ win32 { io/qstandardpaths_unix.cpp \ io/qstorageinfo_unix.cpp } - - linux|if(qnx:qtConfig(inotify)) { - SOURCES += io/qfilesystemwatcher_inotify.cpp - HEADERS += io/qfilesystemwatcher_inotify_p.h - } - - !nacl { - freebsd-*|mac|darwin-*|openbsd-*|netbsd-*:{ - SOURCES += io/qfilesystemwatcher_kqueue.cpp - HEADERS += io/qfilesystemwatcher_kqueue_p.h - } - } } diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp index ed597c415b..f40e166d9f 100644 --- a/src/corelib/io/qfilesystemwatcher.cpp +++ b/src/corelib/io/qfilesystemwatcher.cpp @@ -40,8 +40,6 @@ #include "qfilesystemwatcher.h" #include "qfilesystemwatcher_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER - #include <qdatetime.h> #include <qdebug.h> #include <qdir.h> @@ -499,5 +497,3 @@ QT_END_NAMESPACE #include "moc_qfilesystemwatcher.cpp" #include "moc_qfilesystemwatcher_p.cpp" -#endif // QT_NO_FILESYSTEMWATCHER - diff --git a/src/corelib/io/qfilesystemwatcher.h b/src/corelib/io/qfilesystemwatcher.h index 057a20672c..cd64115f8f 100644 --- a/src/corelib/io/qfilesystemwatcher.h +++ b/src/corelib/io/qfilesystemwatcher.h @@ -42,7 +42,7 @@ #include <QtCore/qobject.h> -#ifndef QT_NO_FILESYSTEMWATCHER +QT_REQUIRE_CONFIG(filesystemwatcher); QT_BEGIN_NAMESPACE @@ -78,5 +78,4 @@ private: QT_END_NAMESPACE -#endif // QT_NO_FILESYSTEMWATCHER #endif // QFILESYSTEMWATCHER_H diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm index f68fb67d79..f594fad803 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents.mm +++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm @@ -45,8 +45,6 @@ #include "private/qcore_unix_p.h" #include "kernel/qcore_mac_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER - #include <qdebug.h> #include <qdir.h> #include <qfile.h> @@ -585,6 +583,4 @@ bool QFseventsFileSystemWatcherEngine::derefPath(const QString &watchedPath) return false; } -#endif //QT_NO_FILESYSTEMWATCHER - QT_END_NAMESPACE diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h index 1b0b8ae15c..6e8e7d4567 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h +++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h @@ -62,7 +62,7 @@ #include <dispatch/dispatch.h> #include <CoreServices/CoreServices.h> -#ifndef QT_NO_FILESYSTEMWATCHER +QT_REQUIRE_CONFIG(filesystemwatcher); QT_BEGIN_NAMESPACE @@ -150,5 +150,4 @@ private: QT_END_NAMESPACE -#endif //QT_NO_FILESYSTEMWATCHER #endif // QFILESYSTEMWATCHER_FSEVENTS_P_H diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp index c0c5f9d744..3b7135e582 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp @@ -40,8 +40,6 @@ #include "qfilesystemwatcher.h" #include "qfilesystemwatcher_inotify_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER - #include "private/qcore_unix_p.h" #include "private/qsystemerror_p.h" @@ -427,5 +425,3 @@ QString QInotifyFileSystemWatcherEngine::getPathFromID(int id) const QT_END_NAMESPACE #include "moc_qfilesystemwatcher_inotify_p.cpp" - -#endif // QT_NO_FILESYSTEMWATCHER diff --git a/src/corelib/io/qfilesystemwatcher_inotify_p.h b/src/corelib/io/qfilesystemwatcher_inotify_p.h index 0c873466c8..b63729cde4 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify_p.h +++ b/src/corelib/io/qfilesystemwatcher_inotify_p.h @@ -53,7 +53,7 @@ #include "qfilesystemwatcher_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER +QT_REQUIRE_CONFIG(filesystemwatcher); #include <QtCore/qhash.h> #include <QtCore/qmutex.h> @@ -89,5 +89,4 @@ private: QT_END_NAMESPACE -#endif // QT_NO_FILESYSTEMWATCHER #endif // QFILESYSTEMWATCHER_INOTIFY_P_H diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp index c33fba2d1f..423b88cb7f 100644 --- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp +++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp @@ -43,8 +43,6 @@ #include "qfilesystemwatcher_kqueue_p.h" #include "private/qcore_unix_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER - #include <qdebug.h> #include <qfile.h> #include <qsocketnotifier.h> @@ -254,6 +252,4 @@ void QKqueueFileSystemWatcherEngine::readFromKqueue() } } -#endif //QT_NO_FILESYSTEMWATCHER - QT_END_NAMESPACE diff --git a/src/corelib/io/qfilesystemwatcher_kqueue_p.h b/src/corelib/io/qfilesystemwatcher_kqueue_p.h index 9d4b6d1fe6..8e11e4b7da 100644 --- a/src/corelib/io/qfilesystemwatcher_kqueue_p.h +++ b/src/corelib/io/qfilesystemwatcher_kqueue_p.h @@ -59,7 +59,7 @@ #include <QtCore/qvector.h> #include <QtCore/qsocketnotifier.h> -#ifndef QT_NO_FILESYSTEMWATCHER +QT_REQUIRE_CONFIG(filesystemwatcher); struct kevent; QT_BEGIN_NAMESPACE @@ -90,5 +90,4 @@ private: QT_END_NAMESPACE -#endif //QT_NO_FILESYSTEMWATCHER #endif // QFILESYSTEMWATCHER_KQUEUE_P_H diff --git a/src/corelib/io/qfilesystemwatcher_p.h b/src/corelib/io/qfilesystemwatcher_p.h index 4220c1db28..1997ff6c86 100644 --- a/src/corelib/io/qfilesystemwatcher_p.h +++ b/src/corelib/io/qfilesystemwatcher_p.h @@ -53,7 +53,7 @@ #include "qfilesystemwatcher.h" -#ifndef QT_NO_FILESYSTEMWATCHER +QT_REQUIRE_CONFIG(filesystemwatcher); #include <private/qobject_p.h> @@ -120,5 +120,4 @@ private: QT_END_NAMESPACE -#endif // QT_NO_FILESYSTEMWATCHER #endif // QFILESYSTEMWATCHER_P_H diff --git a/src/corelib/io/qfilesystemwatcher_polling.cpp b/src/corelib/io/qfilesystemwatcher_polling.cpp index 5bef8127f7..903c15f4a9 100644 --- a/src/corelib/io/qfilesystemwatcher_polling.cpp +++ b/src/corelib/io/qfilesystemwatcher_polling.cpp @@ -40,8 +40,6 @@ #include "qfilesystemwatcher_polling_p.h" #include <QtCore/qtimer.h> -#ifndef QT_NO_FILESYSTEMWATCHER - QT_BEGIN_NAMESPACE QPollingFileSystemWatcherEngine::QPollingFileSystemWatcherEngine(QObject *parent) @@ -153,5 +151,3 @@ void QPollingFileSystemWatcherEngine::timeout() QT_END_NAMESPACE #include "moc_qfilesystemwatcher_polling_p.cpp" - -#endif // !QT_NO_FILESYSTEMWATCHER diff --git a/src/corelib/io/qfilesystemwatcher_polling_p.h b/src/corelib/io/qfilesystemwatcher_polling_p.h index 4c46633fdf..e60132381b 100644 --- a/src/corelib/io/qfilesystemwatcher_polling_p.h +++ b/src/corelib/io/qfilesystemwatcher_polling_p.h @@ -60,7 +60,7 @@ #include "qfilesystemwatcher_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER +QT_REQUIRE_CONFIG(filesystemwatcher); QT_BEGIN_NAMESPACE enum { PollingInterval = 1000 }; @@ -121,6 +121,5 @@ private: }; QT_END_NAMESPACE -#endif // !QT_NO_FILESYSTEMWATCHER #endif // QFILESYSTEMWATCHER_POLLING_P_H diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp index 91d0f7a228..66985f8982 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -40,8 +40,6 @@ #include "qfilesystemwatcher.h" #include "qfilesystemwatcher_win_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER - #include <qdebug.h> #include <qfileinfo.h> #include <qstringlist.h> @@ -760,5 +758,3 @@ QT_END_NAMESPACE #ifndef Q_OS_WINRT # include "qfilesystemwatcher_win.moc" #endif - -#endif // QT_NO_FILESYSTEMWATCHER diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h index 8322fc170a..1d3224614c 100644 --- a/src/corelib/io/qfilesystemwatcher_win_p.h +++ b/src/corelib/io/qfilesystemwatcher_win_p.h @@ -53,8 +53,6 @@ #include "qfilesystemwatcher_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER - #include <QtCore/qdatetime.h> #include <QtCore/qthread.h> #include <QtCore/qfile.h> @@ -175,6 +173,4 @@ Q_SIGNALS: QT_END_NAMESPACE -#endif // QT_NO_FILESYSTEMWATCHER - #endif // QFILESYSTEMWATCHER_WIN_P_H diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index e531505877..15785b48e0 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3726,37 +3726,37 @@ bool QUrl::matches(const QUrl &url, FormattingOptions options) const if (isLocalFile()) mask &= ~QUrlPrivate::Host; - if (options & QUrl::RemoveScheme) + if (options.testFlag(QUrl::RemoveScheme)) mask &= ~QUrlPrivate::Scheme; else if (d->scheme != url.d->scheme) return false; - if (options & QUrl::RemovePassword) + if (options.testFlag(QUrl::RemovePassword)) mask &= ~QUrlPrivate::Password; else if (d->password != url.d->password) return false; - if (options & QUrl::RemoveUserInfo) + if (options.testFlag(QUrl::RemoveUserInfo)) mask &= ~QUrlPrivate::UserName; else if (d->userName != url.d->userName) return false; - if (options & QUrl::RemovePort) + if (options.testFlag(QUrl::RemovePort)) mask &= ~QUrlPrivate::Port; else if (d->port != url.d->port) return false; - if (options & QUrl::RemoveAuthority) + if (options.testFlag(QUrl::RemoveAuthority)) mask &= ~QUrlPrivate::Host; else if (d->host != url.d->host) return false; - if (options & QUrl::RemoveQuery) + if (options.testFlag(QUrl::RemoveQuery)) mask &= ~QUrlPrivate::Query; else if (d->query != url.d->query) return false; - if (options & QUrl::RemoveFragment) + if (options.testFlag(QUrl::RemoveFragment)) mask &= ~QUrlPrivate::Fragment; else if (d->fragment != url.d->fragment) return false; @@ -3764,7 +3764,7 @@ bool QUrl::matches(const QUrl &url, FormattingOptions options) const if ((d->sectionIsPresent & mask) != (url.d->sectionIsPresent & mask)) return false; - if (options & QUrl::RemovePath) + if (options.testFlag(QUrl::RemovePath)) return true; // Compare paths, after applying path-related options |