KDirWatch emitting dirty signal many times for one change
Josef Weidendorfer
Josef.Weidendorfer at gmx.de
Thu Apr 15 01:51:39 BST 2004
On Wednesday 14 April 2004 23:45, David Faure wrote:
> On Wednesday 14 April 2004 23:39, Josef Weidendorfer wrote:
> > Ah, I meant this signal, not KDirLister. I think that KDirWatch in fact
> > should be the responsible to forward file changes which are done by GUI
> > actions like this Rename DCOP signal.
>
> I disagree. The KDirNotify DCOP interface is much more high-level - it's
> even network-enabled (KURL), which KDirWatch obviously isn't.
> Routing that information via KDirWatch is moving code around for no gain,
> and mixing high-level and low-level stuff.
You are right.
But if KDirWatch is low-level and only for local files and mounts, we should
only use it in the KIO file-protocol implementation, provide a notification
mechanism in the KIO interface, and KDirNotify should be hidden below KIO,
too. Then for KDE applications, there would be only one, network-enabled
mechanism for change notifications (I suppose that currently, each use of
KDirWatch in network-enabled KDE apps is a special-case handling for the file
protocol).
The way (for KDE4?) would be that a ListJob can be potentially indefinitly
long, signalling file changes/creations/deletings/renamings while it's
running (Perhaps there should be an additional signal that normal directory
listing has finished). Aborting this job would mean that autonotification is
stopped.
The current KIO implementation does most of the things by routing to KIO
slaves, but we could put change notifications for the file-protocol directly
below the KIO functions. This way, the KIO slave protocol isn't touched at
all.
> KDirWatch is the layer that's just above the filesystem, KDirNotify is
> the (KIO/DCOP only) notification of an operation that happened
> in KDE (which is the only way to refresh FTP views properly, etc.)
> The fact that it acts as a workaround for missing rename() notification
> from KDirWatch is only an added bonus; the main point is that it's network
> transparent.
Does this mean that I can use the KDirNotify DCOP interface to signal file
changes from a KIO slave? Or is KDirNotify only triggered by GUI actions?
Josef
More information about the kde-core-devel
mailing list