summaryrefslogtreecommitdiff
path: root/src/plugins/autotest/testresultdelegate.cpp
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2018-02-01 09:17:56 +0100
committerhjk <hjk@qt.io>2018-02-01 09:51:54 +0000
commit0bd6f712f0658e1685a074523d8b289e63935f1d (patch)
treeae7d4be249dd9ac5582ae00c73dfa24a2c576b09 /src/plugins/autotest/testresultdelegate.cpp
parent56fbeb8a68bd3cf3bcbd3a3c3fdd0a5b66f90e3e (diff)
downloadqt-creator-0bd6f712f0658e1685a074523d8b289e63935f1d.tar.gz
AutoTest: Access plugin singleton through static functions
It's the more common pattern nowadays, and cheaper. Change-Id: If6217b2a820fbfa6f088fd9349225f5f8488f593 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/autotest/testresultdelegate.cpp')
-rw-r--r--src/plugins/autotest/testresultdelegate.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/autotest/testresultdelegate.cpp b/src/plugins/autotest/testresultdelegate.cpp
index 6840394831..076adbc3aa 100644
--- a/src/plugins/autotest/testresultdelegate.cpp
+++ b/src/plugins/autotest/testresultdelegate.cpp
@@ -105,8 +105,7 @@ void TestResultDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
if (selected) {
output.replace('\n', QChar::LineSeparator);
- if (AutotestPlugin::instance()->settings()->limitResultOutput
- && output.length() > outputLimit)
+ if (AutotestPlugin::settings()->limitResultOutput && output.length() > outputLimit)
output = output.left(outputLimit).append("...");
recalculateTextLayout(index, output, painter->font(), positions.textAreaWidth());
@@ -163,8 +162,7 @@ QSize TestResultDelegate::sizeHint(const QStyleOptionViewItem &option, const QMo
QString output = testResult->outputString(selected);
output.replace('\n', QChar::LineSeparator);
- if (AutotestPlugin::instance()->settings()->limitResultOutput
- && output.length() > outputLimit)
+ if (AutotestPlugin::settings()->limitResultOutput && output.length() > outputLimit)
output = output.left(outputLimit).append("...");
recalculateTextLayout(index, output, opt.font, positions.textAreaWidth());