diff options
Diffstat (limited to 'tests/auto/gui/platform/qx11info/tst_qx11info.cpp')
-rw-r--r-- | tests/auto/gui/platform/qx11info/tst_qx11info.cpp | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/tests/auto/gui/platform/qx11info/tst_qx11info.cpp b/tests/auto/gui/platform/qx11info/tst_qx11info.cpp index 0cd11c87ac..a4effb07cc 100644 --- a/tests/auto/gui/platform/qx11info/tst_qx11info.cpp +++ b/tests/auto/gui/platform/qx11info/tst_qx11info.cpp @@ -1,31 +1,6 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Copyright (C) 2016 David Faure <david.faure@kdab.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// Copyright (C) 2016 David Faure <david.faure@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtGui> #include <QtTest/QtTest> @@ -112,6 +87,8 @@ void tst_QX11Info::startupId() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); // This relies on the fact that no widget was shown yet, // so please make sure this method is always the first test. @@ -133,6 +110,8 @@ void tst_QX11Info::isPlatformX11() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); QVERIFY(QX11Info::isPlatformX11()); } @@ -141,6 +120,8 @@ void tst_QX11Info::appTime() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); // No X11 event received yet QCOMPARE(QX11Info::appTime(), 0ul); @@ -367,6 +348,8 @@ void tst_QX11Info::peeker() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); PeekerTest test; test.show(); @@ -378,6 +361,8 @@ void tst_QX11Info::isCompositingManagerRunning() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); const bool b = QX11Info::isCompositingManagerRunning(); Q_UNUSED(b); const bool b2 = QX11Info::isCompositingManagerRunning(0); |