diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-13 15:18:02 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-13 15:18:02 +0200 |
commit | 6370c3aa719bd7c1327cef88d263841ba28bb010 (patch) | |
tree | 46960631e7abbeaa40e019f6e31c2be5a18e6b92 /tests/auto | |
parent | b9a32351c8582ede87b6c63967f5c832c0622645 (diff) | |
parent | ef416e0faaa83cd122038db397dd24d949c9cafe (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Also bump minimum required Qt version for Android: Ministro updates.
Conflicts:
src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java
src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
src/plugins/platforms/android/androidjnimain.cpp
Change-Id: I966f249bebf92da37bfdeb995ad21b027eb03301
Diffstat (limited to 'tests/auto')
5 files changed, 41 insertions, 20 deletions
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 8a97a9261f..bb7e2dca35 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -297,6 +297,8 @@ private slots: void QTBUG50153_drawImage_assert(); + void QTBUG56252(); + private: void fillData(); void setPenColor(QPainter& p); @@ -5061,6 +5063,23 @@ void tst_QPainter::QTBUG50153_drawImage_assert() } } +void tst_QPainter::QTBUG56252() +{ + QImage sourceImage(1770, 1477, QImage::Format_RGB32); + QImage rotatedImage(1478, 1771, QImage::Format_RGB32); + QTransform transformCenter; + transformCenter.translate(739.0, 885.5); + transformCenter.rotate(270.0); + transformCenter.translate(-885.0, -738.5); + QPainter painter; + painter.begin(&rotatedImage); + painter.setTransform(transformCenter); + painter.drawImage(QPoint(0, 0),sourceImage); + painter.end(); + + // If no crash or illegal memory read, all is fine +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" diff --git a/tests/auto/other/macnativeevents/BLACKLIST b/tests/auto/other/macnativeevents/BLACKLIST index 4129868022..3e68ba0cf0 100644 --- a/tests/auto/other/macnativeevents/BLACKLIST +++ b/tests/auto/other/macnativeevents/BLACKLIST @@ -2,8 +2,7 @@ [testDragWindow] osx [testMouseEnter] -osx-10.9 -osx-10.8 +osx [testChildDialogInFrontOfModalParent] osx [testChildWindowInFrontOfStaysOnTopParentWindow] diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 1df9a9434c..5b6f219d11 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -2924,6 +2924,9 @@ void tst_QGraphicsView::scrollBarRanges() if (useStyledPanel && style == QStringLiteral("Macintosh") && platformName == QStringLiteral("cocoa")) QSKIP("Insignificant on OSX"); + + QScopedPointer<QStyle> stylePtr; + QGraphicsScene scene; QGraphicsView view(&scene); view.setRenderHint(QPainter::Antialiasing); @@ -2931,9 +2934,10 @@ void tst_QGraphicsView::scrollBarRanges() view.setFrameStyle(useStyledPanel ? QFrame::StyledPanel : QFrame::NoFrame); if (style == QString("motif")) - view.setStyle(new FauxMotifStyle); + stylePtr.reset(new FauxMotifStyle); else - view.setStyle(QStyleFactory::create(style)); + stylePtr.reset(QStyleFactory::create(style)); + view.setStyle(stylePtr.data()); view.setStyleSheet(" "); // enables style propagation ;-) int adjust = 0; @@ -3500,7 +3504,7 @@ void tst_QGraphicsView::task245469_itemsAtPointWithClip() static QGraphicsView *createSimpleViewAndScene() { QGraphicsView *view = new QGraphicsView; - QGraphicsScene *scene = new QGraphicsScene; + QGraphicsScene *scene = new QGraphicsScene(view); view->setScene(scene); view->setBackgroundBrush(Qt::blue); @@ -3628,7 +3632,7 @@ void tst_QGraphicsView::moveItemWhileScrolling() MoveItemScrollView() { setWindowFlags(Qt::X11BypassWindowManagerHint); - setScene(new QGraphicsScene(0, 0, 1000, 1000)); + setScene(new QGraphicsScene(0, 0, 1000, 1000, this)); rect = scene()->addRect(0, 0, 10, 10); rect->setPos(50, 50); rect->setPen(QPen(Qt::black, 0)); @@ -3694,7 +3698,7 @@ void tst_QGraphicsView::centerOnDirtyItem() toplevel.setWindowFlags(view.windowFlags() | Qt::WindowStaysOnTopHint); view.resize(200, 200); - QGraphicsScene *scene = new QGraphicsScene; + QGraphicsScene *scene = new QGraphicsScene(&view); view.setScene(scene); view.setSceneRect(-1000, -1000, 2000, 2000); diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 272e6ef02f..5a00b0dad9 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -10425,14 +10425,13 @@ public slots: bool eventFilter(QObject *o, QEvent *e) { - if (modal && modal->button && o == modal->button) { - switch (e->type()) { - case QEvent::Enter: + switch (e->type()) { + case QEvent::Enter: + if (modal && modal->button && o == modal->button) enters++; - break; - default: - break; - } + break; + default: + break; } return QDialog::eventFilter(o, e); } diff --git a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp index 5d5e00ac42..b591112bd1 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp +++ b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp @@ -760,22 +760,22 @@ void tst_QXmlSimpleReader::dtdRecursionLimit() QVERIFY(file.open(QIODevice::ReadOnly)); QXmlSimpleReader xmlReader; { - QXmlInputSource *source = new QXmlInputSource(&file); + QXmlInputSource source(&file); TestHandler handler; xmlReader.setDeclHandler(&handler); xmlReader.setErrorHandler(&handler); - QVERIFY(!xmlReader.parse(source)); + QVERIFY(!xmlReader.parse(&source)); } file.close(); file.setFileName("xmldocs/1-levels-nested-dtd.xml"); QVERIFY(file.open(QIODevice::ReadOnly)); { - QXmlInputSource *source = new QXmlInputSource(&file); + QXmlInputSource source(&file); TestHandler handler; xmlReader.setDeclHandler(&handler); xmlReader.setErrorHandler(&handler); - QVERIFY(!xmlReader.parse(source)); + QVERIFY(!xmlReader.parse(&source)); // The error wasn't because of the recursion limit being reached, // it was because the document is not valid. QVERIFY(handler.recursionCount < 2); @@ -785,11 +785,11 @@ void tst_QXmlSimpleReader::dtdRecursionLimit() file.setFileName("xmldocs/internal-entity-polynomial-attribute.xml"); QVERIFY(file.open(QIODevice::ReadOnly)); { - QXmlInputSource *source = new QXmlInputSource(&file); + QXmlInputSource source(&file); TestHandler handler; xmlReader.setDeclHandler(&handler); xmlReader.setErrorHandler(&handler); - QVERIFY(!xmlReader.parse(source)); + QVERIFY(!xmlReader.parse(&source)); QCOMPARE(handler.recursionCount, 2); } } |