summaryrefslogtreecommitdiff
path: root/src/plugins/qtsupport
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-05-08 16:00:29 +0200
committerKai Koehne <kai.koehne@nokia.com>2012-05-09 09:51:20 +0200
commitb3a3072eddf64f23b28df183faee667444c58374 (patch)
tree7e93cd70caafffef26fd5b2420736efeba217d2f /src/plugins/qtsupport
parentcd46079734e59ed0c8cc3d4ae7ae2b0abbc0dd60 (diff)
downloadqt-creator-b3a3072eddf64f23b28df183faee667444c58374.tar.gz
QtOutputFormatter: Fix style issues
Change-Id: I9f97b5c545639217155fb46dfd32af3b435f00a5 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/qtsupport')
-rw-r--r--src/plugins/qtsupport/qtoutputformatter.cpp29
-rw-r--r--src/plugins/qtsupport/qtoutputformatter.h10
2 files changed, 19 insertions, 20 deletions
diff --git a/src/plugins/qtsupport/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp
index 7b0f322017..7de86e39ed 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 0fd31bfc13..81507d4d34 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;