fix: build with qt5.12 on Linux and pedantic flag

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-12-18 17:03:39 -03:00
parent 0e207aba6c
commit c8eca4fb85
8 changed files with 19 additions and 12 deletions

View File

@ -302,7 +302,9 @@ void ResourcePage::openUrl(const QUrl& url)
QRegularExpressionMatch match;
QString page;
for (auto&& [regex, candidate] : urlHandlers().asKeyValueRange()) {
auto handlers = urlHandlers();
for (auto it = handlers.constKeyValueBegin(); it != handlers.constKeyValueEnd(); it++) {
auto&& [regex, candidate] = *it;
if (match = QRegularExpression(regex).match(address); match.hasMatch()) {
page = candidate;
break;