diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-09-30 14:02:43 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-10-04 12:58:45 +0000 |
commit | 2c3935a76fbadd5714882795f39ce59049aafb63 (patch) | |
tree | 26bb449cd4b3295cbced1f8867843fc4359b3239 /tests | |
parent | 4e2698c9aee2594faaacb4d3f835e2189c7631ef (diff) |
Remove 200x200 minimum size from chart
There was no reason for enforcing the 200x200 minimum size for the
chart, as the minimum size already took into account various chart
element minimum sizes. Legend and chart title also no longer
contribute to the minimum size if they are not visible.
Some autotests that simulated mouse events were relying on this
minimum size, so added explicit resizes to some of them.
Task-number: QTBUG-56238
Change-Id: I515b4992a39acbc02bfbc81f225d6b6939adcf91
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Mika Salmela <mika.salmela@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qabstractaxis/tst_qabstractaxis.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qchart/tst_qchart.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qchartview/tst_qchartview.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qdatetimeaxis/tst_qdatetimeaxis.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qlineseries/tst_qlineseries.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qpercentbarseries/tst_qpercentbarseries.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qpiemodelmapper/tst_qpiemodelmapper.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qpieseries/tst_qpieseries.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qpieslice/tst_qpieslice.cpp | 5 | ||||
-rw-r--r-- | tests/auto/qscatterseries/tst_qscatterseries.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qsplineseries/tst_qsplineseries.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qxymodelmapper/tst_qxymodelmapper.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qxyseries/tst_qxyseries.cpp | 1 |
16 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qabstractaxis/tst_qabstractaxis.cpp b/tests/auto/qabstractaxis/tst_qabstractaxis.cpp index b0297b14..08122187 100644 --- a/tests/auto/qabstractaxis/tst_qabstractaxis.cpp +++ b/tests/auto/qabstractaxis/tst_qabstractaxis.cpp @@ -46,6 +46,7 @@ void tst_QAbstractAxis::init(QAbstractAxis* axis, QAbstractSeries* series) m_axis = axis; m_series = series; m_view = new QChartView(newQChartOrQPolarChart()); + m_view->resize(200, 200); m_chart = m_view->chart(); } diff --git a/tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp b/tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp index f4b12221..badbd67d 100644 --- a/tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp +++ b/tests/auto/qbarmodelmapper/tst_qbarmodelmapper.cpp @@ -158,6 +158,7 @@ void tst_qbarmodelmapper::initTestCase() { m_chart = new QChart; m_chartView = new QChartView(m_chart); + m_chartView->resize(200, 200); m_chartView->show(); } diff --git a/tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp b/tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp index 32959116..cf3531ed 100644 --- a/tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp +++ b/tests/auto/qcandlestickmodelmapper/tst_qcandlestickmodelmapper.cpp @@ -135,6 +135,7 @@ void tst_qcandlestickmodelmapper::initTestCase() { m_chart = new QChart(); m_chartView = new QChartView(m_chart); + m_chartView->resize(200, 200); m_chartView->show(); } diff --git a/tests/auto/qchart/tst_qchart.cpp b/tests/auto/qchart/tst_qchart.cpp index 87487a50..75a395a2 100644 --- a/tests/auto/qchart/tst_qchart.cpp +++ b/tests/auto/qchart/tst_qchart.cpp @@ -143,6 +143,7 @@ void tst_QChart::cleanupTestCase() void tst_QChart::init() { m_view = new QChartView(newQChartOrQPolarChart()); + m_view->resize(200, 200); m_chart = m_view->chart(); } diff --git a/tests/auto/qchartview/tst_qchartview.cpp b/tests/auto/qchartview/tst_qchartview.cpp index 4ad4d6f6..36b73430 100644 --- a/tests/auto/qchartview/tst_qchartview.cpp +++ b/tests/auto/qchartview/tst_qchartview.cpp @@ -78,6 +78,7 @@ void tst_QChartView::cleanupTestCase() void tst_QChartView::init() { m_view = new QChartView(newQChartOrQPolarChart()); + m_view->resize(200, 200); m_view->chart()->legend()->setVisible(false); } diff --git a/tests/auto/qdatetimeaxis/tst_qdatetimeaxis.cpp b/tests/auto/qdatetimeaxis/tst_qdatetimeaxis.cpp index 832deb18..fa2f5447 100644 --- a/tests/auto/qdatetimeaxis/tst_qdatetimeaxis.cpp +++ b/tests/auto/qdatetimeaxis/tst_qdatetimeaxis.cpp @@ -91,6 +91,7 @@ void tst_QDateTimeAxis::init() // tst_QAbstractAxis::init(m_datetimeaxis, m_series); m_view = new QChartView; + m_view->resize(200, 200); m_chart = m_view->chart(); m_chart->addSeries(m_series); m_chart->setAxisY(m_dateTimeAxisY, m_series); diff --git a/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp b/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp index b432ceff..da5a149d 100644 --- a/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp +++ b/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp @@ -623,6 +623,7 @@ void tst_QHorizontalPercentBarSeries::zeroValuesInSeries() series->append(set2); QChartView view(new QChart()); + view.resize(400, 300); view.chart()->addSeries(series); view.chart()->createDefaultAxes(); view.show(); diff --git a/tests/auto/qlineseries/tst_qlineseries.cpp b/tests/auto/qlineseries/tst_qlineseries.cpp index 2662a896..995abc04 100644 --- a/tests/auto/qlineseries/tst_qlineseries.cpp +++ b/tests/auto/qlineseries/tst_qlineseries.cpp @@ -128,6 +128,7 @@ void tst_QLineSeries::pressedSignal() lineSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(lineSeries); view.show(); @@ -159,6 +160,7 @@ void tst_QLineSeries::releasedSignal() lineSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(lineSeries); view.show(); @@ -212,6 +214,7 @@ void tst_QLineSeries::doubleClickedSignal() lineSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(lineSeries); view.show(); diff --git a/tests/auto/qpercentbarseries/tst_qpercentbarseries.cpp b/tests/auto/qpercentbarseries/tst_qpercentbarseries.cpp index b60ba92b..b8913bd0 100644 --- a/tests/auto/qpercentbarseries/tst_qpercentbarseries.cpp +++ b/tests/auto/qpercentbarseries/tst_qpercentbarseries.cpp @@ -627,6 +627,7 @@ void tst_QPercentBarSeries::zeroValuesInSeries() series->append(set2); QChartView view(new QChart()); + view.resize(400, 300); view.chart()->addSeries(series); view.chart()->createDefaultAxes(); view.show(); diff --git a/tests/auto/qpiemodelmapper/tst_qpiemodelmapper.cpp b/tests/auto/qpiemodelmapper/tst_qpiemodelmapper.cpp index 0ebb7608..e7b50795 100644 --- a/tests/auto/qpiemodelmapper/tst_qpiemodelmapper.cpp +++ b/tests/auto/qpiemodelmapper/tst_qpiemodelmapper.cpp @@ -157,6 +157,7 @@ void tst_qpiemodelmapper::initTestCase() { m_chart = new QChart; m_chartView = new QChartView(m_chart); + m_chartView->resize(200, 200); m_chartView->show(); } diff --git a/tests/auto/qpieseries/tst_qpieseries.cpp b/tests/auto/qpieseries/tst_qpieseries.cpp index 1a808385..3510332c 100644 --- a/tests/auto/qpieseries/tst_qpieseries.cpp +++ b/tests/auto/qpieseries/tst_qpieseries.cpp @@ -93,6 +93,7 @@ void tst_qpieseries::cleanupTestCase() void tst_qpieseries::init() { m_view = new QChartView(); + m_view->resize(200, 200); m_series = new QPieSeries(m_view); m_view->show(); QTest::qWaitForWindowShown(m_view); diff --git a/tests/auto/qpieslice/tst_qpieslice.cpp b/tests/auto/qpieslice/tst_qpieslice.cpp index 913eb641..f8eb7841 100644 --- a/tests/auto/qpieslice/tst_qpieslice.cpp +++ b/tests/auto/qpieslice/tst_qpieslice.cpp @@ -253,6 +253,7 @@ void tst_qpieslice::clickedSignal() // add series to the chart QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(series); view.show(); @@ -289,6 +290,7 @@ void tst_qpieslice::hoverSignal() // add series to the chart QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(series); view.show(); @@ -368,6 +370,7 @@ void tst_qpieslice::pressedSignal() // add series to the chart QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(series); view.show(); @@ -408,6 +411,7 @@ void tst_qpieslice::releasedSignal() // add series to the chart QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(series); view.show(); @@ -442,6 +446,7 @@ void tst_qpieslice::doubleClickedSignal() // add series to the chart QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(series); view.show(); diff --git a/tests/auto/qscatterseries/tst_qscatterseries.cpp b/tests/auto/qscatterseries/tst_qscatterseries.cpp index b3e9c3f2..fdd91198 100644 --- a/tests/auto/qscatterseries/tst_qscatterseries.cpp +++ b/tests/auto/qscatterseries/tst_qscatterseries.cpp @@ -151,6 +151,7 @@ void tst_QScatterSeries::pressedSignal() scatterSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(scatterSeries); view.show(); @@ -182,6 +183,7 @@ void tst_QScatterSeries::releasedSignal() scatterSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(scatterSeries); view.show(); @@ -213,6 +215,7 @@ void tst_QScatterSeries::doubleClickedSignal() scatterSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(scatterSeries); view.show(); diff --git a/tests/auto/qsplineseries/tst_qsplineseries.cpp b/tests/auto/qsplineseries/tst_qsplineseries.cpp index d390db40..0b979658 100644 --- a/tests/auto/qsplineseries/tst_qsplineseries.cpp +++ b/tests/auto/qsplineseries/tst_qsplineseries.cpp @@ -120,6 +120,7 @@ void tst_QSplineSeries::pressedSignal() splineSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(splineSeries); view.show(); @@ -151,6 +152,7 @@ void tst_QSplineSeries::releasedSignal() splineSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(splineSeries); view.show(); @@ -182,6 +184,7 @@ void tst_QSplineSeries::doubleClickedSignal() splineSeries->append(QPointF(6, 12)); QChartView view; + view.resize(200, 200); view.chart()->legend()->setVisible(false); view.chart()->addSeries(splineSeries); view.show(); diff --git a/tests/auto/qxymodelmapper/tst_qxymodelmapper.cpp b/tests/auto/qxymodelmapper/tst_qxymodelmapper.cpp index 3e891168..d990926d 100644 --- a/tests/auto/qxymodelmapper/tst_qxymodelmapper.cpp +++ b/tests/auto/qxymodelmapper/tst_qxymodelmapper.cpp @@ -159,6 +159,7 @@ void tst_qxymodelmapper::initTestCase() { m_chart = newQChartOrQPolarChart(); m_chartView = new QChartView(m_chart); + m_chartView->resize(200, 200); m_chartView->show(); } diff --git a/tests/auto/qxyseries/tst_qxyseries.cpp b/tests/auto/qxyseries/tst_qxyseries.cpp index da1fd3db..767caca2 100644 --- a/tests/auto/qxyseries/tst_qxyseries.cpp +++ b/tests/auto/qxyseries/tst_qxyseries.cpp @@ -43,6 +43,7 @@ void tst_QXYSeries::cleanupTestCase() void tst_QXYSeries::init() { m_view = new QChartView(newQChartOrQPolarChart()); + m_view->resize(200, 200); m_chart = m_view->chart(); } |