From ec379a27301d51d5a94cd40ebb8bf7f2f23cf105 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 16 Apr 2020 17:07:14 +0200 Subject: [PATCH] Do not depend on c++17 --- src/Filter.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Filter.cpp b/src/Filter.cpp index bdeaaebb4..46e16c97f 100644 --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -327,11 +327,16 @@ void RegExpFilter::process() QRegularExpressionMatchIterator iterator(_searchText.globalMatch(*text)); while (iterator.hasNext()) { QRegularExpressionMatch match(iterator.next()); - auto [startLine, startColumn] = getLineColumn(match.capturedStart()); - auto [endLine, endColumn] = getLineColumn(match.capturedEnd()); + std::pair start = getLineColumn(match.capturedStart()); + std::pair end = getLineColumn(match.capturedEnd()); + + QSharedPointer spot( + newHotSpot(start.first, start.second, + end.first, end.second, + match.capturedTexts() + ) + ); - QSharedPointer spot(newHotSpot(startLine, startColumn, - endLine, endColumn, match.capturedTexts())); if (spot == nullptr) { continue; }