summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel')
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp18
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp6
2 files changed, 19 insertions, 5 deletions
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index d5fea19c41..7f3c289fb4 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -96,6 +96,7 @@ private slots:
void taskQTBUG_40609_addingWidgetToItsOwnLayout();
void taskQTBUG_40609_addingLayoutToItself();
void replaceWidget();
+ void dontCrashWhenExtendsToEnd();
private:
QWidget *testWidget;
@@ -1728,5 +1729,22 @@ void tst_QGridLayout::replaceWidget()
}
}
+void tst_QGridLayout::dontCrashWhenExtendsToEnd()
+{
+ QWidget window;
+ window.resize(320,200);
+ QWidget parent(&window);
+ QLabel *lbl0 = new QLabel(QLatin1String("lbl0:"));
+ QLabel *lbl1 = new QLabel(QLatin1String("lbl1:"));
+ QPushButton *pb = new QPushButton(QLatin1String("pb1"));
+ QGridLayout *l = new QGridLayout(&parent);
+ l->addWidget(lbl0, 0, 0);
+ l->addWidget(lbl1, 1, 0);
+ // adding an item in the bottom right corner than spans to the end (!)...
+ l->addWidget(pb, 1, 1, -1, -1);
+ // ...should not cause a crash when the items are distributed....
+ l->setGeometry(QRect(0, 0, 200, 50)); // DONT CRASH HERE
+}
+
QTEST_MAIN(tst_QGridLayout)
#include "tst_qgridlayout.moc"
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 587fa250c4..d717f26c52 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -2166,8 +2166,6 @@ public:
void tst_QWidget::resizeEvent()
{
- QSKIP("QTBUG-30744");
-
{
QWidget wParent;
wParent.resize(200, 200);
@@ -3239,7 +3237,7 @@ void tst_QWidget::restoreVersion1Geometry()
widget.showNormal();
QTest::qWait(10);
- if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ if (m_platform == QStringLiteral("xcb"))
QSKIP("QTBUG-26421");
if (expectedWindowState != Qt::WindowNoState) {
@@ -3680,8 +3678,6 @@ void tst_QWidget::optimizedResizeMove()
void tst_QWidget::optimizedResize_topLevel()
{
- QSKIP("We do not yet have static contents support, see QTBUG-28012");
-
StaticWidget topLevel;
topLevel.gotPaintEvent = false;
topLevel.show();