Bug 283722 - build view can not handle spaces in path
Summary: build view can not handle spaces in path
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Output Views (show other bugs)
Version: git master
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-10 17:18 UTC by Bernd Buschinski
Modified: 2011-10-15 22:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
quick fix, may be wrong (695 bytes, patch)
2011-10-10 17:18 UTC, Bernd Buschinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Buschinski 2011-10-10 17:18:57 UTC
Created attachment 64392 [details]
quick fix, may be wrong

Version:           git master (using KDE 4.7.1) 
OS:                Linux

if you compile your c++ project and get a warning
like:

/home/yu/master2/Graphisch interaktive Systeme/Praktikum/src/sinputmanager.cpp:165:21: warning: unused variable 'k' [-Wunused-variable]

and click on the warning, to get to the file, kdevelop won't open it

Reproducible: Always

Steps to Reproduce:
- create a simple c++ app that gives warning, in a folder with spaces
- compile it
- click on the warning

Actual Results:  
- nothing happens

Expected Results:  
- the file should open and kdevelop should set the cursor to the correct line+column

kdevelop/projectbuilders/makebuilder/outputfilters.cpp:19
<< ErrorFormat( "([^: \t]+):([0-9]+):([0-9]+):([^0-9]+)", 1, 2, 4, 3 )

seem to be responsible for it, as with gcc-4.5 showing line number and column is default. So we always get 3 : (colon).

The first part "([^: \t]+)" forbits spaces in paths, in fact the regexp returns something like
"Systeme/Praktikum/src/sinputmanager.cpp"
as file, which makes kdevelop things it is a relative path... and (short) all the crazy stuff happens.

If you change the first part into "([^:\t]+)" (without the space), everything works fine.

But as I don't know what kind of warnings gcc can give, I doubt that is the 100%+always correct solution.
Comment 1 Milian Wolff 2011-10-12 14:53:46 UTC
I'd be OK with the change, anyone opposed?

Bernd, just to make sure this gets enough coverage, please push a patch to git.reviewboard.kde.org

thanks
Comment 2 Bernd Buschinski 2011-10-15 22:50:17 UTC
After ok from reviewboard(102860), fixed with commit g9551523