diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-09 09:30:43 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-09-09 07:51:49 +0000 |
commit | 1d53b6d9f2d7d0427ff56cfa50d98ac97f99c1bc (patch) | |
tree | d270812c4b648f51090e1262972846b1b4de8116 /tests/auto | |
parent | 89d0a03c067b42155b1a2d310f8514f595abfd61 (diff) | |
parent | 5cea83a8a2fc3384bb07a7265c8d907171cb1ea4 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp | 17 | ||||
-rw-r--r-- | tests/auto/network/access/http2/tst_http2.cpp | 3 | ||||
-rw-r--r-- | tests/auto/other/lancelot/paintcommands.cpp | 10 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp | 10 |
4 files changed, 38 insertions, 2 deletions
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp index aee2f970fe..a474acd790 100644 --- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp @@ -139,6 +139,7 @@ private slots: void superscriptCrash_qtbug53911(); void showLineAndParagraphSeparatorsCrash(); void koreanWordWrap(); + void tooManyDirectionalCharctersCrash_qtbug77819(); private: QFont testFont; @@ -2330,5 +2331,21 @@ void tst_QTextLayout::koreanWordWrap() QCOMPARE(layout.lineAt(1).textLength(), 4); } +void tst_QTextLayout::tooManyDirectionalCharctersCrash_qtbug77819() +{ + QString data; + data += QString::fromUtf8("\xe2\x81\xa8"); // U+2068 FSI character + data += QString::fromUtf8("\xe2\x81\xa7"); // U+2067 RLI character + + // duplicating the text + for (int i = 0; i < 10; i++) + data += data; + + // Nothing to test. It must not crash in beginLayout(). + QTextLayout tl(data); + tl.beginLayout(); + tl.endLayout(); +} + QTEST_MAIN(tst_QTextLayout) #include "tst_qtextlayout.moc" diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp index e24a06bc34..c264956d7b 100644 --- a/tests/auto/network/access/http2/tst_http2.cpp +++ b/tests/auto/network/access/http2/tst_http2.cpp @@ -477,6 +477,9 @@ void tst_Http2::goaway_data() // - server waits for some time (enough for ur to init several streams on a // client side); then suddenly it replies with GOAWAY, never processing any // request. + if (clearTextHTTP2) + QSKIP("This test requires TLS with ALPN to work"); + QTest::addColumn<int>("responseTimeoutMS"); QTest::newRow("ImmediateGOAWAY") << 0; QTest::newRow("DelayedGOAWAY") << 1000; diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp index 032580e0f6..fbf906b55d 100644 --- a/tests/auto/other/lancelot/paintcommands.cpp +++ b/tests/auto/other/lancelot/paintcommands.cpp @@ -1010,7 +1010,10 @@ void PaintCommands::command_drawPixmap(QRegularExpressionMatch re) qPrintable(re.captured(1)), pm.width(), pm.height(), pm.depth(), tx, ty, tw, th, sx, sy, sw, sh); - m_painter->drawPixmap(QRectF(tx, ty, tw, th), pm, QRectF(sx, sy, sw, sh)); + if (!re.capturedLength(4)) // at most two coordinates specified + m_painter->drawPixmap(QPointF(tx, ty), pm); + else + m_painter->drawPixmap(QRectF(tx, ty, tw, th), pm, QRectF(sx, sy, sw, sh)); } /***************************************************************************************************/ @@ -1057,7 +1060,10 @@ void PaintCommands::command_drawImage(QRegularExpressionMatch re) printf(" -(lance) drawImage('%s' dim=(%d, %d), (%f, %f, %f, %f), (%f, %f, %f, %f)\n", qPrintable(re.captured(1)), im.width(), im.height(), tx, ty, tw, th, sx, sy, sw, sh); - m_painter->drawImage(QRectF(tx, ty, tw, th), im, QRectF(sx, sy, sw, sh), Qt::OrderedDither | Qt::OrderedAlphaDither); + if (!re.capturedLength(4)) // at most two coordinates specified + m_painter->drawImage(QPointF(tx, ty), im); + else + m_painter->drawImage(QRectF(tx, ty, tw, th), im, QRectF(sx, sy, sw, sh)); } /***************************************************************************************************/ diff --git a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp index 8c262ff3a5..84120c70e9 100644 --- a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp +++ b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp @@ -115,6 +115,7 @@ private slots: void context(); void duplicatedShortcutOverride(); void shortcutToFocusProxy(); + void deleteLater(); protected: static Qt::KeyboardModifiers toButtons( int key ); @@ -1263,5 +1264,14 @@ void tst_QShortcut::shortcutToFocusProxy() QCOMPARE(le.text(), QString()); } +void tst_QShortcut::deleteLater() +{ + QWidget w; + QPointer<QShortcut> sc(new QShortcut(QKeySequence(Qt::Key_1), &w)); + sc->deleteLater(); + QTRY_VERIFY(!sc); +} + + QTEST_MAIN(tst_QShortcut) #include "tst_qshortcut.moc" |