CMakePM: Support errors with call stack

This is usually the case when using a custom CMake API e.g.
qt_add_executable.

The topmost function is highlighting the error now, presenting the
callstack in the tooltip.

Change-Id: Ic8b8f60e8fe94d88dfa0b384639172370382a421
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2023-10-05 12:06:33 +02:00
parent 42bda582d5
commit edf4280bd9
2 changed files with 98 additions and 2 deletions

View File

@@ -39,8 +39,17 @@ private:
QRegularExpression m_nextSubError;
QRegularExpression m_commonWarning;
QRegularExpression m_locationLine;
QRegularExpression m_sourceLineAndFunction;
bool m_skippedFirstEmptyLine = false;
int m_lines = 0;
struct CallStackLine
{
Utils::FilePath file;
int line = -1;
QString function;
};
std::optional<QList<CallStackLine>> m_callStack;
};
} // CMakeProjectManager