[email protected] schreef:
> [email protected] wrote:
>
>> Hi,
>>
>> I have several main.cpp files in my tree (one for each
>> program), and whenever there is a compilation warning or
>> error listed in the Build Issues pane it claims it cannot
>> find the file.
>>
>
> Hi,
>
> The logic to find the absolute file path is implemented in
> AbstractMakeStep::slotAddToTaskWindow().
>
> Currently it
>
> - Tracks the "Entering directory" & "Leaving directory" calls, and tries to
> find the file in there. This might fail, however, because of locale specific
> compiler output or parallel / distributed builds.
> - Checks if the file is unique in the project.
>
> Apparently the first step fails for you, while it shouldn't. If you want to
> look into this yourself, I recommend starting with enabling the debugging for
> this file (change "bool debug=false" to true at line 46).
>
>
I found the problem in gccparser.cpp. The regular expression to match
the Entering directory line incorrectly assumes that all the world is Unix.
The make executable is called mingw32-make on Windows and the regexp
fails to match that.
See patch below.
diff --git a/src/plugins/projectexplorer/gccparser.cpp
b/src/plugins/projectexplorer/gccparser.cpp
index f4a1e7b..bbdc3a6 100644
--- a/src/plugins/projectexplorer/gccparser.cpp
+++ b/src/plugins/projectexplorer/gccparser.cpp
@@ -45,7 +45,7 @@ GccParser::GccParser()
m_regExpLinker.setMinimal(true);
//make[4]: Entering directory
`/home/kkoehne/dev/ide-explorer/src/plugins/qtscripteditor'
- m_makeDir.setPattern("^make.*: (\\w+) directory .(.+).$");
+ m_makeDir.setPattern("^(mingw32-)?make.*: (\\w+) directory .(.+).$");
m_makeDir.setMinimal(true);
}
@@ -59,10 +59,10 @@ void GccParser::stdOutput(const QString & line)
QString lne = line.trimmed();
if (m_makeDir.indexIn(lne) > -1) {
- if (m_makeDir.cap(1) == "Leaving")
- emit leaveDirectory(m_makeDir.cap(2));
+ if (m_makeDir.cap(2) == "Leaving")
+ emit leaveDirectory(m_makeDir.cap(3));
else
- emit enterDirectory(m_makeDir.cap(2));
+ emit enterDirectory(m_makeDir.cap(3));
}
}
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator