Version: CVS (11 Sep 2003) (using KDE Devel) Installed from: Compiled sources Compiler: gcc 3.1 OS: Linux Whenever I save a file in KDevelop, a messagebox appears with the text "File modified on disc by another program", but of course it's KDevelop that has modified the file. The first time a file is saved, the message does not appear, it's only on subsequent saves. This has been the case in CVS for at least a week (most recent update was 11 September). It's possible that the bug is in the katepart, not kdevelop. It seems like the program doesn't recognize itself as the changer of the file, so whichever code is supposed to handle that part is probably responsible.
Same here, and as a addition, because i think its related, when one chooses Edit -> Reformat Source the whole contents of the file get deleted, but may be restored with undo.
This is most probaly a KDE HEAD issue
*** Bug 64116 has been marked as a duplicate of this bug. ***
I have the same problem and I compiled KDevelop from CVS HEAD on Sep 12th. It's very annoying, please fix this issue. Appreciate it!
I can confirm that it happens with KDE HEAD: katepart HEAD related, as roberto said in IRC.
Subject: Re: Shows warning "file modified on disc" whenever I save a file On Sunday 14 September 2003 01:58 pm, you wrote: > ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is. > > http://bugs.kde.org/show_bug.cgi?id=64081 > > > > > ------- Additional Comments From mutlaqja@ku.edu 2003-09-14 20:58 ------- > I have the same problem and I compiled KDevelop from CVS HEAD on Sep 12th. > > It's very annoying, please fix this issue. Appreciate it! it seems it only happens with the KAte plugin, with the qeditor plugin it doesnt.... Cheers...
Kate removes the file from the watch list before saving and adds it again afterwards. This is its strategy for trying not to get change notifications for changes it caused itself. In standalone kate, it works. However, there is somebody else watching it at that point (kdevelop/src/partcontroller.cpp line 437) so kdirwatch never actually removes it from the watch list. This means it doesn't get statted on re-adding because it's already there, and there's now a race. Kate removes-writes-adds before FAM gets around to checking, and lo and behold, when it does check, the file has changed. Observe some debug output from gideon immediately following a save: kio (KDirWatch): Added already watched Entry /home/tim/cvs/taskmaster/src/ taskmastermainwidget.h (now 2 clients) [KDirWatch-3] kdevelop (core): MainWindowIDEAl::slotPartJobCompleted() gideon: BookmarksPart::reload() kdevelop (core): dcop emitting savedFile /home/tim/cvs/taskmaster/src/ taskmastermainwidget.h kio (KDirWatch): Processing FAM event (FAMChanged, /home/tim/cvs/taskmaster/src/ taskmastermainwidget.h, Req 3) kio (KDirWatch): KDirWatch-1 emitting dirty /home/tim/cvs/taskmaster/src/ taskmastermainwidget.h kio (KDirWatch): KDirWatch-3 emitting dirty /home/tim/cvs/taskmaster/src/ taskmastermainwidget.h Note how the FAM event comes in *after* the "adding already watched entry". KDirWatch could fix this problem by forcing a recheck of a file's status whenever something adds an already monitored file, just before adding the requestor to the list of interested parties.
Somebody just submited a patch to fix KDirWatch to the kde-devel mailing list
A similar problem is present in Quanta (+ another one caused by the same new katepart feature). I've just sent a mail to the Kate developers about this. Andras
Same problem here :P On another note: Why has the file modified behaviour changed in KDE head? for the worse? In Kate up until a few weeks ago, if a file was modified by another process while you were editing it, a box appeared telling you this and asking you if you want to re-load the modified file. Now, it just puts this red X in the task list, and offers you *no way* to re-load it. All you can do is close it and re-open it, which is a huge PITA when working with large numbers of files. Also, when you go to save a modified file, it says "this file has been modified on disk, do you want ot cancel the save or overwrite". But without being able to re-load or diff, how am I supposed to know what I want to do? My suggestion is to bring back the old file modified behaviour with the reload option. Also add a new option to diff the two files. The diff program could be chosen in a config, or use kdiff, or whatever. Anything so that you can make an intelligent decision as to if you should keep your changes.
This works fine with KDE 3.1 and AFAIK KDE HEAD too. Closing, fell free to reopen if problem presists with KDevelop HEAD and KDE HEAD