Browse Source

bugfix: do not use reference to hold return value from capturedTexts()

Signed-off-by: Le Tan <[email protected]>
Le Tan 8 years ago
parent
commit
8db54c45a4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/hgmarkdownhighlighter.cpp

+ 1 - 1
src/hgmarkdownhighlighter.cpp

@@ -219,7 +219,7 @@ void HGMarkdownHighlighter::highlightLinkWithSpacesInURL(const QString &p_text)
     while (index >= 0) {
         Q_ASSERT(regExp.captureCount() == 1);
         int length = regExp.matchedLength();
-        const QString &capturedText = regExp.capturedTexts()[1];
+        QString capturedText = regExp.capturedTexts()[1];
         if (capturedText.contains(' ')) {
             if (p_text[index] == '!' && m_imageFormat.isValid()) {
                 setFormat(index, length, m_imageFormat);