blob: 932c077ca391182f371183e19d3c285fd9429b07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef QTDOCINSTALLER
#define QTDOCINSTALLER
#include <QtCore/QDir>
#include <QtCore/QMutex>
#include <QtCore/QPair>
#include <QtCore/QStringList>
#include <QtCore/QThread>
QT_BEGIN_NAMESPACE
class HelpEngineWrapper;
class QtDocInstaller : public QThread
{
Q_OBJECT
public:
typedef QPair<QString, QStringList> DocInfo;
QtDocInstaller(const QList<DocInfo> &docInfos);
~QtDocInstaller() override;
void installDocs();
signals:
void qchFileNotFound(const QString &component);
void registerDocumentation(const QString &component,
const QString &absFileName);
void docsInstalled(bool newDocsInstalled);
private:
void run() override;
bool installDoc(const DocInfo &docInfo);
bool m_abort;
QMutex m_mutex;
QStringList m_qchFiles;
QDir m_qchDir;
QList<DocInfo> m_docInfos;
};
QT_END_NAMESPACE
#endif
|