config option for KDirWatch method

Josef Weidendorfer Josef.Weidendorfer at gmx.de
Tue Aug 7 19:36:32 BST 2007


Hi,

looks fine. A few comments...

On Tuesday 07 August 2007, Andreas Pakulat wrote:
> ===================================================================
> --- kio/kio/kdirwatch.cpp       (Revision 697240)
> +++ kio/kio/kdirwatch.cpp       (Arbeitskopie)
> @@ -122,6 +122,19 @@
>    m_nfsPollInterval = config.readEntry("NFSPollInterval", 5000);
>    m_PollInterval = config.readEntry("PollInterval", 500);
>  
> +  QString method = config.readEntry("PreferredMethod", "INotify");

Not really important here, but I wonder: does INotify work with NFS?
AFAIK, NFS does not support change notifications (?).
Could it be that we would want to support two simultaneous notifications
methods in the future, one for local, one for remote file systems?
E.g. original FAM server does the right thing for NFS: It contacts the
FAM server on the NFS server, which should work with INotify nowadays.

> +  if (method == "Fam")
> +  {
> +    m_preferredMethod = Fam;
> +  }else if (method == "Poll")

Hmm. Why not use the same term as used in other places in KDirWatch
for this, i.e. "Stat". Perhaps "Poll" is better than "Stat", but it
should be consistent.

> +  {
> +    m_preferredMethod = Poll;

Similar here.

> +  //First try to use the preferred method, if that fails use the usual order:
> +  //inotify,fam,stat
> +  bool entryAdded = false;
> +  if (m_preferredMethod == Fam)
> +  {
> +#if defined(HVE_FAM)

HAVE_FAM ?

Josef




More information about the kde-core-devel mailing list