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/qapplication/BLACKLIST3
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp2
-rw-r--r--tests/auto/widgets/kernel/qformlayout/qformlayout.pro2
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp13
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST10
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp18
6 files changed, 22 insertions, 26 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/BLACKLIST b/tests/auto/widgets/kernel/qapplication/BLACKLIST
index ac65a97c40..c68c7d6b14 100644
--- a/tests/auto/widgets/kernel/qapplication/BLACKLIST
+++ b/tests/auto/widgets/kernel/qapplication/BLACKLIST
@@ -1,4 +1,3 @@
[touchEventPropagation]
-opensuse-leap
# QTBUG-66745
-opensuse-42.3
+opensuse-leap
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 4f94e83c1c..367a5767c4 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -491,7 +491,7 @@ void tst_QApplication::lastWindowClosed()
QPointer<QDialog> dialog = new QDialog;
dialog->setWindowTitle(QLatin1String(QTest::currentTestFunction()) + QLatin1String("Dialog"));
QVERIFY(dialog->testAttribute(Qt::WA_QuitOnClose));
- QTimer::singleShot(1000, dialog, &QDialog::accept);
+ QTimer::singleShot(1000, dialog.data(), &QDialog::accept);
dialog->exec();
QVERIFY(dialog);
QCOMPARE(spy.count(), 0);
diff --git a/tests/auto/widgets/kernel/qformlayout/qformlayout.pro b/tests/auto/widgets/kernel/qformlayout/qformlayout.pro
index 617183fee6..0766b50f68 100644
--- a/tests/auto/widgets/kernel/qformlayout/qformlayout.pro
+++ b/tests/auto/widgets/kernel/qformlayout/qformlayout.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
TARGET = tst_qformlayout
-QT += widgets testlib testlib-private
+QT += widgets widgets-private testlib testlib-private
SOURCES += tst_qformlayout.cpp
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index ab32643061..c6760000f4 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -38,6 +38,9 @@
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
+
+#include <private/qdialog_p.h>
+
#include <QStyleFactory>
#include <QSharedPointer>
@@ -1196,22 +1199,20 @@ void tst_QFormLayout::layoutAlone()
void tst_QFormLayout::taskQTBUG_27420_takeAtShouldUnparentLayout()
{
QSharedPointer<QFormLayout> outer(new QFormLayout);
- QPointer<QFormLayout> inner = new QFormLayout;
+ QAutoPointer<QFormLayout> holder{new QFormLayout};
+ auto inner = holder.get();
outer->addRow(inner);
QCOMPARE(outer->count(), 1);
QCOMPARE(inner->parent(), outer.data());
QLayoutItem *item = outer->takeAt(0);
- QCOMPARE(item->layout(), inner.data());
+ QCOMPARE(item->layout(), inner);
QVERIFY(!item->layout()->parent());
outer.reset();
- if (inner)
- delete item; // success: a taken item/layout should not be deleted when the old parent is deleted
- else
- QVERIFY(!inner.isNull());
+ QVERIFY(holder); // a taken item/layout should not be deleted when the old parent is deleted
}
void tst_QFormLayout::taskQTBUG_40609_addingWidgetToItsOwnLayout(){
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST
index 02e97e4b4e..26f9ce1b85 100644
--- a/tests/auto/widgets/kernel/qwidget/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST
@@ -14,12 +14,9 @@ rhel-7.4
ubuntu-16.04
rhel-7.6
[focusProxyAndInputMethods]
-ubuntu-16.04
rhel-7.6
opensuse-leap
-ubuntu-18.04
-rhel-7.4
-opensuse-42.3
+ubuntu
[raise]
opensuse-leap
# QTBUG-68175
@@ -45,12 +42,9 @@ opensuse-leap
[moveInResizeEvent]
ubuntu-16.04
[multipleToplevelFocusCheck]
-ubuntu-16.04
rhel-7.6
opensuse-leap
-ubuntu-18.04
-rhel-7.4
-opensuse-42.3
+ubuntu
[windowState]
# QTBUG-75270
winrt
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index bfc2631842..51049ecd81 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -46,6 +46,7 @@
#include <qstylefactory.h>
#include <qdesktopwidget.h>
#include <private/qwidget_p.h>
+#include <private/qwidgetrepaintmanager_p.h>
#include <private/qapplication_p.h>
#include <private/qhighdpiscaling_p.h>
#include <qcalendarwidget.h>
@@ -1138,6 +1139,7 @@ void tst_QWidget::visible()
QVERIFY( !childWidget->isVisible() );
testWidget->show();
+ QVERIFY(testWidget->screen());
QVERIFY( testWidget->isVisible() );
QVERIFY( childWidget->isVisible() );
@@ -9564,7 +9566,7 @@ void tst_QWidget::destroyBackingStore()
QTRY_VERIFY(w.numPaintEvents > 0);
w.reset();
w.update();
- qt_widget_private(&w)->topData()->backingStoreTracker.create(&w);
+ qt_widget_private(&w)->topData()->repaintManager.reset(new QWidgetRepaintManager(&w));
w.update();
QApplication::processEvents();
@@ -9579,14 +9581,14 @@ void tst_QWidget::destroyBackingStore()
#endif // QT_BUILD_INTERNAL
// Helper function
-QWidgetBackingStore* backingStore(QWidget &widget)
+QWidgetRepaintManager* repaintManager(QWidget &widget)
{
- QWidgetBackingStore *backingStore = nullptr;
+ QWidgetRepaintManager *repaintManager = nullptr;
#ifdef QT_BUILD_INTERNAL
if (QTLWExtra *topExtra = qt_widget_private(&widget)->maybeTopData())
- backingStore = topExtra->backingStoreTracker.data();
+ repaintManager = topExtra->repaintManager.get();
#endif
- return backingStore;
+ return repaintManager;
}
// Tables of 5000 elements do not make sense on Windows Mobile.
@@ -9784,12 +9786,12 @@ class scrollWidgetWBS : public QWidget
public:
void deleteBackingStore()
{
- static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->backingStoreTracker.destroy();
+ static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->repaintManager.reset(nullptr);
}
void enableBackingStore()
{
- if (!static_cast<QWidgetPrivate*>(d_ptr.data())->maybeBackingStore()) {
- static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->backingStoreTracker.create(this);
+ if (!static_cast<QWidgetPrivate*>(d_ptr.data())->maybeRepaintManager()) {
+ static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->repaintManager.reset(new QWidgetRepaintManager(this));
static_cast<QWidgetPrivate*>(d_ptr.data())->invalidateBackingStore(this->rect());
repaint();
}