[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KDirWatch
From:       David Faure <faure () kde ! org>
Date:       2004-09-16 14:13:25
Message-ID: 200409161613.25531.faure () kde ! org
[Download RAW message or body]

On Thursday 16 September 2004 16:08, Joris Guisson wrote:
> Hi,
> 
> I'm having some troubles with KDirWatch. I'm working on a program
> which needs to monitor some directories, digging around in the KDE
> docs I found KDirWatch.
> 
> So for each directory I need to monitor, I create a KDirWatch, call
> addDir with the right path, and connect the signals onDirty and
> onDeleted to some slots. The problem is that it only seems to work on
> the first KDirWatch instance I create. Any other instance, just
> doesn't report anything.
> 
> I decided to try a different approach, and only use one instance of
> KDirWatch to monitor all directories. This only works for the first
> directory, it doesn't matter how many directories I add, only the
> first gets monitored.

We create a single KDirWatch for many directories in many places of the code,
that works fine. I suspect you're doing something wrong, but I don't know what.
Can you show the code (which uses a single KDirWatch instance)? You can even
use KDirWatch::self() btw, in order to avoid having to take care of the memory
management of that KDirWatch instance.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic