Bug 360854 - Wrong file opened when double clicking on CMake error in outputview
Summary: Wrong file opened when double clicking on CMake error in outputview
Status: RESOLVED DUPLICATE of bug 321982
Alias: None
Product: kdevelop
Classification: Applications
Component: Output Views (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2016-03-22 14:42 UTC by Alex Richardson
Modified: 2017-01-16 18:18 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 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 ***