From 0504150e4a0a3874a8e431af351277f7342dac95 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 31 Oct 2017 14:30:39 +0100 Subject: Default: merge CheckIndicator back to CheckBox & CheckDelegate The internal CheckIndicator helper was introduced together with CheckDelegate in 1acb34a, because we naturally wanted to share the indicator instead of duplicating it. This change is controversial, because it leads to duplicate code, but keeping the indicator definitions inline is clearly faster. This is not seen as a huge problem for the Default style, because the indicator is not too complicated. Basically, this fixes a ~5% performance regression introduced by 1acb34a. Before: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml [...] Average: 72.8 frames; using samples; MedianAll=73; StdDev=1.48324, CoV=0.0203742 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml [...] Average: 77 frames; using samples; MedianAll=77; StdDev=1.41421, CoV=0.0183664 Change-Id: Ibee0e29e83a64ee4a6a772a90b1784a9c8c715bb Reviewed-by: Mitch Curtis --- tests/benchmarks/creationtime/tst_creationtime.cpp | 2 +- tests/benchmarks/objectcount/tst_objectcount.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/benchmarks') diff --git a/tests/benchmarks/creationtime/tst_creationtime.cpp b/tests/benchmarks/creationtime/tst_creationtime.cpp index c584b9a5..7693b5b3 100644 --- a/tests/benchmarks/creationtime/tst_creationtime.cpp +++ b/tests/benchmarks/creationtime/tst_creationtime.cpp @@ -131,7 +131,7 @@ void tst_CreationTime::controls() void tst_CreationTime::controls_data() { QTest::addColumn("url"); - addTestRows(&engine, "controls", "QtQuick/Controls.2", QStringList() << "ApplicationWindow" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator"); + addTestRows(&engine, "controls", "QtQuick/Controls.2", QStringList() << "ApplicationWindow" << "RadioIndicator" << "SwitchIndicator"); } void tst_CreationTime::fusion() diff --git a/tests/benchmarks/objectcount/tst_objectcount.cpp b/tests/benchmarks/objectcount/tst_objectcount.cpp index 748cc1c1..5463a493 100644 --- a/tests/benchmarks/objectcount/tst_objectcount.cpp +++ b/tests/benchmarks/objectcount/tst_objectcount.cpp @@ -126,7 +126,7 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt static void initTestRows(QQmlEngine *engine) { - addTestRows(engine, "controls", "QtQuick/Controls.2", QStringList() << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator"); + addTestRows(engine, "controls", "QtQuick/Controls.2", QStringList() << "RadioIndicator" << "SwitchIndicator"); addTestRows(engine, "controls/fusion", "QtQuick/Controls.2/Fusion", QStringList() << "ButtonPanel" << "CheckIndicator" << "RadioIndicator" << "SliderGroove" << "SliderHandle" << "SwitchIndicator"); addTestRows(engine, "controls/imagine", "QtQuick/Controls.2/Imagine"); addTestRows(engine, "controls/material", "QtQuick/Controls.2/Material", QStringList() << "Ripple" << "SliderHandle" << "CheckIndicator" << "RadioIndicator" << "SwitchIndicator" << "BoxShadow" << "ElevationEffect" << "CursorDelegate"); -- cgit v1.2.3