From 555a6b5d5d2dd91a0dcf9e3d5fbadd1b31bf80f3 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 26 Sep 2018 08:56:36 +0200 Subject: Modernize the "filesystemwatcher" feature Change-Id: If030b56ad97e047d89d442629262b4839df306d4 Reviewed-by: Edward Welbourne Reviewed-by: Ulf Hermann --- src/corelib/io/io.pri | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'src/corelib/io/io.pri') 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 - } - } } -- cgit v1.2.3