Bug 182993 - filewatcher does not understand file change
Summary: filewatcher does not understand file change
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-misc (show other bugs)
Version: unspecified
Platform: Gentoo Packages Unspecified
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2009-02-03 13:57 UTC by manolis
Modified: 2009-05-06 01:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description manolis 2009-02-03 13:57:45 UTC
Version:           4.2.0 (using KDE 4.2.0)
Installed from:    Gentoo Packages

Here is the thing.
I have configured the FileWatcher widget to show 
my /var/log/everything/current file.
It shows fine.
The thing is that the file every night is backed up to a file name /var/log/everything/log-xx-xx-xx-xx:xx:xx
and a new "current" file is created.
Obviously this does not trigger the signal "fileChanged()" or something , so the widget stays locked to the old fileID aka /var/log/everything/log-xx-xx-xx.... wich doesn't update anymore and not "current" wich is a new file now.
Opening config and pressing OK , bounds the fileWatcher with the new "current" file and starts update again.
Comment 1 Ruchir Brahmbhatt 2009-05-05 11:52:32 UTC
I could reproduce the bug. I followed following steps:
1. Created text file filewatcher in my home directory.
2. Added filewatcher and configured it to watch my created file.
3. I changed content of file which reflected fine in the filewatcher widget.
4. Renamed my file filewatcher to filewatcher.1.
5. Created new file with name filewatcher.

Expected result:
The widget should start showing the content when file is found again.

Actual result:
It doesn't show file content if file is created again.


Additional information:

QT: 4.5.1
kdelibs: r963179
kdebase: r963186
Comment 2 Aaron J. Seigo 2009-05-06 01:38:13 UTC
SVN commit 964089 by aseigo:

watch for files as they come and go and just update, don't recreate all the objects as the file changes.
BUG:182993


 M  +42 -25    fileWatcher.cpp  
 M  +5 -3      fileWatcher.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=964089