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/qaction/BLACKLIST2
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp6
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/BLACKLIST2
-rw-r--r--tests/auto/widgets/kernel/qapplication/BLACKLIST2
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/BLACKLIST2
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp2
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp4
-rw-r--r--tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp2
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp6
-rw-r--r--tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp2
-rw-r--r--tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp2
-rw-r--r--tests/auto/widgets/kernel/qtooltip/BLACKLIST4
-rw-r--r--tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp4
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST18
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp23
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/BLACKLIST4
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp10
17 files changed, 35 insertions, 60 deletions
diff --git a/tests/auto/widgets/kernel/qaction/BLACKLIST b/tests/auto/widgets/kernel/qaction/BLACKLIST
deleted file mode 100644
index 1ad524fdbf..0000000000
--- a/tests/auto/widgets/kernel/qaction/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[setStandardKeys]
-linux
diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
index ac0174d19a..ddf9ccb416 100644
--- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
+++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
@@ -240,7 +240,7 @@ void tst_QAction::setStandardKeys()
expected << ctrlC << ctrlInsert;
break;
default: // X11
- expected << ctrlC << QKeySequence(QStringLiteral("F16")) << ctrlInsert;
+ expected << ctrlC << ctrlInsert << QKeySequence(QStringLiteral("F16"));
break;
}
@@ -354,7 +354,7 @@ void tst_QAction::enabledVisibleInteraction()
void tst_QAction::task200823_tooltip()
{
- const QScopedPointer<QAction> action(new QAction("foo", Q_NULLPTR));
+ const QScopedPointer<QAction> action(new QAction("foo", nullptr));
QString shortcut("ctrl+o");
action->setShortcut(shortcut);
@@ -368,7 +368,7 @@ void tst_QAction::task200823_tooltip()
void tst_QAction::task229128TriggeredSignalWithoutActiongroup()
{
// test without a group
- const QScopedPointer<QAction> actionWithoutGroup(new QAction("Test", Q_NULLPTR));
+ const QScopedPointer<QAction> actionWithoutGroup(new QAction("Test", nullptr));
QSignalSpy spyWithoutGroup(actionWithoutGroup.data(), SIGNAL(triggered(bool)));
QCOMPARE(spyWithoutGroup.count(), 0);
actionWithoutGroup->trigger();
diff --git a/tests/auto/widgets/kernel/qactiongroup/BLACKLIST b/tests/auto/widgets/kernel/qactiongroup/BLACKLIST
deleted file mode 100644
index fdc424b6ac..0000000000
--- a/tests/auto/widgets/kernel/qactiongroup/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[QTBUG_14292_filesystem]
-linux
diff --git a/tests/auto/widgets/kernel/qapplication/BLACKLIST b/tests/auto/widgets/kernel/qapplication/BLACKLIST
deleted file mode 100644
index f4a9cb6166..0000000000
--- a/tests/auto/widgets/kernel/qapplication/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[quitOnLastWindowClosed]
-osx-10.10
diff --git a/tests/auto/widgets/kernel/qapplication/test/BLACKLIST b/tests/auto/widgets/kernel/qapplication/test/BLACKLIST
deleted file mode 100644
index f4a9cb6166..0000000000
--- a/tests/auto/widgets/kernel/qapplication/test/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[quitOnLastWindowClosed]
-osx-10.10
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 6ff38abdb8..c70ac0309f 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -2214,7 +2214,7 @@ void tst_QApplication::staticFunctions()
QApplication::activeModalWidget();
QApplication::focusWidget();
QApplication::activeWindow();
- QApplication::setActiveWindow(Q_NULLPTR);
+ QApplication::setActiveWindow(nullptr);
QApplication::widgetAt(QPoint(0, 0));
QApplication::topLevelAt(QPoint(0, 0));
QApplication::setGlobalStrut(QSize(0, 0));
diff --git a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
index 7262817d23..2f1a305710 100644
--- a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
+++ b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
@@ -293,7 +293,7 @@ void tst_QBoxLayout::taskQTBUG_40609_addingWidgetToItsOwnLayout(){
layout.setObjectName("ef9e2b42298e0e6420105bb");
QTest::ignoreMessage(QtWarningMsg, "QLayout: Cannot add a null widget to QVBoxLayout/ef9e2b42298e0e6420105bb");
- layout.addWidget(Q_NULLPTR);
+ layout.addWidget(nullptr);
QCOMPARE(layout.count(), 0);
QTest::ignoreMessage(QtWarningMsg, "QLayout: Cannot add parent widget QWidget/347b469225a24a0ef05150a to its child layout QVBoxLayout/ef9e2b42298e0e6420105bb");
@@ -309,7 +309,7 @@ void tst_QBoxLayout::taskQTBUG_40609_addingLayoutToItself(){
layout.setObjectName("cc751dd0f50f62b05a62da");
QTest::ignoreMessage(QtWarningMsg, "QLayout: Cannot add a null layout to QVBoxLayout/cc751dd0f50f62b05a62da");
- layout.addLayout(Q_NULLPTR);
+ layout.addLayout(nullptr);
QCOMPARE(layout.count(), 0);
QTest::ignoreMessage(QtWarningMsg, "QLayout: Cannot add layout QVBoxLayout/cc751dd0f50f62b05a62da to itself");
diff --git a/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp b/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp
index c3ebb838bb..bcf48c21df 100644
--- a/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp
+++ b/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp
@@ -84,7 +84,7 @@ public:
{ return m_receivedGestures.value(gestureType); }
protected:
- bool event(QEvent * event) Q_DECL_OVERRIDE;
+ bool event(QEvent * event) override;
private:
typedef QHash<Qt::GestureType, bool> GestureTypeHash;
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index 37e2bdb069..40a2319910 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -336,7 +336,7 @@ void tst_QGridLayout::setMinAndMaxSize()
layout.removeItem(spacer);
delete spacer;
- spacer = Q_NULLPTR;
+ spacer = nullptr;
rightChild.hide();
QApplication::sendPostedEvents(0, 0);
@@ -1624,7 +1624,7 @@ void tst_QGridLayout::taskQTBUG_40609_addingWidgetToItsOwnLayout(){
layout.setObjectName("d631e91a35f2b66a6dff35");
QTest::ignoreMessage(QtWarningMsg, "QLayout: Cannot add a null widget to QGridLayout/d631e91a35f2b66a6dff35");
- layout.addWidget(Q_NULLPTR, 0, 0);
+ layout.addWidget(nullptr, 0, 0);
QCOMPARE(layout.count(), 0);
QTest::ignoreMessage(QtWarningMsg, "QLayout: Cannot add parent widget QWidget/9bb37ca762aeb7269b8 to its child layout QGridLayout/d631e91a35f2b66a6dff35");
@@ -1639,7 +1639,7 @@ void tst_QGridLayout::taskQTBUG_40609_addingLayoutToItself(){
layout.setObjectName("5d79e1b0aed83f100e3c2");
QTest::ignoreMessage(QtWarningMsg, "QLayout: Cannot add a null layout to QGridLayout/5d79e1b0aed83f100e3c2");
- layout.addLayout(Q_NULLPTR, 0, 0);
+ layout.addLayout(nullptr, 0, 0);
QCOMPARE(layout.count(), 0);
QTest::ignoreMessage(QtWarningMsg, "QLayout: Cannot add layout QGridLayout/5d79e1b0aed83f100e3c2 to itself");
diff --git a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
index 9d0c939d84..ff35b0cdb1 100644
--- a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
@@ -1105,7 +1105,7 @@ public:
int overrideCount;
- bool event(QEvent *e) Q_DECL_OVERRIDE
+ bool event(QEvent *e) override
{
if (e->type() == QEvent::ShortcutOverride)
overrideCount++;
diff --git a/tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp b/tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp
index d50f46cc16..eb3264be53 100644
--- a/tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp
+++ b/tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp
@@ -60,7 +60,7 @@ private:
struct PrettyPrint {
const char *m_s;
template <typename T>
- explicit PrettyPrint(const T &t) : m_s(Q_NULLPTR)
+ explicit PrettyPrint(const T &t) : m_s(nullptr)
{
using QT_PREPEND_NAMESPACE(QTest)::toString;
m_s = toString(t);
diff --git a/tests/auto/widgets/kernel/qtooltip/BLACKLIST b/tests/auto/widgets/kernel/qtooltip/BLACKLIST
deleted file mode 100644
index f8d062cc46..0000000000
--- a/tests/auto/widgets/kernel/qtooltip/BLACKLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-[whatsThis]
-ubuntu-14.04
-[task183679]
-opensuse-13.1
diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
index c163117ef3..86736bb082 100644
--- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
+++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
@@ -129,7 +129,7 @@ static QWidget *findWhatsThat()
if (widget->inherits("QWhatsThat"))
return widget;
}
- return Q_NULLPTR;
+ return nullptr;
}
void tst_QToolTip::whatsThis()
@@ -137,7 +137,7 @@ void tst_QToolTip::whatsThis()
qApp->setStyleSheet( "QWidget { font-size: 72px; }" );
QWhatsThis::showText(QPoint(0, 0), "This is text");
- QWidget *whatsthis = Q_NULLPTR;
+ QWidget *whatsthis = nullptr;
QTRY_VERIFY( (whatsthis = findWhatsThat()) );
QVERIFY(whatsthis->isVisible());
const int whatsThisHeight = whatsthis->height();
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;
diff --git a/tests/auto/widgets/kernel/qwidget_window/BLACKLIST b/tests/auto/widgets/kernel/qwidget_window/BLACKLIST
new file mode 100644
index 0000000000..d3bfaba433
--- /dev/null
+++ b/tests/auto/widgets/kernel/qwidget_window/BLACKLIST
@@ -0,0 +1,4 @@
+[tst_resize_count]
+# QTBUG-66345
+opensuse-42.3
+ubuntu-16.04
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index b76c4d35a8..9021be1515 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -214,12 +214,12 @@ class PaintTestWidget : public QWidget
public:
int paintEventCount;
- explicit PaintTestWidget(QWidget *parent = Q_NULLPTR)
+ explicit PaintTestWidget(QWidget *parent = nullptr)
: QWidget(parent)
, paintEventCount(0)
{}
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE
+ void paintEvent(QPaintEvent *event) override
{
++paintEventCount;
QWidget::paintEvent(event);
@@ -692,7 +692,7 @@ public:
int resizeCount;
protected:
- void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE
+ void resizeEvent(QResizeEvent *) override
{
resizeCount++;
}
@@ -759,7 +759,7 @@ public:
, moveCount(0)
{ }
- void moveEvent(QMoveEvent *) Q_DECL_OVERRIDE
+ void moveEvent(QMoveEvent *) override
{
moveCount++;
}
@@ -798,7 +798,7 @@ public:
}
protected:
- bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE
+ bool eventFilter(QObject *o, QEvent *e) override
{
if (e->type() == filterEventType())
++eventCount;