diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2019-02-26 12:55:50 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2019-03-01 10:13:05 +0000 |
commit | cc7feade6095d08cee225294a3635229e34a6e1c (patch) | |
tree | 95716482063db7b461dc5bdb412e665263596bbf | |
parent | 1303dbef106ea4fca296ad4d8a40b9a8b1676554 (diff) | |
download | qttools-cc7feade6095d08cee225294a3635229e34a6e1c.tar.gz |
Rename QHelpCollectionDetails into QCompressedHelpInfo
Fixes: QTBUG-74082
Change-Id: Ifbcb9076d2884f78f16b9d80859551c37c73954f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | src/assistant/assistant/preferencesdialog.cpp | 10 | ||||
-rw-r--r-- | src/assistant/help/help.pro | 10 | ||||
-rw-r--r-- | src/assistant/help/qcompressedhelpinfo.cpp (renamed from src/assistant/help/qhelpcollectiondetails.cpp) | 60 | ||||
-rw-r--r-- | src/assistant/help/qcompressedhelpinfo.h (renamed from src/assistant/help/qhelpcollectiondetails.h) | 26 |
4 files changed, 54 insertions, 52 deletions
diff --git a/src/assistant/assistant/preferencesdialog.cpp b/src/assistant/assistant/preferencesdialog.cpp index 369abb002..c9840627e 100644 --- a/src/assistant/assistant/preferencesdialog.cpp +++ b/src/assistant/assistant/preferencesdialog.cpp @@ -36,10 +36,10 @@ #include <QtGui/QFontDatabase> #include <QtWidgets/QMessageBox> +#include <QtHelp/QCompressedHelpInfo> #include <QtHelp/QHelpEngineCore> #include <QtHelp/QHelpFilterData> #include <QtHelp/QHelpFilterEngine> -#include <QtHelp/QHelpCollectionDetails> #include <QtWidgets/QFileDialog> @@ -398,8 +398,8 @@ void PreferencesDialog::addDocumentation() bool added = false; for (const QString &fileName : fileNames) { - const QHelpCollectionDetails details = QHelpCollectionDetails::fromCompressedHelpFile(fileName); - const QString namespaceName = details.namespaceName(); + const QCompressedHelpInfo info = QCompressedHelpInfo::fromCompressedHelpFile(fileName); + const QString namespaceName = info.namespaceName(); if (m_currentSetup.m_namespaceToFileName.contains(namespaceName)) continue; @@ -407,8 +407,8 @@ void PreferencesDialog::addDocumentation() if (m_currentSetup.m_fileNameToNamespace.contains(fileName)) continue; - const QString component = details.component(); - const QString version = details.version(); + const QString component = info.component(); + const QString version = info.version(); m_currentSetup.m_namespaceToFileName.insert(namespaceName, fileName); m_currentSetup.m_fileNameToNamespace.insert(fileName, namespaceName); diff --git a/src/assistant/help/help.pro b/src/assistant/help/help.pro index a1616b233..cd7781dde 100644 --- a/src/assistant/help/help.pro +++ b/src/assistant/help/help.pro @@ -10,9 +10,10 @@ QMAKE_DOCS = $$PWD/doc/qthelp.qdocconf DEFINES -= QT_ASCII_CAST_WARNINGS RESOURCES += helpsystem.qrc -SOURCES += qhelpenginecore.cpp \ +SOURCES += \ + qcompressedhelpinfo.cpp \ + qhelpenginecore.cpp \ qhelpengine.cpp \ - qhelpcollectiondetails.cpp \ qhelpfilterdata.cpp \ qhelpfilterengine.cpp \ qhelpdbreader.cpp \ @@ -27,10 +28,11 @@ SOURCES += qhelpenginecore.cpp \ qhelpsearchindexreader.cpp \ qhelp_global.cpp -HEADERS += qhelpenginecore.h \ +HEADERS += \ + qcompressedhelpinfo.h \ + qhelpenginecore.h \ qhelpengine.h \ qhelpengine_p.h \ - qhelpcollectiondetails.h \ qhelpfilterdata.h \ qhelpfilterengine.h \ qhelp_global.h \ diff --git a/src/assistant/help/qhelpcollectiondetails.cpp b/src/assistant/help/qcompressedhelpinfo.cpp index 2282b18e8..d65486db3 100644 --- a/src/assistant/help/qhelpcollectiondetails.cpp +++ b/src/assistant/help/qcompressedhelpinfo.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Assistant of the Qt Toolkit. @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#include "qhelpcollectiondetails.h" +#include "qcompressedhelpinfo.h" #include "qhelpdbreader_p.h" @@ -45,17 +45,17 @@ QT_BEGIN_NAMESPACE -class QHelpCollectionDetailsPrivate : public QSharedData +class QCompressedHelpInfoPrivate : public QSharedData { public: - QHelpCollectionDetailsPrivate() = default; - QHelpCollectionDetailsPrivate(const QHelpCollectionDetailsPrivate &other) + QCompressedHelpInfoPrivate() = default; + QCompressedHelpInfoPrivate(const QCompressedHelpInfoPrivate &other) : QSharedData(other) , m_namespaceName(other.m_namespaceName) , m_component(other.m_component) , m_version(other.m_version) { } - ~QHelpCollectionDetailsPrivate() = default; + ~QCompressedHelpInfoPrivate() = default; QString m_namespaceName; QString m_component; @@ -63,10 +63,10 @@ public: }; /*! - \class QHelpCollectionDetails + \class QCompressedHelpInfo \since 5.13 \inmodule QtHelp - \brief The QHelpCollectionDetails class provides access to + \brief The QCompressedHelpInfo class provides access to the details about a compressed help file. The detailed information about the compressed @@ -85,43 +85,43 @@ public: /*! Constructs empty information about a compressed help file. */ -QHelpCollectionDetails::QHelpCollectionDetails() - : d(new QHelpCollectionDetailsPrivate) +QCompressedHelpInfo::QCompressedHelpInfo() + : d(new QCompressedHelpInfoPrivate) { } /*! Constructs a copy of \a other. */ -QHelpCollectionDetails::QHelpCollectionDetails(const QHelpCollectionDetails &) = default; +QCompressedHelpInfo::QCompressedHelpInfo(const QCompressedHelpInfo &) = default; /*! - Move-constructs a QHelpCollectionDetails instance, + Move-constructs a QCompressedHelpInfo instance, making it point to the same object that \a other was pointing to, so that it contains the information the \a other used to contain. */ -QHelpCollectionDetails::QHelpCollectionDetails(QHelpCollectionDetails &&) = default; +QCompressedHelpInfo::QCompressedHelpInfo(QCompressedHelpInfo &&) = default; /*! - Destroys the QHelpCollectionDetails. + Destroys the QCompressedHelpInfo. */ -QHelpCollectionDetails::~QHelpCollectionDetails() = default; +QCompressedHelpInfo::~QCompressedHelpInfo() = default; /*! Makes this QHelpCollectionDetails into a copy of \a other, so the two are identical, and returns a reference to this QHelpCollectionDetails. */ -QHelpCollectionDetails &QHelpCollectionDetails::operator=(const QHelpCollectionDetails &) = default; +QCompressedHelpInfo &QCompressedHelpInfo::operator=(const QCompressedHelpInfo &) = default; /*! - Move-assigns \a other to this QHelpCollectionDetails instance. + Move-assigns \a other to this QCompressedHelpInfo instance. */ -QHelpCollectionDetails &QHelpCollectionDetails::operator=(QHelpCollectionDetails &&) = default; +QCompressedHelpInfo &QCompressedHelpInfo::operator=(QCompressedHelpInfo &&) = default; /*! Returns the namespace name of the compressed help file. */ -QString QHelpCollectionDetails::namespaceName() const +QString QCompressedHelpInfo::namespaceName() const { return d->m_namespaceName; } @@ -129,7 +129,7 @@ QString QHelpCollectionDetails::namespaceName() const /*! Returns the component of the compressed help file. */ -QString QHelpCollectionDetails::component() const +QString QCompressedHelpInfo::component() const { return d->m_component; } @@ -137,28 +137,28 @@ QString QHelpCollectionDetails::component() const /*! Returns the version of the compressed help file. */ -QString QHelpCollectionDetails::version() const +QString QCompressedHelpInfo::version() const { return d->m_version; } /*! - Returns the QHelpCollectionDetails instance for the + Returns the QCompressedHelpInfo instance for the \a documentationFileName of the existing qch file. */ -QHelpCollectionDetails QHelpCollectionDetails::fromCompressedHelpFile(const QString &documentationFileName) +QCompressedHelpInfo QCompressedHelpInfo::fromCompressedHelpFile(const QString &documentationFileName) { QHelpDBReader reader(documentationFileName, - QHelpGlobal::uniquifyConnectionName(QLatin1String("GetHelpDetails"), + QHelpGlobal::uniquifyConnectionName(QLatin1String("GetCompressedHelpInfo"), QThread::currentThread()), nullptr); if (reader.init()) { - QHelpCollectionDetails details; - details.d->m_namespaceName = reader.namespaceName(); - details.d->m_component = reader.virtualFolder(); - details.d->m_version = reader.version(); - return details; + QCompressedHelpInfo info; + info.d->m_namespaceName = reader.namespaceName(); + info.d->m_component = reader.virtualFolder(); + info.d->m_version = reader.version(); + return info; } - return QHelpCollectionDetails(); + return QCompressedHelpInfo(); } QT_END_NAMESPACE diff --git a/src/assistant/help/qhelpcollectiondetails.h b/src/assistant/help/qcompressedhelpinfo.h index 9f804c49e..cf27f635c 100644 --- a/src/assistant/help/qhelpcollectiondetails.h +++ b/src/assistant/help/qcompressedhelpinfo.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Assistant of the Qt Toolkit. @@ -37,8 +37,8 @@ ** ****************************************************************************/ -#ifndef QHELPCOLLECTIONDETAILS_H -#define QHELPCOLLECTIONDETAILS_H +#ifndef QCOMPRESSEDHELPINFO_H +#define QCOMPRESSEDHELPINFO_H #include <QtHelp/qhelp_global.h> @@ -46,27 +46,27 @@ QT_BEGIN_NAMESPACE -class QHelpCollectionDetailsPrivate; +class QCompressedHelpInfoPrivate; -class QHELP_EXPORT QHelpCollectionDetails +class QHELP_EXPORT QCompressedHelpInfo { public: - QHelpCollectionDetails(); - QHelpCollectionDetails(const QHelpCollectionDetails &other); - QHelpCollectionDetails(QHelpCollectionDetails &&other); - virtual ~QHelpCollectionDetails(); + QCompressedHelpInfo(); + QCompressedHelpInfo(const QCompressedHelpInfo &other); + QCompressedHelpInfo(QCompressedHelpInfo &&other); + virtual ~QCompressedHelpInfo(); - QHelpCollectionDetails &operator=(const QHelpCollectionDetails &other); - QHelpCollectionDetails &operator=(QHelpCollectionDetails &&other); + QCompressedHelpInfo &operator=(const QCompressedHelpInfo &other); + QCompressedHelpInfo &operator=(QCompressedHelpInfo &&other); QString namespaceName() const; QString component() const; QString version() const; - static QHelpCollectionDetails fromCompressedHelpFile(const QString &documentationFileName); + static QCompressedHelpInfo fromCompressedHelpFile(const QString &documentationFileName); private: - QSharedDataPointer<QHelpCollectionDetailsPrivate> d; + QSharedDataPointer<QCompressedHelpInfoPrivate> d; }; QT_END_NAMESPACE |