From 0cf52fd670a6b1d351ecf0d877c650e9e1910dff Mon Sep 17 00:00:00 2001 From: Gres Date: Thu, 12 Dec 2019 22:06:41 +0300 Subject: [PATCH] Qt 5.14 fix --- src/markdowntextedit.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/markdowntextedit.cpp b/src/markdowntextedit.cpp index e7d83a9..57d11f2 100644 --- a/src/markdowntextedit.cpp +++ b/src/markdowntextedit.cpp @@ -703,11 +703,9 @@ QString QMarkdownTextEdit::getMarkdownUrlAtPosition ( // get a map of parsed markdown urls with their link texts as key QMap urlMap = parseMarkdownUrlsFromText (text); - QMapIterator iterator (urlMap); - while (iterator.hasNext ()) { - iterator.next (); - QString linkText = iterator.key (); - QString urlString = iterator.value (); + for (auto it = urlMap.cbegin(), end = urlMap.cend(); it != end; ++it) { + QString linkText = it.key (); + QString urlString = it.value (); int foundPositionStart = text.indexOf (linkText);