Bug 67877

Summary: compile file command compiles the last saved file, not the currently viewed one
Product: [Applications] kdevelop Reporter: nick smethurst <nick.smethurst>
Component: Build tools: AutomakeAssignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED FIXED    
Severity: normal CC: holger-kde, readme1112000
Priority: NOR    
Version: 3.0.0b1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description nick smethurst 2003-11-11 13:22:51 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    Mandrake RPMs
Compiler:          gcc 3.3.1 
OS:          Linux

Whilst working on a project with more than one file open, the "compile file" command compiles the last saved file and not the one in current focus.
Comment 1 nick smethurst 2003-11-11 13:24:11 UTC
This is KDevelop 3.0Beta1 compiled from sources, *not* mandrake RPMs!
Comment 2 Amilcar do Carmo Lucas 2003-11-11 13:35:34 UTC
Wich Build Tool GUI?
-Autotools
-QMake
-Custom
-Generic
-Ant
-Pascal
-Haskell
?
Comment 3 nick smethurst 2003-11-11 13:41:39 UTC
KDE Autoconf project, IDEA GUI mode (with Kate editor)
Comment 4 nick smethurst 2003-11-11 13:56:49 UTC
Some more information:

When saving a cpp file then clicking the tab of another, the 'Compile file' command compiles the previously saved file instead of the currently focussed one.

When saving a cpp file then clicking the tab of another and modifying the file, the 'Compile file' command compiles the currently focussed file (thus it works correctly). This is presumably because it autosaves the file first.

Thus if one has a set of files like:

base.h
base.cpp
derived.h
derived.cpp

where derived.cpp is dependant on base.h, if base.h is modified (and possibly saved) and then the derived.cpp file tab is clicked, a subsequent 'Compile file' command will compile base.cpp and not derived.cpp.

Comment 5 Jens Dagerbo 2003-11-11 20:17:07 UTC
Confirmed
Comment 6 Jens Dagerbo 2003-11-11 20:29:02 UTC
KMDI-IDEAl related, somehow. The partcontroller doesn't know the "active part" has changed.
Comment 7 Jens Dagerbo 2003-11-12 01:49:52 UTC
Fixed by jowenn in CVS. 

I don't know if the fix is yet in place for 3.1/3.0, but CVS HEAD now works for most of the GUI modes (top level is still broken)
Comment 8 Jens Dagerbo 2003-11-12 15:43:36 UTC
*** Bug 68002 has been marked as a duplicate of this bug. ***
Comment 9 Jens Dagerbo 2003-11-13 14:30:24 UTC
*** Bug 68114 has been marked as a duplicate of this bug. ***