Oswald Buddenhagen schreef:
> On Fri, Dec 04, 2009 at 09:53:19AM +0100, ext Robert de Vries wrote:
>
>> I found the problem in gccparser.cpp.
>>
>>
> oh, cool.
>
>
>> +++ b/src/plugins/projectexplorer/gccparser.cpp
>> - m_makeDir.setPattern("^make.*: (\\w+) directory .(.+).$");
>> + m_makeDir.setPattern("^(mingw32-)?make.*: (\\w+) directory .(.+).$");
>>
>>
> you should use the non-capturing syntax (?:mingw32-)? - this saves some
> cycles and you don't have to adjust the cap() indices below. that would
> also enable an #ifdef on the string to spare real unixes from the
> never-matching regexp part. :)
>
You may be right from a aesthetic point of view, however an #ifdef is
probably less desirable for maintenance.
As far as performance is concerned, I would not worry too much. :-)
Below my improved patch.
diff --git a/src/plugins/projectexplorer/gccparser.cpp
b/src/plugins/projectexplorer/gccparser.cpp
index f4a1e7b..bc6fc6c 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);
}
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator