KDirWatch vs QFileSystemWatcher

Kevin Ottens ervin at kde.org
Fri Oct 25 07:25:51 UTC 2013


On Thursday 24 October 2013 21:54:42 Sune Vuorela wrote:
> Hi
> 
> If your KDirWatch backend is QFileSystemWatcher, one of the testcases
> fails.
> 
> The last QVERIFY in testMoveTo never receives the signal dirty-signal it
> is looking for.
> 
> Apparantly, the watch.removeFile apparantly somehow turns off the QFSW
> to not do any further notifications for what happens in the directory
> that it also is supposed to be watching.
> 
> I haven't yet fully understood what's going on here, but if someone is
> up for it, fixing it would be nice. Among others, it is the only backend
> available on windows.
> 
> This dirty patch seems to ensure that QFSW is used on your platform:
> 
> diff --git a/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp
> b/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp index 2a89372..8bc9d9b 100644
> --- a/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp
> +++ b/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp
> @@ -103,12 +103,7 @@ static KDirWatch::Method methodFromString(const QString
> &method) { } else if (method == QLatin1String("QFSWatch")) {
>      return KDirWatch::QFSWatch;
>    } else {
> -#ifdef Q_OS_LINUX
> -    // inotify supports delete+recreate+modify, which QFSWatch doesn't
> support -    return KDirWatch::INotify;
> -#else
>      return KDirWatch::QFSWatch;
> -#endif
>    }
>  }
> 
> 
> Anyone looking into it would be nice.

Please add that as a task on the cleanups page of the wiki if you don't plan 
to work on it. Here it'll likely be lost at some point.

Cheers!
-- 
Kévin Ottens, http://ervin.ipsquad.net

Sponsored by KDAB to work on KDE Frameworks
KDAB - proud supporter of KDE, http://www.kdab.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131025/b92bc706/attachment.sig>


More information about the Kde-frameworks-devel mailing list