summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-10-25 07:21:05 +0200
committerLiang Qi <liang.qi@qt.io>2018-10-25 07:21:53 +0200
commite28e91ae99b8c3859899e04cc9370534c7c7b86d (patch)
treecca81b1e745be4f25aab78e8e917c2324594e539 /tests/auto/gui
parent5ea233ca6782eb27adf596515cb66ef3dadc1d5e (diff)
parentebfad73b4e44fe6db8059200da105b4b87888718 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: src/corelib/animation/qpropertyanimation.cpp src/gui/image/qicon.cpp tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp1
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp1
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp23
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp6
4 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index aa9a990fef..c2ec5b8925 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -1603,6 +1603,7 @@ void tst_QImageReader::supportsOption_data()
<< (QIntList() << QImageIOHandler::Gamma
<< QImageIOHandler::Description
<< QImageIOHandler::Quality
+ << QImageIOHandler::CompressionRatio
<< QImageIOHandler::Size
<< QImageIOHandler::ScaledSize);
}
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index a53c2ddb5b..77851cd7d0 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -408,6 +408,7 @@ void tst_QImageWriter::supportsOption_data()
<< (QIntList() << QImageIOHandler::Gamma
<< QImageIOHandler::Description
<< QImageIOHandler::Quality
+ << QImageIOHandler::CompressionRatio
<< QImageIOHandler::Size
<< QImageIOHandler::ScaledSize);
}
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 7c24bbaadd..9415908383 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -29,6 +29,7 @@
#include <qrasterwindow.h>
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformintegration.h>
+#include <qpa/qplatformwindow.h>
#include <private/qguiapplication_p.h>
#include <private/qhighdpiscaling_p.h>
#include <QtGui/QPainter>
@@ -114,6 +115,7 @@ private slots:
void cleanup();
void testBlockingWindowShownAfterModalDialog();
void generatedMouseMove();
+ void keepPendingUpdateRequests();
private:
QPoint m_availableTopLeft;
@@ -2451,6 +2453,27 @@ void tst_QWindow::generatedMouseMove()
QVERIFY(w.mouseMovedCount == 5);
}
+void tst_QWindow::keepPendingUpdateRequests()
+{
+ QRect geometry(m_availableTopLeft + QPoint(80, 80), m_testWindowSize);
+
+ Window window;
+ window.setGeometry(geometry);
+ window.show();
+ QCoreApplication::processEvents();
+ QTRY_VERIFY(window.isExposed());
+
+ window.requestUpdate();
+ window.close();
+ window.setVisible(true);
+
+ QPlatformWindow *platformWindow = window.handle();
+ QVERIFY(platformWindow);
+
+ QVERIFY(platformWindow->hasPendingUpdateRequest());
+ QTRY_VERIFY(!platformWindow->hasPendingUpdateRequest());
+}
+
#include <tst_qwindow.moc>
QTEST_MAIN(tst_QWindow)
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index df9e8dab71..7dbeb13aa7 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -1524,6 +1524,12 @@ void tst_QCssParser::gradient_data()
"spread: repeat, stop:0.2 rgb(1, 2, 3), stop:0.5 rgba(1, 2, 3, 4))" << "conical" << QPointF(4, 2) << QPointF()
<< 2 << qreal(0.2) << QColor(1, 2, 3) << qreal(0.5) << QColor(1, 2, 3, 4);
+ // spaces before first function parameter lead to parser errors
+ QTest::newRow("QTBUG-61795") <<
+ "selection-background-color: qconicalgradient( cx: 4, cy : 2, angle: 23, "
+ "spread: repeat, stop:0.2 rgb( 1, 2, 3), stop:0.5 rgba( 1, 2, 3, 4))" << "conical" << QPointF(4, 2) << QPointF()
+ << 2 << qreal(0.2) << QColor(1, 2, 3) << qreal(0.5) << QColor(1, 2, 3, 4);
+
/* won't pass: stop values are expected to be sorted
QTest::newRow("unsorted-stop") <<
"selection-background: lineargradient(x1:0, y1:0, x2:0, y2:1, "