KDirWatch: request for a small change into the API
Olivier Goffart
ogoffart at kde.org
Fri Jul 27 13:21:06 BST 2007
Le vendredi 27 juillet 2007, Flavio Castelli a écrit :
> Index: kdirwatch.h
> ===================================================================
> --- kdirwatch.h (revision 692764)
> +++ kdirwatch.h (working copy)
> @@ -67,6 +67,13 @@
> Q_OBJECT
>
> public:
> +
> + enum Action { DoNothing = -1,
You probably mean = 0
> + Recursive = 0x001,
> + WatchFiles = 0x002
> + };
The documentation of this enum is missing
> + Q_DECLARE_FLAGS(Actions, Action)
don't forgot also to declare operators for flags.
> +
> /**
> * Constructor.
> *
> @@ -97,8 +104,7 @@
> * @param watchFiles if true, the KDirWatch will also watch files - NOT
> IMPLEMENTED YET
> * @param recursive if true, all sub directories are also watched - NOT
> IMPLEMENTED YET
> */
this doc is obsolete
> - void addDir(const QString& path,
> - bool watchFiles = false, bool recursive = false);
> + void addDir(const QString& path, Actions actions = DoNothing);
>
> /**
> * Adds a file to be watched.
> Index: kdirwatch.cpp
> ===================================================================
> --- kdirwatch.cpp (revision 692764)
> +++ kdirwatch.cpp (working copy)
> @@ -1270,13 +1270,9 @@
> // TODO: add watchFiles/recursive support
> -void KDirWatch::addDir( const QString& _path,
> - bool watchFiles, bool recursive)
> +void KDirWatch::addDir( const QString& _path, Actions actions)
> {
> - if (watchFiles || recursive) {
> - kDebug(7001) << "addDir - recursive/watchFiles not supported yet in
> KDE 3.x" << endl;
> - }
you probably should not remove this warning
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070727/e355c71d/attachment.sig>
More information about the kde-core-devel
mailing list