[Development] QFileSystemWatcher and Recursive Monitoring

d3fault d3faultdotxbe at gmail.com
Sat Jul 21 08:32:00 CEST 2012


If Windows and Linux provide the capabilities, we shouldn't let
specific functionality absent in Mac (or any platform for that matter)
define Qt. I think modifying the addPath methods to include an
optional bool watchRecursively = false as the second parameter is the
correct solution. Any platforms that don't have a suitable solution
can/should use an #ifdef'd out Qt-internal solution (or a QPA default
implementation? something along those lines idk). So as you said you
attempted and failed, the Mac OSX implementation should internally
keep a copy of the dir structure and the public API should remain
cross-platform. The only thing needed is a "this class consumes more
memory/cpu on Mac than on the other platforms". That warning
definitely beats a "oh by the way this public API performs differently
on the Mac" message, creating a nightmare for application developers
wanting to target multiple platforms.

I would compare this to Windows Metro (a specific platform) not
including/allowing OpenGL (analogous to efficient recursive directory
monitoring), and Qt solving this by using ANGLE (platform-specific
workaround).

d3fault



More information about the Development mailing list