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

List:       kde-devel
Subject:    Does KDirWatch emit dirty() signal when the current process modify a
From:       "Nicolas Ternisien" <nicolas.ternisien () gmail ! com>
Date:       2007-08-22 7:33:58
Message-ID: ccba71b50708220033n3c80635do340e58b86c2725fe () mail ! gmail ! com
[Download RAW message or body]

Hi all,

Here is my next question of the week :

Does KDirWatch emit dirty() signal when the current process modify a file

In fact, my application uses a KDirWatch to know when files are
modified, and I would like to test it.

In a Unit Test I start my app, then modify the file it's watching
(using QOutputStream and QFile, with flush() and close(), to be sure
lines are correctly written), and then use the QTest::qWait(100000),
to let my app have time to take care of the modification.

Unfortunately, this does not work. However, if I start the unit test
and during the qWait() I'm using an external

echo "Test" >> files

the signal is correctly emitted !

So, it seems that the KDirWatch does not detect modification from the
current process... Am I right ?

If this is the case, do you know a way to control a file modification
using an external process, but still controlled from the unit test.
(I've already tried QProcess try...)

Thank you again !

Nicolas Ternisien
 
>> 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