forked from qt-creator/qt-creator
Debugger: Convert a QRegExp use in source path map
Task-number: QTCREATORBUG-24098 Change-Id: I1ee441a60cbf362d38459bcef869e02d7fca9b7e Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -2827,10 +2827,10 @@ void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp)
|
||||
for (auto itExp = globalRegExpSourceMap.begin(), itEnd = globalRegExpSourceMap.end();
|
||||
itExp != itEnd;
|
||||
++itExp) {
|
||||
QRegExp exp = itExp->first;
|
||||
int index = exp.indexIn(string);
|
||||
if (index != -1) {
|
||||
rp.sourcePathMap.insert(string.left(index) + exp.cap(1), itExp->second);
|
||||
const QRegularExpressionMatch match = itExp->first.match(string);
|
||||
if (match.hasMatch()) {
|
||||
rp.sourcePathMap.insert(string.left(match.capturedStart()) + match.captured(1),
|
||||
itExp->second);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user