summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp18
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp14
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp11
-rw-r--r--tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp8
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp21
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp4
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py2
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp3
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp21
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp6
10 files changed, 44 insertions, 64 deletions
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 9d47bb2884..734b26cd65 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -1384,16 +1384,22 @@ void tst_QDir::absoluteFilePath_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<QString>("expectedFilePath");
- QTest::newRow("0") << "/etc" << "/passwd" << "/passwd";
- QTest::newRow("1") << "/etc" << "passwd" << "/etc/passwd";
- QTest::newRow("2") << "/" << "passwd" << "/passwd";
- QTest::newRow("3") << "relative" << "path" << QDir::currentPath() + "/relative/path";
- QTest::newRow("4") << "" << "" << QDir::currentPath();
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
- QTest::newRow("5") << "//machine" << "share" << "//machine/share";
+ QTest::newRow("UNC") << "//machine" << "share" << "//machine/share";
+ QTest::newRow("Drive") << "c:/side/town" << "/my/way/home" << "c:/my/way/home";
+#define DRIVE "Q:"
+#else
+#define DRIVE
#endif
+ QTest::newRow("0") << DRIVE "/etc" << "/passwd" << DRIVE "/passwd";
+ QTest::newRow("1") << DRIVE "/etc" << "passwd" << DRIVE "/etc/passwd";
+ QTest::newRow("2") << DRIVE "/" << "passwd" << DRIVE "/passwd";
+ QTest::newRow("3") << "relative" << "path" << QDir::currentPath() + "/relative/path";
+ QTest::newRow("4") << "" << "" << QDir::currentPath();
+
QTest::newRow("resource") << ":/prefix" << "foo.bar" << ":/prefix/foo.bar";
+#undef DRIVE
}
void tst_QDir::absoluteFilePath()
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index 9a338ad55a..fedb88f1a8 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -528,8 +528,16 @@ void tst_QPixmap::fill_transparent()
QVERIFY(pixmap.hasAlphaChannel());
}
+static bool isPlatformWayland()
+{
+ return QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive);
+}
+
void tst_QPixmap::mask()
{
+ if (isPlatformWayland())
+ QSKIP("Wayland: This fails. See QTBUG-66983.");
+
QPixmap pm(100, 100);
QBitmap bm(100, 100);
@@ -792,6 +800,9 @@ void tst_QPixmap::convertFromImageNoDetach()
void tst_QPixmap::convertFromImageNoDetach2()
{
+ if (isPlatformWayland())
+ QSKIP("Wayland: This fails. See QTBUG-66984.");
+
QPixmap randomPixmap(10, 10);
if (randomPixmap.handle()->classId() != QPlatformPixmap::RasterClass)
QSKIP("Test only valid for raster pixmaps");
@@ -1466,6 +1477,9 @@ void tst_QPixmap::fromImageReaderAnimatedGif()
void tst_QPixmap::task_246446()
{
+ if (isPlatformWayland())
+ QSKIP("Wayland: This fails. See QTBUG-66985.");
+
// This crashed without the bugfix in 246446
QPixmap pm(10, 10);
pm.fill(Qt::transparent); // force 32-bit depth
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
index 4f27aeb899..b5a69d920a 100644
--- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
+++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
@@ -35,9 +35,12 @@
#include <QtGui/QFont>
#include <QtGui/QPalette>
#include <QtGui/QStyleHints>
+#include <qpa/qplatformintegration.h>
#include <qpa/qwindowsysteminterface.h>
#include <qgenericplugin.h>
+#include <private/qguiapplication_p.h>
+
#if defined(Q_OS_QNX)
#include <QOpenGLContext>
#endif
@@ -203,8 +206,8 @@ void tst_QGuiApplication::focusObject()
int argc = 0;
QGuiApplication app(argc, 0);
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
QObject obj1, obj2, obj3;
const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry();
@@ -374,8 +377,8 @@ void tst_QGuiApplication::changeFocusWindow()
int argc = 0;
QGuiApplication app(argc, 0);
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry();
diff --git a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
index 509f8bd45f..15c905f943 100644
--- a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
+++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
@@ -186,8 +186,8 @@ void tst_qinputmethod::cursorRectangle()
{
QCOMPARE(qApp->inputMethod()->cursorRectangle(), QRectF());
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
DummyWindow window;
window.show();
@@ -284,8 +284,8 @@ void tst_qinputmethod::inputDirection()
void tst_qinputmethod::inputMethodAccepted()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
if (!QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive)
|| !QGuiApplication::platformName().compare(QLatin1String("offscreen"), Qt::CaseInsensitive)) {
diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
index 706c66ef14..d16d95500b 100644
--- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
@@ -317,9 +317,6 @@ void tst_QTouchEvent::touchDisabledByDefault()
void tst_QTouchEvent::touchEventAcceptedByDefault()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
-
// QWidget
{
// enabling touch events should automatically accept touch events
@@ -606,9 +603,6 @@ QPointF normalized(const QPointF &pos, const QRectF &rect)
void tst_QTouchEvent::basicRawEventTranslation()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
-
tst_QTouchEventWidget touchWidget;
touchWidget.setWindowTitle(QTest::currentTestFunction());
touchWidget.setAttribute(Qt::WA_AcceptTouchEvents);
@@ -733,9 +727,6 @@ void tst_QTouchEvent::basicRawEventTranslation()
void tst_QTouchEvent::multiPointRawEventTranslationOnTouchScreen()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
-
tst_QTouchEventWidget touchWidget;
touchWidget.setWindowTitle(QTest::currentTestFunction());
touchWidget.setAttribute(Qt::WA_AcceptTouchEvents);
@@ -962,9 +953,6 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchScreen()
void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
-
tst_QTouchEventWidget touchWidget;
touchWidget.setWindowTitle(QTest::currentTestFunction());
touchWidget.setAttribute(Qt::WA_AcceptTouchEvents);
@@ -1191,9 +1179,6 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
void tst_QTouchEvent::basicRawEventTranslationOfIds()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
-
tst_QTouchEventWidget touchWidget;
touchWidget.setWindowTitle(QTest::currentTestFunction());
touchWidget.setAttribute(Qt::WA_AcceptTouchEvents);
@@ -1311,9 +1296,6 @@ void tst_QTouchEvent::basicRawEventTranslationOfIds()
void tst_QTouchEvent::deleteInEventHandler()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
-
// QWidget
{
QWidget window;
@@ -1463,9 +1445,6 @@ void tst_QTouchEvent::deleteInEventHandler()
void tst_QTouchEvent::deleteInRawEventTranslation()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
-
tst_QTouchEventWidget touchWidget;
touchWidget.setWindowTitle(QTest::currentTestFunction());
touchWidget.setAttribute(Qt::WA_AcceptTouchEvents);
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index f77afd2364..1332b369e7 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -4016,12 +4016,12 @@ void tst_QSslSocket::signatureAlgorithm()
SslServer server;
server.protocol = serverProtocol;
server.config.setCiphers({QSslCipher("ECDHE-RSA-AES256-SHA")});
- server.config.setBackendConfigOption(QByteArrayLiteral("SignatureAlgorithms"), serverSigAlgPairs.join(':'));
+ server.config.setBackendConfigurationOption(QByteArrayLiteral("SignatureAlgorithms"), serverSigAlgPairs.join(':'));
QVERIFY(server.listen());
QSslConfiguration clientConfig = QSslConfiguration::defaultConfiguration();
clientConfig.setProtocol(clientProtocol);
- clientConfig.setBackendConfigOption(QByteArrayLiteral("SignatureAlgorithms"), clientSigAlgPairs.join(':'));
+ clientConfig.setBackendConfigurationOption(QByteArrayLiteral("SignatureAlgorithms"), clientSigAlgPairs.join(':'));
QSslSocket client;
client.setSslConfiguration(clientConfig);
socket = &client;
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index a959a71749..c059b83511 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -257,7 +257,7 @@ def main(name, *args):
# Avoid interference from any qtlogging.ini files, e.g. in
# /etc/xdg/QtProject/, (must match tst_selftests.cpp's
# processEnvironment()'s value):
- QT_LOGGING_RULES = '*.debug=true;qt.qpa.screen=false')
+ QT_LOGGING_RULES = '*.debug=true;qt.*=false')
herePath = os.getcwd()
cleaner = Cleaner(herePath, name)
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 8ac2ca7b90..1da1787c1d 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -417,7 +417,6 @@ tst_Selftests::tst_Selftests()
void tst_Selftests::initTestCase()
{
QVERIFY2(tempDir.isValid(), qPrintable(tempDir.errorString()));
- qputenv("QT_LOGGING_RULES", QByteArrayLiteral("*.debug=false")); // Silence any debug output
//Detect the location of the sub programs
QString subProgram = QLatin1String("float/float");
#if defined(Q_OS_WIN)
@@ -657,7 +656,7 @@ static QProcessEnvironment processEnvironment()
// Avoid interference from any qtlogging.ini files, e.g. in /etc/xdg/QtProject/:
result.insert(QStringLiteral("QT_LOGGING_RULES"),
// Must match generate_expected_output.py's main()'s value:
- QStringLiteral("*.debug=true;qt.qpa.screen=false"));
+ QStringLiteral("*.debug=true;qt.*=false"));
}
return result;
}
diff --git a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
index dfe5baba71..a1cb729849 100644
--- a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -52,7 +52,6 @@ private slots:
void boundingRect2();
void draw();
void opacity();
- void nestedOpaqueOpacity();
void grayscale();
void colorize();
void drawPixmapItem();
@@ -408,26 +407,6 @@ void tst_QGraphicsEffect::opacity()
QCOMPARE(effect->m_opacity, qreal(0.5));
}
-void tst_QGraphicsEffect::nestedOpaqueOpacity()
-{
- // QTBUG-60231: Nesting widgets with a QGraphicsEffect on a toplevel with
- // QGraphicsOpacityEffect caused crashes due to constructing several
- // QPainter instances on a device in the fast path for
- // QGraphicsOpacityEffect::opacity=1
- QWidget topLevel;
- topLevel.setWindowTitle(QTest::currentTestFunction());
- topLevel.resize(320, 200);
- QGraphicsOpacityEffect *opacityEffect = new QGraphicsOpacityEffect;
- opacityEffect->setOpacity(1);
- topLevel.setGraphicsEffect(opacityEffect);
- QWidget *child = new QWidget(&topLevel);
- child->resize(topLevel.size() / 2);
- QGraphicsDropShadowEffect *childEffect = new QGraphicsDropShadowEffect;
- child->setGraphicsEffect(childEffect);
- topLevel.show();
- QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
-}
-
void tst_QGraphicsEffect::grayscale()
{
if (qApp->desktop()->depth() < 24)
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index 812ca4b223..74a2f7f2b6 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -544,11 +544,11 @@ void tst_QHeaderView::movable()
view->setSectionsMovable(true);
QCOMPARE(view->sectionsMovable(), true);
- QCOMPARE(view->firstSectionMovable(), true);
+ QCOMPARE(view->isFirstSectionMovable(), true);
view->setFirstSectionMovable(false);
- QCOMPARE(view->firstSectionMovable(), false);
+ QCOMPARE(view->isFirstSectionMovable(), false);
view->setFirstSectionMovable(true);
- QCOMPARE(view->firstSectionMovable(), true);
+ QCOMPARE(view->isFirstSectionMovable(), true);
}
void tst_QHeaderView::clickable()