From 14024df36e7a26b79aa2b0edf82c9b29d9eb0185 Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Thu, 10 Sep 2020 16:05:53 +0200 Subject: QDoc: Drop ditaref remains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of the dita code is removed, get rid of the last few bits and the header that is no longer used. [ChangeLog][qdoc] The obsolete \ditamap has been removed. Task-number: QTBUG-71176 Fixes: QTBUG-86560 Change-Id: I7c65cc8a74d4caeabdc98d6852026f54a3c32dda Reviewed-by: Topi Reiniƶ --- src/qdoc/.prev_CMakeLists.txt | 1 - src/qdoc/CMakeLists.txt | 1 - src/qdoc/codeparser.h | 1 - src/qdoc/cppcodeparser.cpp | 10 ++-- src/qdoc/ditaref.h | 83 -------------------------------- src/qdoc/doc.h | 1 - src/qdoc/doc/qdoc-manual-markupcmds.qdoc | 2 +- src/qdoc/docparser.cpp | 40 +-------------- src/qdoc/docparser.h | 1 - src/qdoc/docprivate.cpp | 4 +- src/qdoc/docprivate.h | 1 - src/qdoc/qdoc.pro | 1 - src/qdoc/quoter.cpp | 3 +- 13 files changed, 9 insertions(+), 140 deletions(-) delete mode 100644 src/qdoc/ditaref.h diff --git a/src/qdoc/.prev_CMakeLists.txt b/src/qdoc/.prev_CMakeLists.txt index e65c0e9a4..5baa6beb9 100644 --- a/src/qdoc/.prev_CMakeLists.txt +++ b/src/qdoc/.prev_CMakeLists.txt @@ -20,7 +20,6 @@ qt_add_tool(${target_name} config.cpp config.h cppcodemarker.cpp cppcodemarker.h cppcodeparser.cpp cppcodeparser.h - ditaref.h doc.cpp doc.h docbookgenerator.cpp docbookgenerator.h docparser.cpp docparser.h diff --git a/src/qdoc/CMakeLists.txt b/src/qdoc/CMakeLists.txt index f5904e29b..ffd4e4eb1 100644 --- a/src/qdoc/CMakeLists.txt +++ b/src/qdoc/CMakeLists.txt @@ -28,7 +28,6 @@ qt_add_tool(${target_name} config.cpp config.h cppcodemarker.cpp cppcodemarker.h cppcodeparser.cpp cppcodeparser.h - ditaref.h doc.cpp doc.h docbookgenerator.cpp docbookgenerator.h docparser.cpp docparser.h diff --git a/src/qdoc/codeparser.h b/src/qdoc/codeparser.h index b0a566efc..54fd18035 100644 --- a/src/qdoc/codeparser.h +++ b/src/qdoc/codeparser.h @@ -95,7 +95,6 @@ private: #define COMMAND_COPYRYEAR Doc::alias(QLatin1String("copyryear")) #define COMMAND_DEPRECATED Doc::alias(QLatin1String("deprecated")) // ### don't document #define COMMAND_DONTDOCUMENT Doc::alias(QLatin1String("dontdocument")) -#define COMMAND_DITAMAP Doc::alias(QLatin1String("ditamap")) #define COMMAND_ENUM Doc::alias(QLatin1String("enum")) #define COMMAND_EXAMPLE Doc::alias(QLatin1String("example")) #define COMMAND_EXTERNALPAGE Doc::alias(QLatin1String("externalpage")) diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 73936ed36..eb6a86b80 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -65,10 +65,10 @@ static QSet metaCommands_; CppCodeParser::CppCodeParser() { if (topicCommands_.isEmpty()) { - topicCommands_ << COMMAND_CLASS << COMMAND_DITAMAP << COMMAND_DONTDOCUMENT << COMMAND_ENUM - << COMMAND_EXAMPLE << COMMAND_EXTERNALPAGE << COMMAND_FN << COMMAND_GROUP - << COMMAND_HEADERFILE << COMMAND_MACRO << COMMAND_MODULE << COMMAND_NAMESPACE - << COMMAND_PAGE << COMMAND_PROPERTY << COMMAND_TYPEALIAS << COMMAND_TYPEDEF + topicCommands_ << COMMAND_CLASS << COMMAND_DONTDOCUMENT << COMMAND_ENUM << COMMAND_EXAMPLE + << COMMAND_EXTERNALPAGE << COMMAND_FN << COMMAND_GROUP << COMMAND_HEADERFILE + << COMMAND_MACRO << COMMAND_MODULE << COMMAND_NAMESPACE << COMMAND_PAGE + << COMMAND_PROPERTY << COMMAND_TYPEALIAS << COMMAND_TYPEDEF << COMMAND_VARIABLE << COMMAND_QMLTYPE << COMMAND_QMLPROPERTY << COMMAND_QMLPROPERTYGROUP // mws 13/03/2019 << COMMAND_QMLATTACHEDPROPERTY << COMMAND_QMLSIGNAL @@ -134,7 +134,7 @@ void CppCodeParser::initializeParser() if (!exampleFilePatterns.isEmpty()) m_exampleNameFilter = exampleFilePatterns.join(' '); else - m_exampleNameFilter = "*.cpp *.h *.js *.xq *.svg *.xml *.dita *.ui"; + m_exampleNameFilter = "*.cpp *.h *.js *.xq *.svg *.xml *.ui"; QStringList exampleImagePatterns = config.getStringList(CONFIG_EXAMPLES + Config::dot + CONFIG_IMAGEEXTENSIONS); diff --git a/src/qdoc/ditaref.h b/src/qdoc/ditaref.h deleted file mode 100644 index 3f455d38f..000000000 --- a/src/qdoc/ditaref.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2020 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$ -** -****************************************************************************/ -#ifndef DITAREF_H -#define DITAREF_H - -#include "location.h" - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class DitaRef -{ -public: - DitaRef() = default; - virtual ~DitaRef() = default; - - const QString &navtitle() const { return m_navTitle; } - const QString &href() const { return m_href; } - void setNavtitle(const QString &title) { m_navTitle = title; } - void setHref(const QString &t) { m_href = t; } - virtual bool isMapRef() const = 0; - virtual const QList *subrefs() const { return nullptr; } - virtual void appendSubref(DitaRef *) {} - -private: - QString m_navTitle; - QString m_href; -}; - -typedef QList DitaRefList; - -class TopicRef : public DitaRef -{ -public: - TopicRef() = default; - ~TopicRef() override { qDeleteAll(m_subRefs); }; - bool isMapRef() const override { return false; } - const QList *subrefs() const override { return &m_subRefs; } - void appendSubref(DitaRef *t) override { m_subRefs.append(t); } - -private: - DitaRefList m_subRefs; -}; - -class MapRef : public DitaRef -{ -public: - MapRef() {} - - bool isMapRef() const override { return true; } -}; - -QT_END_NAMESPACE - -#endif // DITAREF_H diff --git a/src/qdoc/doc.h b/src/qdoc/doc.h index 1f2643bf8..55153b7e6 100644 --- a/src/qdoc/doc.h +++ b/src/qdoc/doc.h @@ -35,7 +35,6 @@ #include "location.h" -#include "ditaref.h" #include "docutilities.h" #include "topic.h" diff --git a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc index dedea4d5b..d5f1aab2b 100644 --- a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc +++ b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc @@ -1702,7 +1702,7 @@ By default, QDoc looks for \c{//!} as a code snippet marker. For \c{.pro}, \c{.py}, \c{.cmake}, and \c{CMakeLists.txt} files, \c {#!} is detected. Finally, \c{ */ if (!commentHash.size()) { @@ -124,7 +124,6 @@ Quoter::Quoter() : silent(false) commentHash["qrc"] = "