summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qtabbar/tst_qtabbar.cpp6
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp8
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp25
3 files changed, 38 insertions, 1 deletions
diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp
index 2db72b9..e83312d 100644
--- a/tests/auto/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/qtabbar/tst_qtabbar.cpp
@@ -295,6 +295,10 @@ void tst_QTabBar::setUsesScrollButtons()
if (usesArrows != -128)
tabBar.setUsesScrollButtons(usesArrows);
QTEST(tabBar.usesScrollButtons(), "expectedArrows");
+
+ // Make sure style sheet does not override user set mode
+ tabBar.setStyleSheet("QWidget { background-color: #ABA8A6;}");
+ QTEST(tabBar.usesScrollButtons(), "expectedArrows");
}
void tst_QTabBar::removeLastTab()
@@ -532,7 +536,7 @@ void tst_QTabBar::task251184_removeTab()
QCOMPARE(bar.count(), 1);
QCOMPARE(bar.currentIndex(), 0);
- QCOMPARE(bar.tabText(bar.currentIndex()), QString("bar2"));
+ QCOMPARE(bar.tabText(bar.currentIndex()), QString("bar2"));
}
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 46c3fb6..50d6c67 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -3016,6 +3016,14 @@ void tst_QTableView::spans_data()
<< QPoint(2, 0)
<< 1
<< 2;
+
+ QTest::newRow("QTBUG-6004: No failing Q_ASSERT, then it passes.")
+ << 5 << 5
+ << (SpanList() << QRect(0, 0, 2, 2) << QRect(0, 0, 1, 1))
+ << false
+ << QPoint(0, 0)
+ << 1
+ << 1;
}
void tst_QTableView::spans()
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 9692c6e..1e3f5f8 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -384,6 +384,8 @@ private slots:
void activateWindow();
+ void openModal_taskQTBUG_5804();
+
#ifdef Q_OS_SYMBIAN
void cbaVisibility();
#endif
@@ -9583,6 +9585,29 @@ void tst_QWidget::activateWindow()
QTRY_VERIFY(!mainwindow2->isActiveWindow());
}
+void tst_QWidget::openModal_taskQTBUG_5804()
+{
+ class Widget : public QWidget
+ {
+ public:
+ Widget(QWidget *parent) : QWidget(parent)
+ {
+ }
+ ~Widget()
+ {
+ QMessageBox msgbox;
+ QTimer::singleShot(10, &msgbox, SLOT(accept()));
+ msgbox.exec(); //open a modal dialog
+ }
+ };
+
+ QWidget *win = new QWidget;
+ new Widget(win);
+ win->show();
+ QTest::qWaitForWindowShown(win);
+ delete win;
+}
+
#ifdef Q_OS_SYMBIAN
void tst_QWidget::cbaVisibility()
{