mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
Support Windows in Regex
This commit is contained in:
parent
e95a5bd797
commit
6e0ed887c2
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ static void CockatriceLogger(QtMsgType type, const QMessageLogContext &ctx, cons
|
|||
QString logMessage = qFormatLogMessage(type, ctx, message);
|
||||
|
||||
// Regular expression to match the full path in the square brackets and extract only the filename and line number
|
||||
QRegularExpression regex(R"(\[\/.*\/([^\/]+\:\d+)\])");
|
||||
QRegularExpression regex(R"(\[(?:.:)?[\/\\].*[\/\\]([^\/\\]+\:\d+)\])");
|
||||
QRegularExpressionMatch match = regex.match(logMessage);
|
||||
|
||||
if (match.hasMatch()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue