diff --git a/src/plugins/qtsupport/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp index 7b0f3220175..7de86e39ed0 100644 --- a/src/plugins/qtsupport/qtoutputformatter.cpp +++ b/src/plugins/qtsupport/qtoutputformatter.cpp @@ -102,7 +102,7 @@ void QtOutputFormatter::appendMessage(const QString &txt, Utils::OutputFormat fo cursor.movePosition(QTextCursor::End); cursor.beginEditBlock(); - QString deferedText; + QString deferredText; int start = 0; int pos = txt.indexOf(QLatin1Char('\n')); @@ -115,13 +115,13 @@ void QtOutputFormatter::appendMessage(const QString &txt, Utils::OutputFormat fo LinkResult lr = matchLine(line); if (!lr.href.isEmpty()) { // Found something && line continuation - cursor.insertText(deferedText, charFormat(format)); - deferedText.clear(); + cursor.insertText(deferredText, charFormat(format)); + deferredText.clear(); clearLastLine(); appendLine(cursor, lr, line, format); } else { // Found nothing, just emit the new part - deferedText += newPart; + deferredText += newPart; } // Handled line continuation m_lastLine.clear(); @@ -129,11 +129,11 @@ void QtOutputFormatter::appendMessage(const QString &txt, Utils::OutputFormat fo const QString line = txt.mid(start, pos - start + 1); LinkResult lr = matchLine(line); if (!lr.href.isEmpty()) { - cursor.insertText(deferedText, charFormat(format)); - deferedText.clear(); + cursor.insertText(deferredText, charFormat(format)); + deferredText.clear(); appendLine(cursor, lr, line, format); } else { - deferedText += line; + deferredText += line; } } start = pos + 1; @@ -149,29 +149,28 @@ void QtOutputFormatter::appendMessage(const QString &txt, Utils::OutputFormat fo LinkResult lr = matchLine(line); if (!lr.href.isEmpty()) { // Found something && line continuation - cursor.insertText(deferedText, charFormat(format)); - deferedText.clear(); + cursor.insertText(deferredText, charFormat(format)); + deferredText.clear(); clearLastLine(); appendLine(cursor, lr, line, format); } else { // Found nothing, just emit the new part - deferedText += newPart; + deferredText += newPart; } m_lastLine = line; } else { m_lastLine = txt.mid(start); LinkResult lr = matchLine(m_lastLine); if (!lr.href.isEmpty()) { - cursor.insertText(deferedText, charFormat(format)); - deferedText.clear(); + cursor.insertText(deferredText, charFormat(format)); + deferredText.clear(); appendLine(cursor, lr, m_lastLine, format); } else { - deferedText += m_lastLine; + deferredText += m_lastLine; } } } - cursor.insertText(deferedText, charFormat(format)); - // deferedText.clear(); + cursor.insertText(deferredText, charFormat(format)); cursor.endEditBlock(); } diff --git a/src/plugins/qtsupport/qtoutputformatter.h b/src/plugins/qtsupport/qtoutputformatter.h index 0fd31bfc132..81507d4d34e 100644 --- a/src/plugins/qtsupport/qtoutputformatter.h +++ b/src/plugins/qtsupport/qtoutputformatter.h @@ -61,11 +61,11 @@ class QTSUPPORT_EXPORT QtOutputFormatter { Q_OBJECT public: - QtOutputFormatter(ProjectExplorer::Project *project); + explicit QtOutputFormatter(ProjectExplorer::Project *project); - virtual void appendMessage(const QString &text, + void appendMessage(const QString &text, Utils::OutputFormat format); - virtual void handleLink(const QString &href); + void handleLink(const QString &href); protected: void clearLastLine(); @@ -75,8 +75,8 @@ private slots: private: LinkResult matchLine(const QString &line) const; - void appendLine(QTextCursor & cursor, LinkResult lr, - const QString &line, Utils::OutputFormat); + void appendLine(QTextCursor &cursor, LinkResult lr, const QString &line, + Utils::OutputFormat); mutable QRegExp m_qmlError; mutable QRegExp m_qtError;