summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-09-14 09:59:48 +0200
committerEike Ziller <eike.ziller@qt.io>2018-09-14 09:59:48 +0200
commit4c914c6b431e389fd0258fc456a2d00c36176819 (patch)
treec8c32b8f9fb891514ce53d9c876e601001ddefc3 /src
parent29c07f48592eea1b61e09567d65b6add26c7caf0 (diff)
parentbaf8cac967b6927992e6c59cc742c8a7d3ebc893 (diff)
downloadqt-creator-4c914c6b431e389fd0258fc456a2d00c36176819.tar.gz
Merge remote-tracking branch 'origin/4.7'
Change-Id: I562b0b8afb98940e03b67cbd7d7c3e756b77d736
Diffstat (limited to 'src')
-rw-r--r--src/libs/qmljs/qmljsreformatter.cpp5
-rw-r--r--src/plugins/vcsbase/baseannotationhighlighter.cpp7
2 files changed, 9 insertions, 3 deletions
diff --git a/src/libs/qmljs/qmljsreformatter.cpp b/src/libs/qmljs/qmljsreformatter.cpp
index 91d4db897e..7744bfa971 100644
--- a/src/libs/qmljs/qmljsreformatter.cpp
+++ b/src/libs/qmljs/qmljsreformatter.cpp
@@ -173,8 +173,11 @@ protected:
QStringList lines = str.split(QLatin1Char('\n'));
bool multiline = lines.length() > 1;
for (int i = 0; i < lines.size(); ++i) {
- if (multiline)
+ if (multiline) {
+ if (i == 0)
+ newLine();
_line = lines.at(i); // multiline comments don't keep track of previos lines
+ }
else
_line += lines.at(i);
if (i != lines.size() - 1)
diff --git a/src/plugins/vcsbase/baseannotationhighlighter.cpp b/src/plugins/vcsbase/baseannotationhighlighter.cpp
index b95fe6a179..6b3154ab27 100644
--- a/src/plugins/vcsbase/baseannotationhighlighter.cpp
+++ b/src/plugins/vcsbase/baseannotationhighlighter.cpp
@@ -25,6 +25,7 @@
#include "baseannotationhighlighter.h"
#include <texteditor/fontsettings.h>
+#include <texteditor/texteditorsettings.h>
#include <QDebug>
#include <QColor>
@@ -63,8 +64,10 @@ public:
void BaseAnnotationHighlighterPrivate::updateOtherFormats()
{
- m_background = q->formatForCategory(TextEditor::C_TEXT)
- .brushProperty(QTextFormat::BackgroundBrush).color();
+ m_background = TextEditor::TextEditorSettings::fontSettings()
+ .toTextCharFormat(TextEditor::C_TEXT)
+ .brushProperty(QTextFormat::BackgroundBrush)
+ .color();
q->setChangeNumbers(m_changeNumberMap.keys().toSet());
}