So how about something like this (others have suggested something along these 
lines):

In order to work recursively, the file-system watcher class will require the 
user to implement a sort of snapshotting "backend" which will be 
interfaced/used for FS change comparisons. And only as a "bonus", the class 
will also offer a default such backend on applicable OSs (i.e. all except 
Mac<=Snow Leopard, which in fact don't even need any snapshotting at all).

I think this wins because first off, it makes things nice & easy for 
applications that DO involve FS snapshotting /anyway/ (which is possibly 70% of 
all use-cases that need recursive monitoring in the first place) you could 
simply interface your application's snapshotting functionalities straight into 
Qt's filesystem monitor! This is interesting for ALL OSs even those that 
already offer granular file change details.
And at the same time, it's very clear to users of this class that recursive 
monitoring must have snapshotting - unless a default is kindly provided by Qt 
BUT not on all OSs.

So in other words the question is:
Is it acceptable for Qt to say "Hey look; to use my QFoo facilities, you must 
implement <bar> on your end and plug it in to QFoo. Y'know - most use-cases 
QFoo was designed for have implemented a <bar> of their own anyway. But just 
because I'm so nice, I'll offer you a default <bar> implementation wherever I 
can" ?
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to