Summary: | Clicking on cmake error line does not open the corresponding file | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Kevin Funk <kfunk> |
Component: | Output Views | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arichardson.kde, aspotashev, axel.kellermann, eugene.shalygin+bugzilla.kde, mvolden2, peje66, simonandric5, tmn |
Priority: | NOR | Keywords: | junior-jobs |
Version: | 4.5.60 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.2.0 | |
Sentry Crash Report: |
Description
Kevin Funk
2013-07-05 09:32:16 UTC
Someone just needs to add the proper filter to kdevplatform/outputview/outputfilteringstrategies.cpp or let it be supplied by the cmake plugin. @Morten: Could you please elaborate what CompilerFilterStrategy::errorInLine is supposed to do? I'm especially puzzled about this part of that method's body: if( curErrFilter.compiler == "cmake" ) { // Unfortunately we cannot know if an error or an action comes first in cmake, and therefore we need to do this if( d->m_currentDirs.empty() ) { d->putDirAtEnd( d->m_buildDir.upUrl().toLocalFile() ); } } item.url = d->urlForFile( regEx.cap( curErrFilter.fileGroup ) ); What is upUrl() doing in there? Are you assuming that the build folder always resides in the source directory? Could you have a look please? Hi Kevin First, I must apologise for not replying before now ( still haven't been able to replace my broken PC ). Looking at it I think your point is valid. The source dir is not necessarily the parent dir of the build dir. But frankly I'm a little uncertain about what to do about it - since the source dir could, in theory, be located anywhere. Any suggestions are welcome. Regards Morten fredag den 19. juli 2013 skrev Kevin Funk : > https://bugs.kde.org/show_bug.cgi?id=321982 > > --- Comment #2 from Kevin Funk <kevin@kfunk.org <javascript:;>> --- > @Morten: Could you please elaborate what > CompilerFilterStrategy::errorInLine is > supposed to do? > > I'm especially puzzled about this part of that method's body: > > if( curErrFilter.compiler == "cmake" ) { // Unfortunately > we > cannot know if an error or an action comes first in cmake, and therefore we > need to do this > if( d->m_currentDirs.empty() ) { > d->putDirAtEnd( > d->m_buildDir.upUrl().toLocalFile() ); > } > } > item.url = d->urlForFile( regEx.cap( > curErrFilter.fileGroup ) > ); > > What is upUrl() doing in there? Are you assuming that the build folder > always > resides in the source directory? Could you have a look please? > > -- > You are receiving this mail because: > You are on the CC list for the bug. > Patch progress/discussion: https://git.reviewboard.kde.org/r/115506/ *** Bug 360854 has been marked as a duplicate of this bug. *** *** Bug 342800 has been marked as a duplicate of this bug. *** *** Bug 376571 has been marked as a duplicate of this bug. *** I had a look at this issue and the solution proposed before. I think the easiest and least invasive way to fix this is to just filter the project directory out of the cmake output. The code change is minimal and just a couple of lines long. I also tried to cover Windows paths in the regex, but I don't have a system to test this properly. For my patch proposal see: https://phabricator.kde.org/D7040 Differential https://phabricator.kde.org/D7040 has been submitted to master branch So we consider this fixed? Closing then. Please reopen if it's not fixed. |