diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-16 10:50:58 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-16 16:19:22 +0000 |
commit | 883492c13536694f5565295ce87ce17a5a42444f (patch) | |
tree | 271f34b53b8323f9b8aff65bc926e15f71179561 /src/plugins/valgrind/callgrindtextmark.cpp | |
parent | b2e537baaa258dd1d5abfcb91b2e62308ee9404d (diff) |
TextEditor: Set widthFactor from TextMark ctor
The text marks are added to the document from their ctor. The document
then uses the widthFactor to calculate the space needed for them. If the
widthFactor is only set afterwards, the calculated space is wrong.
Change-Id: Ic7d24f99cc78d1bf084b2b1cfdf6b955496072f3
Task-number: QTCREATORBUG-17833
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/valgrind/callgrindtextmark.cpp')
-rw-r--r-- | src/plugins/valgrind/callgrindtextmark.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/valgrind/callgrindtextmark.cpp b/src/plugins/valgrind/callgrindtextmark.cpp index 5a8ed43ebd..cfd19c7a0c 100644 --- a/src/plugins/valgrind/callgrindtextmark.cpp +++ b/src/plugins/valgrind/callgrindtextmark.cpp @@ -42,11 +42,10 @@ namespace Constants { const char CALLGRIND_TEXT_MARK_CATEGORY[] = "Callgrind.Tex CallgrindTextMark::CallgrindTextMark(const QPersistentModelIndex &index, const QString &fileName, int lineNumber) - : TextEditor::TextMark(fileName, lineNumber, Constants::CALLGRIND_TEXT_MARK_CATEGORY) + : TextEditor::TextMark(fileName, lineNumber, Constants::CALLGRIND_TEXT_MARK_CATEGORY, 4.0) , m_modelIndex(index) { setPriority(TextEditor::TextMark::HighPriority); - setWidthFactor(4.0); } void CallgrindTextMark::paint(QPainter *painter, const QRect &paintRect) const |