2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2019-03-13 17:58:06 +01:00
|
|
|
#include "clangutils.h"
|
2013-12-10 14:37:32 +01:00
|
|
|
|
|
|
|
|
#include <extensionsystem/iplugin.h>
|
|
|
|
|
|
2018-07-10 15:53:51 +02:00
|
|
|
#include <utils/parameteraction.h>
|
|
|
|
|
|
|
|
|
|
#include <QFutureWatcher>
|
|
|
|
|
|
2023-02-09 14:16:43 +01:00
|
|
|
namespace ClangCodeModel::Internal {
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2018-07-10 15:53:51 +02:00
|
|
|
class ClangCodeModelPlugin final: public ExtensionSystem::IPlugin
|
2013-12-10 14:37:32 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "ClangCodeModel.json")
|
|
|
|
|
|
|
|
|
|
public:
|
2018-11-04 21:44:21 +01:00
|
|
|
~ClangCodeModelPlugin() override;
|
2023-01-20 12:28:36 +01:00
|
|
|
void initialize() override;
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2016-05-10 15:10:15 +02:00
|
|
|
private:
|
2018-07-10 15:53:51 +02:00
|
|
|
void generateCompilationDB();
|
2022-12-01 15:34:21 +01:00
|
|
|
void createCompilationDBAction();
|
2013-12-10 14:37:32 +01:00
|
|
|
|
2020-07-06 15:49:35 +02:00
|
|
|
Utils::ParameterAction *m_generateCompilationDBAction = nullptr;
|
|
|
|
|
QFutureWatcher<GenerateCompilationDbResult> m_generatorWatcher;
|
2013-12-10 14:37:32 +01:00
|
|
|
};
|
|
|
|
|
|
2023-02-09 14:16:43 +01:00
|
|
|
} // ClangCodeModel::Internal
|