Bug 360854

Summary: Wrong file opened when double clicking on CMake error in outputview
Product: [Applications] kdevelop Reporter: Alex Richardson <arichardson.kde>
Component: Output ViewsAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: normal CC: kfunk
Priority: NOR Keywords: junior-jobs
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alex Richardson 2016-03-22 14:42:40 UTC
I discovered that some CMake errors would just open an empty editor whenever I double clicked on it. It turns out that this happens whenever the error is reported with a relative path because this path is interpreted relative to the build dir and not the source dir:

CMake Error at foo/bar/CMakeLists.txt:27 (target_link_librariess):
  Unknown CMake command "target_link_librariess".

This will open foo/bar/CMakeLists.txt in the build dir which doesn't exist so I get an empty editor instead.

Should be an easy fix but I couldn't find the outputview file opening code in a quick search.

Reproducible: Always
Comment 1 Kevin Funk 2016-03-22 14:58:25 UTC
It's handled in `OutputModel::activate`. We have a bug report about this issue already, if I'm not mistaken.

Nevertheless: We should never open non-existing files when clicking lines in the outputview, that's indeed an issue.
Comment 2 Kevin Funk 2016-03-22 15:02:18 UTC
Ah, related to https://bugs.kde.org/show_bug.cgi?id=321982.

Though this one is about "not opening the correct file", which is basically just a WONTFIX in CMake land. The error output of CMake is just too vague -- no full paths, etc...
Comment 3 Kevin Funk 2017-01-16 18:18:54 UTC

*** This bug has been marked as a duplicate of bug 321982 ***