Bug 56960

Summary: clicking a compile error tries to open document in wrong directory
Product: [Applications] kdevelop Reporter: Jay <joerg>
Component: generalAssignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: makewidget.cpp.diff

Description Jay 2003-04-07 19:19:04 UTC
Version:           3.0.0a4 (using KDE 3.1.1)
Installed from:    Gentoo
Compiler:          gcc version 3.2.2
OS:          Linux (i686) release 2.4.20-gentoo-r2

my project dircetory is

/blah/projects/project/

my src file is
/blah/projects/project/source/file.cpp

when there is a compile in error in file.cpp and I click it, gideon tries to open the file in

/blah/projects/source/file.cpp (leaving the project dir out).

Custom Project here
Comment 1 Harald Fernengel 2003-04-08 00:59:58 UTC
Should be fixed in CVS, can you confirm that? 
Comment 2 Jay 2003-04-08 14:13:19 UTC
Subject: Re:  clicking a compile error tries to open document in wrong directory

Nope, sorry. Still not working here.

Am Dienstag, 8. April 2003 00:59 schrieben Sie:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=56960
>
>
>
>
> ------- Additional Comments From harry@kdevelop.org  2003-04-08 00:59
> ------- Should be fixed in CVS, can you confirm that?

Comment 3 Jay 2003-04-08 14:17:38 UTC
Subject: Re:  clicking a compile error tries to open document in wrong directory

Here my project structure again:

/home/me/projects/project/linux
/home/me/projects/project/source
/home/me/projects/project/program

It's a customproject. The Makefile and Gideon's project file are in /linux.

The project directory is set relative to ../ which comes out to 
/home/me/projects/project/

I had to set the "Run the build tool in the following directory" option to the 
absolute path:

/home/me/projects/project/linux

otherwise it wouldn't find the Makefile.

Hope that helps.
J
Comment 4 Jay 2003-04-11 13:32:22 UTC
I recompiled yesterday and now nothing happens when I cklick compile errors. Also 
nothing happens when I click a line in the valgrind output ( which warped me to the 
right location sometime ago ) 
Comment 5 Harald Fernengel 2003-04-15 21:27:34 UTC
Okay, there's a new solution in CVS that should handle relative paths, recoursive builds 
and builds with srcdir != builddir. Please try again :) 
Comment 6 Jay 2003-04-16 03:12:28 UTC
Subject: Re:  clicking a compile error tries to open document in wrong directory

Nearly got it. Now, you just have to take into consideration the: 

"Project Options -> Build Options -> Run the build tool in the following 
directory" option as starting path, instead of the project directory.

Comment 7 Jay 2003-04-29 01:36:26 UTC
Subject: Re:  clicking a compile error tries to open document in wrong directory

Attached patch fixes it for me(TM).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+rbs89+37qIEeCRARAmcyAJ9TVWiju37G3fyzbVfqfb5LtxoMzwCeOe3D
tV4B3VrC9xqnkz3azkXkV7s=
=g7Sf
-----END PGP SIGNATURE-----


Created an attachment (id=1454)
makewidget.cpp.diff
Comment 8 Amilcar do Carmo Lucas 2003-05-12 13:56:21 UTC
Subject: kdevelop/parts/outputviews

CVS commit by aclu: 

Patch by: J
Comment 9 Jens Dagerbo 2003-05-12 14:36:56 UTC
This feature still doesn't cover all cases, unfortunately. :( 
 
In some cases, despite the efforts made, no path is found at all, so 
editDocument() gets called with nothing but a filename, which in turn leads to it 
opening the first matching file by that name. 
 
It looks like we'll have to compare inodes, or something, to figure out the 
correct path in this case. 
Comment 10 Harald Fernengel 2003-05-13 21:13:37 UTC
Fixed again in CVS (hopefully this time for good).