summaryrefslogtreecommitdiffstats
path: root/tests/manual/diaglib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/diaglib')
-rw-r--r--tests/manual/diaglib/debugproxystyle.cpp53
-rw-r--r--tests/manual/diaglib/debugproxystyle.h29
-rw-r--r--tests/manual/diaglib/eventfilter.cpp61
-rw-r--r--tests/manual/diaglib/eventfilter.h29
-rw-r--r--tests/manual/diaglib/glinfo.cpp63
-rw-r--r--tests/manual/diaglib/glinfo.h29
-rw-r--r--tests/manual/diaglib/logwidget.cpp41
-rw-r--r--tests/manual/diaglib/logwidget.h29
-rw-r--r--tests/manual/diaglib/nativewindowdump.cpp38
-rw-r--r--tests/manual/diaglib/nativewindowdump.h29
-rw-r--r--tests/manual/diaglib/nativewindowdump_win.cpp33
-rw-r--r--tests/manual/diaglib/qwidgetdump.cpp56
-rw-r--r--tests/manual/diaglib/qwidgetdump.h29
-rw-r--r--tests/manual/diaglib/qwindowdump.cpp73
-rw-r--r--tests/manual/diaglib/qwindowdump.h29
-rw-r--r--tests/manual/diaglib/textdump.cpp61
-rw-r--r--tests/manual/diaglib/textdump.h29
17 files changed, 63 insertions, 648 deletions
diff --git a/tests/manual/diaglib/debugproxystyle.cpp b/tests/manual/diaglib/debugproxystyle.cpp
index 002220507b..39aad93d17 100644
--- a/tests/manual/diaglib/debugproxystyle.cpp
+++ b/tests/manual/diaglib/debugproxystyle.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "debugproxystyle.h"
#include "eventfilter.h"
@@ -34,37 +9,21 @@
#include <QStyleOption>
#include <QApplication>
-#if QT_VERSION < 0x050000
-QDebug operator<<(QDebug d, const QPixmap &p)
-{
- d << "QPixmap(" << p.size() << ')';
- return d;
-}
-#endif // QT_VERSION < 0x050000
-
QDebug operator<<(QDebug debug, const QStyleOption *option)
{
-#if QT_VERSION >= 0x050000
QDebugStateSaver saver(debug);
-# if QT_VERSION >= 0x050400
debug.noquote();
-# endif
debug.nospace();
-#endif
if (!option) {
debug << "QStyleOption(0)";
return debug;
}
if (const QStyleOptionViewItem *ivo = qstyleoption_cast<const QStyleOptionViewItem *>(option)) {
debug << "QStyleOptionViewItem(";
-#if QT_VERSION >= 0x050000
debug << ivo->index;
if (const int textSize = ivo->text.size())
debug << ", \"" << (textSize < 20 ? ivo->text : ivo->text.left(20) + QLatin1String("...")) << '"';
debug << ", ";
-#else // Qt 5
- Q_UNUSED(ivo);
-#endif
} else {
debug << "QStyleOption(";
}
@@ -72,10 +31,8 @@ QDebug operator<<(QDebug debug, const QStyleOption *option)
<< option->rect.x() << option->rect.y() << Qt::noforcesign;
if (option->state != QStyle::State_None)
debug << ", state=" << option->state;
-#if QT_VERSION >= 0x050000
if (option->styleObject && !option->styleObject->isWidgetType())
debug << ", styleObject=" << QtDiag::formatQObject(option->styleObject);
-#endif
debug << ')';
return debug;
}
@@ -84,15 +41,9 @@ namespace QtDiag {
DebugProxyStyle::DebugProxyStyle(QStyle *style) : QProxyStyle(style)
{
-#if QT_VERSION >= 0x050000
const qreal devicePixelRatio = qApp->devicePixelRatio();
-#else
- const qreal devicePixelRatio = 1;
-#endif
qDebug() << __FUNCTION__ << QT_VERSION_STR
-#if QT_VERSION >= 0x050000
<< QGuiApplication::platformName()
-#endif
<< style->objectName() << "devicePixelRatio=" << devicePixelRatio;
}
diff --git a/tests/manual/diaglib/debugproxystyle.h b/tests/manual/diaglib/debugproxystyle.h
index 51bf79374e..160693a452 100644
--- a/tests/manual/diaglib/debugproxystyle.h
+++ b/tests/manual/diaglib/debugproxystyle.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef DEBUGPROXYSTYLE_H
#define DEBUGPROXYSTYLE_H
diff --git a/tests/manual/diaglib/eventfilter.cpp b/tests/manual/diaglib/eventfilter.cpp
index b99d4099e3..e7896c278b 100644
--- a/tests/manual/diaglib/eventfilter.cpp
+++ b/tests/manual/diaglib/eventfilter.cpp
@@ -1,47 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "eventfilter.h"
#include <QtGui/QMouseEvent>
#include <QtCore/QDebug>
#include <QtCore/QTextStream>
-#if QT_VERSION >= 0x050000
-# if defined(QT_WIDGETS_LIB)
-# define HAVE_APPLICATION
-# endif
-# if defined(QT_GUI_LIB)
-# define HAVE_GUI_APPLICATION
-# endif
-#else // Qt 5
-# if defined(QT_GUI_LIB)
-# define HAVE_APPLICATION
-# endif
+#if defined(QT_WIDGETS_LIB)
+# define HAVE_APPLICATION
+#endif
+#if defined(QT_GUI_LIB)
+# define HAVE_GUI_APPLICATION
#endif
#ifdef HAVE_APPLICATION
@@ -82,9 +51,7 @@ void EventFilter::init(EventCategories eventCategories)
m_eventTypes << QEvent::MouseMove << QEvent::NonClientAreaMouseMove;
if (eventCategories & TouchEvents) {
m_eventTypes << QEvent::TouchBegin << QEvent::TouchUpdate << QEvent::TouchEnd;
-#if QT_VERSION >= 0x050000
m_eventTypes << QEvent::TouchCancel;
-#endif
}
if (eventCategories & TabletEvents) {
m_eventTypes << QEvent::TabletEnterProximity << QEvent::TabletLeaveProximity
@@ -100,9 +67,7 @@ void EventFilter::init(EventCategories eventCategories)
}
if (eventCategories & FocusEvents) {
m_eventTypes
-#if QT_VERSION >= 0x050000
<< QEvent::FocusAboutToChange
-#endif
<< QEvent::FocusIn << QEvent::FocusOut;
}
if (eventCategories & GeometryEvents)
@@ -110,17 +75,13 @@ void EventFilter::init(EventCategories eventCategories)
if (eventCategories & PaintEvents) {
m_eventTypes << QEvent::UpdateRequest << QEvent::Paint
<< QEvent::Show << QEvent::Hide;
-#if QT_VERSION >= 0x050000
m_eventTypes << QEvent::Expose;
-#endif
}
if (eventCategories & StateChangeEvents) {
m_eventTypes
<< QEvent::WindowStateChange
<< QEvent::WindowBlocked << QEvent::WindowUnblocked
-#if QT_VERSION >= 0x050000
<< QEvent::ApplicationStateChange
-#endif
<< QEvent::ApplicationActivate << QEvent::ApplicationDeactivate;
}
if (eventCategories & TimerEvents)
@@ -131,9 +92,7 @@ void EventFilter::init(EventCategories eventCategories)
}
if (eventCategories & InputMethodEvents) {
m_eventTypes << QEvent::InputMethod;
-#if QT_VERSION >= 0x050000
m_eventTypes << QEvent::InputMethodQuery;
-#endif
}
#ifndef QT_NO_GESTURES
if (eventCategories & GestureEvents) {
@@ -147,10 +106,8 @@ static inline bool matchesType(const QObject *o, EventFilter::ObjectTypes types)
{
if (o->isWidgetType())
return types & EventFilter::QWidgetType;
-#if QT_VERSION >= 0x050000
if (o->isWindowType())
return types & EventFilter::QWindowType;
-#endif
return types & EventFilter::OtherType;
}
@@ -215,9 +172,7 @@ bool EventFilter::eventFilter(QObject *o, QEvent *e)
formatObject(o, debug);
debug << ' ' << e;
switch (e->type()) {
-#if QT_VERSION >= 0x050000
case QEvent::FocusAboutToChange:
-#endif
case QEvent::FocusIn:
formatApplicationState(debug);
break;
@@ -230,9 +185,7 @@ bool EventFilter::eventFilter(QObject *o, QEvent *e)
case QEvent::NonClientAreaMouseButtonPress:
case QEvent::NonClientAreaMouseButtonRelease:
case QEvent::NonClientAreaMouseMove:
-# if QT_VERSION >= 0x050000
case QEvent::Enter:
-# endif
case QEvent::Leave:
formatMouseState(o, debug);
break;
diff --git a/tests/manual/diaglib/eventfilter.h b/tests/manual/diaglib/eventfilter.h
index a8740bb4e9..9db4918381 100644
--- a/tests/manual/diaglib/eventfilter.h
+++ b/tests/manual/diaglib/eventfilter.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef _EVENTFILTER_
#define _EVENTFILTER_
diff --git a/tests/manual/diaglib/glinfo.cpp b/tests/manual/diaglib/glinfo.cpp
index d8aec5298a..1abd4dd731 100644
--- a/tests/manual/diaglib/glinfo.cpp
+++ b/tests/manual/diaglib/glinfo.cpp
@@ -1,53 +1,20 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "glinfo.h"
#include <QOpenGLFunctions>
#include <QtOpenGLWidgets/QOpenGLWidget>
-#if QT_VERSION > 0x050000
-# if QT_VERSION >= 0x050400
-# include <QtOpenGL/QOpenGLWindow>
-# else // 5.4
-# include <QtGui/QWindow>
-# endif // 5.0..5.4
-# include <QtGui/QOpenGLContext>
-# include <QtGui/QOpenGLFunctions>
-# include <QtGui/QWindow>
-#endif
+#include <QtOpenGL/QOpenGLWindow>
+#include <QtGui/QOpenGLContext>
+#include <QtGui/QOpenGLFunctions>
+#include <QtGui/QWindow>
#include <QtCore/QDebug>
#include <QtCore/QString>
#include <QtCore/QTimer>
namespace QtDiag {
-#if QT_VERSION > 0x050000
-
static QString getGlString(const QOpenGLContext *ctx, GLenum name)
{
if (const GLubyte *p = ctx->functions()->glGetString(name))
@@ -64,7 +31,6 @@ static QString glInfo(const QOpenGLContext *ctx)
QString glInfo(const QObject *o)
{
-# if QT_VERSION >= 0x050400
if (o->isWindowType()) {
if (const QOpenGLWindow *oglw = qobject_cast<const QOpenGLWindow *>(o))
return glInfo(oglw->context());
@@ -74,25 +40,8 @@ QString glInfo(const QObject *o)
if (o->isWidgetType()) {
if (const QOpenGLWidget *g = qobject_cast<const QOpenGLWidget *>(o))
return glInfo(g->context());
-# endif // 5.4
}
return QString();
}
-#else // Qt4:
-
-static QString getGlString(GLenum name)
-{
- if (const GLubyte *p = glGetString(name))
- return QString::fromLatin1(reinterpret_cast<const char *>(p));
- return QString();
-}
-
-QString glInfo(const QObject *)
-{
- return getGlString(GL_VENDOR) + QLatin1Char('\n') + getGlString(GL_RENDERER);
-}
-
-#endif
-
} // namespace QtDiag
diff --git a/tests/manual/diaglib/glinfo.h b/tests/manual/diaglib/glinfo.h
index 2903a98d2f..d633ae8a2f 100644
--- a/tests/manual/diaglib/glinfo.h
+++ b/tests/manual/diaglib/glinfo.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef _GLINFO_
#define _GLINFO_
diff --git a/tests/manual/diaglib/logwidget.cpp b/tests/manual/diaglib/logwidget.cpp
index 0089664a60..e49a78d454 100644
--- a/tests/manual/diaglib/logwidget.cpp
+++ b/tests/manual/diaglib/logwidget.cpp
@@ -1,41 +1,14 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "logwidget.h"
-#if QT_VERSION >= 0x050000
-# include <QtCore/qlogging.h>
-# include <QtCore/QLibraryInfo>
-#endif
#include <QApplication>
#include <QStyle>
#include <QtCore/QDebug>
+#include <QtCore/QLibraryInfo>
#include <QtCore/QList>
+#include <QtCore/qlogging.h>
#include <QtCore/QStringList>
#include <iostream>
@@ -60,19 +33,13 @@ LogWidget::~LogWidget()
QString LogWidget::startupMessage()
{
QString result;
-#if QT_VERSION >= 0x050300
result += QLatin1String(QLibraryInfo::build());
-#else
- result += QLatin1String("Qt ") + QLatin1String(QT_VERSION_STR);
-#endif
const QCoreApplication *coreApp = QCoreApplication::instance();
-#if QT_VERSION >= 0x050000
if (qobject_cast<const QGuiApplication *>(coreApp)) {
result += QLatin1Char(' ');
result += QGuiApplication::platformName();
}
-#endif
if (qobject_cast<const QApplication *>(coreApp)) {
result += QLatin1Char(' ');
result += QApplication::style()->objectName();
diff --git a/tests/manual/diaglib/logwidget.h b/tests/manual/diaglib/logwidget.h
index b1ce43f231..921cc5be71 100644
--- a/tests/manual/diaglib/logwidget.h
+++ b/tests/manual/diaglib/logwidget.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** 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) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef LOGWIDGET_H
#define LOGWIDGET_H
diff --git a/tests/manual/diaglib/nativewindowdump.cpp b/tests/manual/diaglib/nativewindowdump.cpp
index a854e8a790..d384f05d57 100644
--- a/tests/manual/diaglib/nativewindowdump.cpp
+++ b/tests/manual/diaglib/nativewindowdump.cpp
@@ -1,52 +1,22 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "nativewindowdump.h"
-#if QT_VERSION >= 0x050000
-# include <QtGui/QGuiApplication>
-# include <qpa/qplatformnativeinterface.h>
-#endif
-
+#include <QtGui/QGuiApplication>
+#include <qpa/qplatformnativeinterface.h>
#include <QtCore/QDebug>
namespace QtDiag {
void dumpNativeWindows(WId wid)
{
-#if QT_VERSION >= 0x050000
QPlatformNativeInterface *ni = QGuiApplication::platformNativeInterface();
QString result;
QMetaObject::invokeMethod(ni, "dumpNativeWindows", Qt::DirectConnection,
Q_RETURN_ARG(QString, result),
Q_ARG(WId, wid));
qDebug().noquote() << result;
-#endif // Qt 5
}
void dumpNativeQtTopLevels()
diff --git a/tests/manual/diaglib/nativewindowdump.h b/tests/manual/diaglib/nativewindowdump.h
index e848724b13..6fe2995dc8 100644
--- a/tests/manual/diaglib/nativewindowdump.h
+++ b/tests/manual/diaglib/nativewindowdump.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef _NATIVEWINDOWDUMP_
#define _NATIVEWINDOWDUMP_
diff --git a/tests/manual/diaglib/nativewindowdump_win.cpp b/tests/manual/diaglib/nativewindowdump_win.cpp
index 8fbd634937..b2f8be861b 100644
--- a/tests/manual/diaglib/nativewindowdump_win.cpp
+++ b/tests/manual/diaglib/nativewindowdump_win.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "nativewindowdump.h"
#include "qwindowdump.h"
@@ -262,11 +237,7 @@ static void dumpNativeWindows(const WIdVector& wins)
dc.stream = QSharedPointer<QTextStream>(new QTextStream(&s));
for (WId win : wins)
dumpNativeWindowRecursion(reinterpret_cast<HWND>(win), &dc);
-#if QT_VERSION >= 0x050400
qDebug().noquote() << s;
-#else
- qDebug("%s", qPrintable(s));
-#endif
}
void dumpNativeWindows(WId rootIn)
diff --git a/tests/manual/diaglib/qwidgetdump.cpp b/tests/manual/diaglib/qwidgetdump.cpp
index b1d2a37d0e..9fd79d32d4 100644
--- a/tests/manual/diaglib/qwidgetdump.cpp
+++ b/tests/manual/diaglib/qwidgetdump.cpp
@@ -1,41 +1,15 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qwidgetdump.h"
-#include <QWidget>
-#if QT_VERSION > 0x050000
-# include <QtGui/QScreen>
-# include <QtGui/QWindow>
-#endif
#include <QApplication>
-#include <QtCore/QMetaObject>
+#include <QWidget>
+#include <QtGui/QScreen>
+#include <QtGui/QWindow>
+
#include <QtCore/QDebug>
+#include <QtCore/QMetaObject>
#include <QtCore/QTextStream>
namespace QtDiag {
@@ -99,11 +73,9 @@ static void dumpWidgetRecursion(QTextStream &str, const QWidget *w,
formatRect(str, w->geometry());
if (w->isWindow()) {
str << ' ' << w->logicalDpiX() << "DPI";
-#if QT_VERSION > 0x050600
const qreal dpr = w->devicePixelRatio();
if (!qFuzzyCompare(dpr, qreal(1)))
str << " dpr=" << dpr;
-#endif // Qt 5.6
const QRect normalGeometry = w->normalGeometry();
if (normalGeometry.isValid() && !normalGeometry.isEmpty() && normalGeometry != w->geometry()) {
str << " normal=";
@@ -130,13 +102,11 @@ static void dumpWidgetRecursion(QTextStream &str, const QWidget *w,
str << "maximumSize=" << maximumSize.width() << 'x' << maximumSize.height() << ' ';
}
str << '\n';
-#if QT_VERSION > 0x050000
if (const QWindow *win = w->windowHandle()) {
indentStream(str, 2 * (1 + depth));
formatWindow(str, win, options);
str << '\n';
}
-#endif // Qt 5
for (const QObject *co : w->children()) {
if (co->isWidgetType())
dumpWidgetRecursion(str, static_cast<const QWidget *>(co), options, depth + 1);
@@ -153,16 +123,10 @@ void dumpAllWidgets(FormatWindowOptions options, const QWidget *root)
topLevels.append(const_cast<QWidget *>(root));
else
topLevels = QApplication::topLevelWidgets();
- for (QWidget *tw : qAsConst(topLevels))
+ for (QWidget *tw : std::as_const(topLevels))
dumpWidgetRecursion(str, tw, options);
-#if QT_VERSION >= 0x050400
- {
- for (const QString &line : d.split(QLatin1Char('\n')))
- qDebug().noquote() << line;
- }
-#else
- qDebug("%s", qPrintable(d));
-#endif
+ for (const QString &line : d.split(QLatin1Char('\n')))
+ qDebug().noquote() << line;
}
} // namespace QtDiag
diff --git a/tests/manual/diaglib/qwidgetdump.h b/tests/manual/diaglib/qwidgetdump.h
index c9b2db72dd..5bac7395a8 100644
--- a/tests/manual/diaglib/qwidgetdump.h
+++ b/tests/manual/diaglib/qwidgetdump.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef _WIDGETDUMP_
#define _WIDGETDUMP_
diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp
index 1e46f62b1d..9c71c0ae9b 100644
--- a/tests/manual/diaglib/qwindowdump.cpp
+++ b/tests/manual/diaglib/qwindowdump.cpp
@@ -1,48 +1,20 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qwindowdump.h"
-#if QT_VERSION > 0x050000
-# include <QtGui/QGuiApplication>
-# include <QtGui/QScreen>
-# include <QtGui/QWindow>
-# include <qpa/qplatformwindow.h>
-# include <private/qwindow_p.h>
-# if QT_VERSION >= 0x050600
-# include <private/qhighdpiscaling_p.h>
-# endif
-#endif
+#include <QtGui/QGuiApplication>
+#include <QtGui/QScreen>
+#include <QtGui/QWindow>
+#include <QtCore/QDebug>
#include <QtCore/QMetaObject>
#include <QtCore/QRect>
-#include <QtCore/QDebug>
#include <QtCore/QTextStream>
+#include <qpa/qplatformwindow.h>
+#include <private/qwindow_p.h>
+#include <private/qhighdpiscaling_p.h>
+
namespace QtDiag {
void indentStream(QTextStream &s, int indent)
@@ -87,10 +59,8 @@ void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags)
debugType(str, windowType, Qt::SplashScreen)
debugType(str, windowType, Qt::Desktop)
debugType(str, windowType, Qt::SubWindow)
-#if QT_VERSION > 0x050000
debugType(str, windowType, Qt::ForeignWindow)
debugType(str, windowType, Qt::CoverWindow)
-#endif
debugFlag(str, flags, Qt::MSWindowsFixedSizeDialogHint)
debugFlag(str, flags, Qt::MSWindowsOwnDC)
debugFlag(str, flags, Qt::X11BypassWindowManagerHint)
@@ -103,20 +73,16 @@ void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags)
debugFlag(str, flags, Qt::WindowShadeButtonHint)
debugFlag(str, flags, Qt::WindowStaysOnTopHint)
debugFlag(str, flags, Qt::CustomizeWindowHint)
-#if QT_VERSION > 0x050000
debugFlag(str, flags, Qt::WindowTransparentForInput)
debugFlag(str, flags, Qt::WindowOverridesSystemGestures)
debugFlag(str, flags, Qt::WindowDoesNotAcceptFocus)
debugFlag(str, flags, Qt::NoDropShadowWindowHint)
debugFlag(str, flags, Qt::WindowFullscreenButtonHint)
-#endif
debugFlag(str, flags, Qt::WindowStaysOnBottomHint)
debugFlag(str, flags, Qt::MacWindowToolBarButtonHint)
debugFlag(str, flags, Qt::BypassGraphicsProxyWidget)
}
-#if QT_VERSION > 0x050000
-
void formatWindow(QTextStream &str, const QWindow *w, FormatWindowOptions options)
{
const QPlatformWindow *pw = w->handle();
@@ -137,10 +103,8 @@ void formatWindow(QTextStream &str, const QWindow *w, FormatWindowOptions option
formatRect(str, w->geometry());
if (w->isTopLevel()) {
str << " \"" << w->screen()->name() << "\" ";
-#if QT_VERSION >= 0x050600
if (QHighDpiScaling::isActive())
str << "factor=" << QHighDpiScaling::factor(w) << " dpr=" << w->devicePixelRatio();
-#endif
}
if (!(options & DontPrintWindowFlags)) {
str << ' ';
@@ -176,24 +140,7 @@ void dumpAllWindows(FormatWindowOptions options)
str << "### QWindows:\n";
for (QWindow *w : QGuiApplication::topLevelWindows())
dumpWindowRecursion(str, w, options);
-#if QT_VERSION >= 0x050400
qDebug().noquote() << d;
-#else
- qDebug() << d;
-#endif
}
-#else // Qt 5
-class QWindow {};
-
-void formatWindow(QTextStream &, const QWindow *, FormatWindowOptions)
-{
-}
-
-void dumpAllWindows(FormatWindowOptions options)
-{
-}
-
-#endif // Qt 4
-
} // namespace QtDiag
diff --git a/tests/manual/diaglib/qwindowdump.h b/tests/manual/diaglib/qwindowdump.h
index 9d7491eab2..1fdc1f1bcd 100644
--- a/tests/manual/diaglib/qwindowdump.h
+++ b/tests/manual/diaglib/qwindowdump.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef _WINDOWDUMP_
#define _WINDOWDUMP_
diff --git a/tests/manual/diaglib/textdump.cpp b/tests/manual/diaglib/textdump.cpp
index 54a251928a..0256baba51 100644
--- a/tests/manual/diaglib/textdump.cpp
+++ b/tests/manual/diaglib/textdump.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "textdump.h"
@@ -41,28 +16,20 @@ struct EnumLookup {
static const EnumLookup specialCharactersEnumLookup[] =
{
{QChar::Null, "Null"},
-#if QT_VERSION >= 0x050000
{QChar::Tabulation, "Tabulation"},
{QChar::LineFeed, "LineFeed"},
-# if QT_VERSION >= 0x050e00
{QChar::FormFeed, "FormFeed"},
-# endif
{QChar::CarriageReturn, "CarriageReturn"},
{QChar::Space, "Space"},
-#endif
{QChar::Nbsp, "Nbsp"},
-#if QT_VERSION >= 0x050000
{QChar::SoftHyphen, "SoftHyphen"},
-#endif
{QChar::ReplacementCharacter, "ReplacementCharacter"},
{QChar::ObjectReplacementCharacter, "ObjectReplacementCharacter"},
{QChar::ByteOrderMark, "ByteOrderMark"},
{QChar::ByteOrderSwapped, "ByteOrderSwapped"},
{QChar::ParagraphSeparator, "ParagraphSeparator"},
{QChar::LineSeparator, "LineSeparator"},
-#if QT_VERSION >= 0x050000
{QChar::LastValidCodePoint, "LastValidCodePoint"}
-#endif
};
static const EnumLookup categoryEnumLookup[] =
@@ -105,8 +72,6 @@ static const EnumLookup categoryEnumLookup[] =
{QChar::Symbol_Other, "Symbol_Other"},
};
-#if QT_VERSION >= 0x050100
-
static const EnumLookup scriptEnumLookup[] =
{
{QChar::Script_Unknown, "Script_Unknown"},
@@ -221,7 +186,6 @@ static const EnumLookup scriptEnumLookup[] =
{QChar::Script_SoraSompeng, "Script_SoraSompeng"},
{QChar::Script_Takri, "Script_Takri"},
-#if QT_VERSION >= 0x050500
{QChar::Script_CaucasianAlbanian, "Script_CaucasianAlbanian"},
{QChar::Script_BassaVah, "Script_BassaVah"},
{QChar::Script_Duployan, "Script_Duployan"},
@@ -245,20 +209,15 @@ static const EnumLookup scriptEnumLookup[] =
{QChar::Script_Khudawadi, "Script_Khudawadi"},
{QChar::Script_Tirhuta, "Script_Tirhuta"},
{QChar::Script_WarangCiti, "Script_WarangCiti"},
-#endif // Qt 5.5
-#if QT_VERSION >= 0x050600
{QChar::Script_Ahom, "Script_Ahom"},
{QChar::Script_AnatolianHieroglyphs, "Script_AnatolianHieroglyphs"},
{QChar::Script_Hatran, "Script_Hatran"},
{QChar::Script_Multani, "Script_Multani"},
{QChar::Script_OldHungarian, "Script_OldHungarian"},
{QChar::Script_SignWriting, "Script_SignWriting"},
-#endif // Qt 5.5
};
-#endif // Qt 5.1
-
static const EnumLookup directionEnumLookup[] =
{
{QChar::DirL, "DirL"},
@@ -280,12 +239,10 @@ static const EnumLookup directionEnumLookup[] =
{QChar::DirPDF, "DirPDF"},
{QChar::DirNSM, "DirNSM"},
{QChar::DirBN, "DirBN"},
-#if QT_VERSION >= 0x050000
{QChar::DirLRI, "DirLRI"},
{QChar::DirRLI, "DirRLI"},
{QChar::DirFSI, "DirFSI"},
{QChar::DirPDI, "DirPDI"},
-#endif
};
static const EnumLookup decompositionEnumLookup[] =
@@ -310,8 +267,6 @@ static const EnumLookup decompositionEnumLookup[] =
{QChar::Fraction, "Fraction"},
};
-#if QT_VERSION >= 0x050000
-
static const EnumLookup joiningTypeEnumLookup[] =
{
{QChar::Joining_None, "Joining_None"},
@@ -322,8 +277,6 @@ static const EnumLookup joiningTypeEnumLookup[] =
{QChar::Joining_Transparent, "Joining_Transparent"}
};
-#endif // Qt 5
-
static const EnumLookup combiningClassEnumLookup[] =
{
{QChar::Combining_BelowLeftAttached, "Combining_BelowLeftAttached"},
@@ -361,20 +314,14 @@ static const EnumLookup unicodeVersionEnumLookup[] =
{QChar::Unicode_4_0, "Unicode_4_0"},
{QChar::Unicode_4_1, "Unicode_4_1"},
{QChar::Unicode_5_0, "Unicode_5_0"},
-#if QT_VERSION >= 0x050000
{QChar::Unicode_5_1, "Unicode_5_1"},
{QChar::Unicode_5_2, "Unicode_5_2"},
{QChar::Unicode_6_0, "Unicode_6_0"},
{QChar::Unicode_6_1, "Unicode_6_1"},
{QChar::Unicode_6_2, "Unicode_6_2"},
{QChar::Unicode_6_3, "Unicode_6_3"},
-#if QT_VERSION >= 0x050500
{QChar::Unicode_7_0, "Unicode_7_0"},
-#endif // Qt 5.5
-#if QT_VERSION >= 0x050600
{QChar::Unicode_8_0, "Unicode_8_0"},
-#endif // Qt 5.6
-#endif // Qt 5
};
static const EnumLookup *enumLookup(int v, const EnumLookup *array, size_t size)
@@ -423,7 +370,6 @@ static void formatCharacter(QTextStream &str, const QChar &qc, FormattingContext
<< enumName(category, categoryEnumLookup, sizeof(categoryEnumLookup) / sizeof(EnumLookup));
context.category = category;
}
-#if QT_VERSION >= 0x050100
const int script = qc.script();
if (script != context.script) {
str << " script="
@@ -431,21 +377,18 @@ static void formatCharacter(QTextStream &str, const QChar &qc, FormattingContext
<< '(' << script << ')';
context.script = script;
}
-#endif // Qt 5
const int direction = qc.direction();
if (direction != context.direction) {
str << " direction="
<< enumName(direction, directionEnumLookup, sizeof(directionEnumLookup) / sizeof(EnumLookup));
context.direction = direction;
}
-#if QT_VERSION >= 0x050000
const int joiningType = qc.joiningType();
if (joiningType != context.joiningType) {
str << " joiningType="
<< enumName(joiningType, joiningTypeEnumLookup, sizeof(joiningTypeEnumLookup) / sizeof(EnumLookup));
context.joiningType = joiningType;
}
-#endif // Qt 5QWidget
const int decompositionTag = qc.decompositionTag();
if (decompositionTag != context.decompositionTag) {
str << " decomposition="
diff --git a/tests/manual/diaglib/textdump.h b/tests/manual/diaglib/textdump.h
index 5bfc73ac78..0885c2d29c 100644
--- a/tests/manual/diaglib/textdump.h
+++ b/tests/manual/diaglib/textdump.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** 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.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef TEXTDUMP_H
#define TEXTDUMP_H