summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget')
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST18
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp23
2 files changed, 12 insertions, 29 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST
index 4cef2d57a4..2ca30f98c3 100644
--- a/tests/auto/widgets/kernel/qwidget/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST
@@ -1,30 +1,18 @@
# OSX QTBUG-25300 QTBUG-45502
[normalGeometry]
-ubuntu-14.04
ubuntu-16.04
[saveRestoreGeometry]
-ubuntu-14.04
ubuntu-16.04
b2qt
[restoreVersion1Geometry]
xcb
osx
[updateWhileMinimized]
-ubuntu-14.04
ubuntu-16.04
-rhel-7.1
-rhel-7.2
-rhel-7.3
rhel-7.4
osx
[focusProxyAndInputMethods]
linux
-[touchEventSynthesizedMouseEvent]
-ubuntu-14.04
-[grabMouse]
-ubuntu-14.04
-[largerThanScreen_QTBUG30142]
-ubuntu-14.04
[showMaximized]
osx
[setGeometry]
@@ -48,7 +36,6 @@ osx
[render_systemClip]
osx
[showMinimizedKeepsFocus]
-osx-10.10
osx-10.11 ci
osx-10.12 ci
[moveWindowInShowEvent:1]
@@ -61,10 +48,7 @@ osx
osx
[maskedUpdate]
osx
-opensuse-42.1
opensuse-42.3
-[hideWhenFocusWidgetIsChild]
-osx-10.10
[hideOpaqueChildWhileHidden]
osx
[resizeStaticContentsChildWidget_QTBUG35282]
@@ -76,7 +60,7 @@ osx
[setToolTip]
osx
[moveInResizeEvent]
-ubuntu-14.04
+ubuntu-16.04
[moveChild:right]
osx
[activateWindow]
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index cf2794903e..5a9c5dd175 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -3706,7 +3706,7 @@ public:
gotPaintEvent = true;
// qDebug() << "paint" << e->region();
// Look for a full update, set partial to false if found.
- foreach(QRect r, e->region().rects()) {
+ for (QRect r : e->region()) {
partial = (r != rect());
if (partial == false)
break;
@@ -5145,13 +5145,12 @@ static QPixmap grabWindow(QWindow *window, int x, int y, int width, int height)
bool verifyColor(QWidget &child, const QRegion &region, const QColor &color, unsigned int callerLine)
{
- const QRegion r = QRegion(region);
QWindow *window = child.window()->windowHandle();
Q_ASSERT(window);
const QPoint offset = child.mapTo(child.window(), QPoint(0,0));
bool grabBackingStore = false;
- for (int i = 0; i < r.rects().size(); ++i) {
- QRect rect = r.rects().at(i).translated(offset);
+ for (QRect r : region) {
+ QRect rect = r.translated(offset);
for (int t = 0; t < 6; t++) {
const QPixmap pixmap = grabBackingStore
? child.grab(rect)
@@ -5176,7 +5175,7 @@ bool verifyColor(QWidget &child, const QRegion &region, const QColor &color, uns
} else {
if (t == 4) {
grabBackingStore = true;
- rect = r.rects().at(i);
+ rect = r;
} else {
QTest::qWait(200);
}
@@ -6065,7 +6064,7 @@ public:
startTimer(1000);
}
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE
+ void timerEvent(QTimerEvent *) override
{
switch (state++) {
case 0:
@@ -6088,7 +6087,7 @@ public:
return false;
}
- bool nativeEvent(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE
+ bool nativeEvent(const QByteArray &eventType, void *message, long *) override
{
if (isMapNotify(eventType, message))
gotExpectedMapNotify = true;
@@ -6096,7 +6095,7 @@ public:
}
// QAbstractNativeEventFilter interface
- bool nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE
+ bool nativeEventFilter(const QByteArray &eventType, void *message, long *) override
{
if (isMapNotify(eventType, message))
gotExpectedGlobalEvent = true;
@@ -8222,7 +8221,7 @@ public:
QPainter p(this);
paintedRegion += event->region();
- foreach(QRect r, event->region().rects())
+ for (const QRect &r : event->region())
p.fillRect(r, Qt::red);
}
@@ -8733,7 +8732,7 @@ public:
QPainter p(this);
paintedRegion += event->region();
- foreach(QRect r, event->region().rects())
+ for (const QRect &r : event->region())
p.fillRect(r, Qt::red);
}
@@ -10521,7 +10520,7 @@ public slots:
QTimer::singleShot(100, this, SLOT(doMouseMoves()));
modal->exec();
delete modal;
- modal = Q_NULLPTR;
+ modal = nullptr;
}
void doMouseMoves()
@@ -10594,7 +10593,7 @@ class KeyboardWidget : public QWidget
{
public:
KeyboardWidget(QWidget* parent = 0) : QWidget(parent), m_eventCounter(0) {}
- virtual void mousePressEvent(QMouseEvent* ev) Q_DECL_OVERRIDE {
+ virtual void mousePressEvent(QMouseEvent* ev) override {
m_modifiers = ev->modifiers();
m_appModifiers = QApplication::keyboardModifiers();
++m_eventCounter;