diff options
Diffstat (limited to 'src/distancefieldgenerator')
-rw-r--r-- | src/distancefieldgenerator/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/distancefieldgenerator/distancefieldmodel.cpp | 29 | ||||
-rw-r--r-- | src/distancefieldgenerator/distancefieldmodel.h | 29 | ||||
-rw-r--r-- | src/distancefieldgenerator/distancefieldmodelworker.cpp | 29 | ||||
-rw-r--r-- | src/distancefieldgenerator/distancefieldmodelworker.h | 29 | ||||
-rw-r--r-- | src/distancefieldgenerator/doc/distancefieldgenerator.qdocconf | 24 | ||||
-rw-r--r-- | src/distancefieldgenerator/doc/qtdistancefieldgenerator.qdocconf | 1 | ||||
-rw-r--r-- | src/distancefieldgenerator/doc/src/distancefieldgenerator-manual.qdoc | 28 | ||||
-rw-r--r-- | src/distancefieldgenerator/main.cpp | 29 | ||||
-rw-r--r-- | src/distancefieldgenerator/mainwindow.cpp | 47 | ||||
-rw-r--r-- | src/distancefieldgenerator/mainwindow.h | 29 |
11 files changed, 28 insertions, 254 deletions
diff --git a/src/distancefieldgenerator/CMakeLists.txt b/src/distancefieldgenerator/CMakeLists.txt index 9be21f199..04edc6eef 100644 --- a/src/distancefieldgenerator/CMakeLists.txt +++ b/src/distancefieldgenerator/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from distancefieldgenerator.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## qdistancefieldgenerator App: @@ -14,7 +15,7 @@ qt_internal_add_app(qdistancefieldgenerator QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_FOREACH - PUBLIC_LIBRARIES + LIBRARIES Qt::CorePrivate Qt::Gui Qt::GuiPrivate @@ -27,9 +28,6 @@ set_target_properties(qdistancefieldgenerator PROPERTIES QT_TARGET_DESCRIPTION "Qt Distance Field Generator" ) -#### Keys ignored in scope 1:.:.:distancefieldgenerator.pro:<TRUE>: -# QT_FOR_CONFIG = "tools-private" -# _REQUIREMENTS = "qtConfig(distancefieldgenerator)" qt_internal_add_docs(qdistancefieldgenerator doc/qtdistancefieldgenerator.qdocconf ) diff --git a/src/distancefieldgenerator/distancefieldmodel.cpp b/src/distancefieldgenerator/distancefieldmodel.cpp index e529e65ba..c6fe18d6a 100644 --- a/src/distancefieldgenerator/distancefieldmodel.cpp +++ b/src/distancefieldgenerator/distancefieldmodel.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the tools applications 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) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "distancefieldmodel.h" #include "distancefieldmodelworker.h" diff --git a/src/distancefieldgenerator/distancefieldmodel.h b/src/distancefieldgenerator/distancefieldmodel.h index 174021301..c742861b4 100644 --- a/src/distancefieldgenerator/distancefieldmodel.h +++ b/src/distancefieldgenerator/distancefieldmodel.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the tools applications 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) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #ifndef DISTANCEFIELDMODEL_H #define DISTANCEFIELDMODEL_H diff --git a/src/distancefieldgenerator/distancefieldmodelworker.cpp b/src/distancefieldgenerator/distancefieldmodelworker.cpp index b76f3b707..e459a955d 100644 --- a/src/distancefieldgenerator/distancefieldmodelworker.cpp +++ b/src/distancefieldgenerator/distancefieldmodelworker.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the tools applications 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) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "distancefieldmodelworker.h" diff --git a/src/distancefieldgenerator/distancefieldmodelworker.h b/src/distancefieldgenerator/distancefieldmodelworker.h index 85b82f096..8872eee63 100644 --- a/src/distancefieldgenerator/distancefieldmodelworker.h +++ b/src/distancefieldgenerator/distancefieldmodelworker.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the tools applications 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) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #ifndef DISTANCEFIELDMODELWORKER_H #define DISTANCEFIELDMODELWORKER_H diff --git a/src/distancefieldgenerator/doc/distancefieldgenerator.qdocconf b/src/distancefieldgenerator/doc/distancefieldgenerator.qdocconf deleted file mode 100644 index acd7db3b5..000000000 --- a/src/distancefieldgenerator/doc/distancefieldgenerator.qdocconf +++ /dev/null @@ -1,24 +0,0 @@ -include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) - -project = QtDistanceFieldGenerator -description = Qt Distance Field Generator Manual - -qhp.projects = QtDistanceFieldGenerator - -qhp.QtDistanceFieldGenerator.file = qtdistancefieldgenerator.qhp -qhp.QtDistanceFieldGenerator.namespace = org.qt-project.qtdistancefieldgenerator.$QT_VERSION_TAG -qhp.QtDistanceFieldGenerator.virtualFolder = qtdistancefieldgenerator -qhp.QtDistanceFieldGenerator.indexTitle = Qt Distance Field Generator Manual - -qhp.QtDistanceFieldGenerator.subprojects = manual -qhp.QtDistanceFieldGenerator.subprojects.manual.title = Manual -qhp.QtDistanceFieldGenerator.subprojects.manual.indexTitle = Qt Distance Field Generator Manual -qhp.QtDistanceFieldGenerator.subprojects.manual.type = manual - -language = Cpp -sourcedirs = .. -imagedirs = images - -depends += qtdoc qtqml qtquick qtcore qtgui qmake - -navigation.landingpage = "Qt Distance Field Generator Manual" diff --git a/src/distancefieldgenerator/doc/qtdistancefieldgenerator.qdocconf b/src/distancefieldgenerator/doc/qtdistancefieldgenerator.qdocconf index c4392bcac..a74452d9c 100644 --- a/src/distancefieldgenerator/doc/qtdistancefieldgenerator.qdocconf +++ b/src/distancefieldgenerator/doc/qtdistancefieldgenerator.qdocconf @@ -25,4 +25,3 @@ depends += qtdoc qtqml qtquick qtcore qtgui qmake navigation.landingpage = "Qt Distance Field Generator Manual" -warninglimit = 0 diff --git a/src/distancefieldgenerator/doc/src/distancefieldgenerator-manual.qdoc b/src/distancefieldgenerator/doc/src/distancefieldgenerator-manual.qdoc index 68a37ddbc..0faa8b50e 100644 --- a/src/distancefieldgenerator/doc/src/distancefieldgenerator-manual.qdoc +++ b/src/distancefieldgenerator/doc/src/distancefieldgenerator-manual.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** 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 Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtdistancefieldgenerator-index.html diff --git a/src/distancefieldgenerator/main.cpp b/src/distancefieldgenerator/main.cpp index 8fdcaba30..bb852c9cb 100644 --- a/src/distancefieldgenerator/main.cpp +++ b/src/distancefieldgenerator/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the tools applications 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) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "mainwindow.h" diff --git a/src/distancefieldgenerator/mainwindow.cpp b/src/distancefieldgenerator/mainwindow.cpp index 41516bd49..703e73857 100644 --- a/src/distancefieldgenerator/mainwindow.cpp +++ b/src/distancefieldgenerator/mainwindow.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the tools applications 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) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "mainwindow.h" #include "ui_mainwindow.h" @@ -316,7 +291,7 @@ void MainWindow::save() outBuffer.write(reinterpret_cast<char *>(&fontDirectoryHeader), sizeof(FontDirectoryHeader)); - QVarLengthArray<QPair<quint32, quint32>> offsetLengthPairs; + QVarLengthArray<std::pair<quint32, quint32>> offsetLengthPairs; offsetLengthPairs.reserve(numTables - 1); // Copy the offset table, updating offsets @@ -327,8 +302,8 @@ void MainWindow::save() quint32 originalOffset = qFromBigEndian(offsetTable->offset); quint32 length = qFromBigEndian(offsetTable->length); - offsetLengthPairs.append(qMakePair(originalOffset, length)); - if (offsetTable->tag == qToBigEndian(MAKE_TAG('h', 'e', 'a', 'd'))) + offsetLengthPairs.append({originalOffset, length}); + if (offsetTable->tag == qFromBigEndian(QFont::Tag("head").value())) headOffset = currentOffset; TableRecord newTableRecord; @@ -357,11 +332,11 @@ void MainWindow::save() TableRecord qtdfRecord; qtdfRecord.offset = qToBigEndian(currentOffset); - qtdfRecord.length = qToBigEndian(qtdf.length()); - qtdfRecord.tag = qToBigEndian(MAKE_TAG('q', 't', 'd', 'f')); + qtdfRecord.length = qToBigEndian(qtdf.size()); + qtdfRecord.tag = qFromBigEndian(QFont::Tag("qtdf").value()); quint32 checkSum = 0; const quint32 *start = reinterpret_cast<const quint32 *>(qtdf.constData()); - const quint32 *end = reinterpret_cast<const quint32 *>(qtdf.constData() + qtdf.length()); + const quint32 *end = reinterpret_cast<const quint32 *>(qtdf.constData() + qtdf.size()); while (start < end) checkSum += *(start++); qtdfRecord.checkSum = qToBigEndian(checkSum); @@ -371,7 +346,7 @@ void MainWindow::save() } // Copy all font tables - for (const QPair<quint32, quint32> &offsetLengthPair : offsetLengthPairs) { + for (const std::pair<quint32, quint32> &offsetLengthPair : offsetLengthPairs) { PAD_BUFFER(outBuffer, output.size()) outBuffer.write(reinterpret_cast<char *>(inData + offsetLengthPair.first), offsetLengthPair.second); @@ -387,7 +362,7 @@ void MainWindow::save() quint32 checkSum = 0; const quint32 *start = reinterpret_cast<const quint32 *>(output.constData()); - const quint32 *end = reinterpret_cast<const quint32 *>(output.constData() + output.length()); + const quint32 *end = reinterpret_cast<const quint32 *>(output.constData() + output.size()); while (start < end) checkSum += *(start++); @@ -771,7 +746,7 @@ void MainWindow::about() "to prepare a font cache for Qt applications.</p>" "<p>Copyright (C) %2 The Qt Company Ltd.</p>") .arg(QLatin1String(QT_VERSION_STR)) - .arg(QLatin1String("2019"))); + .arg(QString())); msgBox->show(); } diff --git a/src/distancefieldgenerator/mainwindow.h b/src/distancefieldgenerator/mainwindow.h index 89a83db52..c65d21820 100644 --- a/src/distancefieldgenerator/mainwindow.h +++ b/src/distancefieldgenerator/mainwindow.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the tools applications 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) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #ifndef MAINWINDOW_H #define MAINWINDOW_H |