diff options
Diffstat (limited to 'src/assistant/help/qhelpenginecore.h')
-rw-r--r-- | src/assistant/help/qhelpenginecore.h | 90 |
1 files changed, 31 insertions, 59 deletions
diff --git a/src/assistant/help/qhelpenginecore.h b/src/assistant/help/qhelpenginecore.h index dc4cd7695..aa0828f81 100644 --- a/src/assistant/help/qhelpenginecore.h +++ b/src/assistant/help/qhelpenginecore.h @@ -1,51 +1,19 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Assistant of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** 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-2.0.html and -** 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 LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QHELPENGINECORE_H #define QHELPENGINECORE_H #include <QtHelp/qhelp_global.h> +#include <QtHelp/qhelpcontentitem.h> -#include <QtCore/QUrl> -#include <QtCore/QMap> -#include <QtCore/QObject> -#include <QtCore/QVariant> +#if QT_CONFIG(future) +#include <QtCore/qfuture.h> +#endif + +#include <QtCore/qobject.h> +#include <QtCore/qurl.h> +#include <QtCore/qvariant.h> QT_BEGIN_NAMESPACE @@ -86,7 +54,7 @@ public: QStringList registeredDocumentations() const; QByteArray fileData(const QUrl &url) const; -#if QT_DEPRECATED_SINCE(5,13) +// #if QT_DEPRECATED_SINCE(5,13) QStringList customFilters() const; bool removeCustomFilter(const QString &filterName); bool addCustomFilter(const QString &filterName, @@ -99,14 +67,12 @@ public: void setCurrentFilter(const QString &filterName); QList<QStringList> filterAttributeSets(const QString &namespaceName) const; - QList<QUrl> files(const QString namespaceName, - const QStringList &filterAttributes, - const QString &extensionFilter = QString()); -#endif + QList<QUrl> files(const QString namespaceName, const QStringList &filterAttributes, + const QString &extensionFilter = {}); +// #endif - QList<QUrl> files(const QString namespaceName, - const QString &filterName, - const QString &extensionFilter = QString()); + QList<QUrl> files(const QString namespaceName, const QString &filterName, + const QString &extensionFilter = {}); QUrl findFile(const QUrl &url) const; QList<QHelpLink> documentsForIdentifier(const QString &id) const; @@ -115,12 +81,10 @@ public: QList<QHelpLink> documentsForKeyword(const QString &keyword, const QString &filterName) const; bool removeCustomValue(const QString &key); - QVariant customValue(const QString &key, - const QVariant &defaultValue = QVariant()) const; + QVariant customValue(const QString &key, const QVariant &defaultValue = {}) const; bool setCustomValue(const QString &key, const QVariant &value); - static QVariant metaData(const QString &documentationFileName, - const QString &name); + static QVariant metaData(const QString &documentationFileName, const QString &name); QString error() const; @@ -130,23 +94,31 @@ public: void setUsesFilterEngine(bool uses); bool usesFilterEngine() const; +#if QT_CONFIG(future) + QFuture<std::shared_ptr<QHelpContentItem>> provideContentForCurrentFilter() const; + QFuture<std::shared_ptr<QHelpContentItem>> provideContent(const QString &filter) const; + + QFuture<QStringList> provideIndexForCurrentFilter() const; + QFuture<QStringList> provideIndex(const QString &filter) const; +#endif + Q_SIGNALS: void setupStarted(); void setupFinished(); void warning(const QString &msg); -#if QT_DEPRECATED_SINCE(5,13) +// #if QT_DEPRECATED_SINCE(5,13) void currentFilterChanged(const QString &newFilter); void readersAboutToBeInvalidated(); -#endif +// #endif protected: - QHelpEngineCore(QHelpEngineCorePrivate *helpEngineCorePrivate, - QObject *parent); +#if QT_DEPRECATED_SINCE(6, 8) + QHelpEngineCore(QHelpEngineCorePrivate *helpEngineCorePrivate, QObject *parent); +#endif private: QHelpEngineCorePrivate *d; - friend class QHelpEngineCorePrivate; }; QT_END_NAMESPACE |