summaryrefslogtreecommitdiffstats
path: root/tests/manual/diaglib/textdump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/diaglib/textdump.cpp')
-rw-r--r--tests/manual/diaglib/textdump.cpp61
1 files changed, 2 insertions, 59 deletions
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="