From 28f90ff1c65f30dbe231596eff4d728578f08682 2012-05-21 07:19:31 From: Jani Honkonen Date: 2012-05-21 07:19:31 Subject: [PATCH] Fix pie autotests Legend is now on by default which broke some tests. --- diff --git a/test/auto/qpieseries/tst_qpieseries.cpp b/test/auto/qpieseries/tst_qpieseries.cpp index 6a03511..d92931b 100644 --- a/test/auto/qpieseries/tst_qpieseries.cpp +++ b/test/auto/qpieseries/tst_qpieseries.cpp @@ -278,6 +278,7 @@ void tst_qpieseries::clickedSignal() // add series to the chart QChartView view(new QChart()); + view.chart()->legend()->setVisible(false); view.resize(200, 200); view.chart()->addSeries(series); view.show(); @@ -285,7 +286,7 @@ void tst_qpieseries::clickedSignal() // simulate clicks // pie rectangle: QRectF(60,60 121x121) - QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, QPoint(139, 85)); // inside slice 1 + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, QPoint(146, 90)); // inside slice 1 TRY_COMPARE(clickSpy1.count(), 1); QCOMPARE(qvariant_cast(clickSpy1.at(0).at(0)), s1); } @@ -301,6 +302,7 @@ void tst_qpieseries::hoverSignal() // add series to the chart QChartView view(new QChart()); + view.chart()->legend()->setVisible(false); view.resize(200, 200); view.chart()->addSeries(series); view.show(); diff --git a/test/auto/qpieslice/tst_qpieslice.cpp b/test/auto/qpieslice/tst_qpieslice.cpp index 5d5d566..02a6565 100644 --- a/test/auto/qpieslice/tst_qpieslice.cpp +++ b/test/auto/qpieslice/tst_qpieslice.cpp @@ -207,6 +207,7 @@ void tst_qpieslice::mouseClick() // add series to the chart QChartView view(new QChart()); + view.chart()->legend()->setVisible(false); view.resize(200, 200); view.chart()->addSeries(series); view.show(); @@ -236,6 +237,7 @@ void tst_qpieslice::mouseHover() // add series to the chart QChartView view(new QChart()); + view.chart()->legend()->setVisible(false); view.resize(200, 200); view.chart()->addSeries(series); view.show();