blob: 964c0752fc7e69be0b3197ef13b6a3a94cf4d507 (
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
47
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "cppquickfix.h"
#include "cppquickfixassistant.h"
#include <extensionsystem/pluginmanager.h>
#include <extensionsystem/pluginspec.h>
using namespace CPlusPlus;
using namespace TextEditor;
namespace CppEditor {
static ExtensionSystem::IPlugin *getCppEditor()
{
using namespace ExtensionSystem;
for (PluginSpec * const spec : PluginManager::plugins()) {
if (spec->name() == "CppEditor")
return spec->plugin();
}
QTC_ASSERT(false, return nullptr);
}
ExtensionSystem::IPlugin *CppQuickFixFactory::cppEditor()
{
static ExtensionSystem::IPlugin *plugin = getCppEditor();
return plugin;
}
namespace Internal {
const QStringList magicQObjectFunctions()
{
static QStringList list{"metaObject", "qt_metacast", "qt_metacall", "qt_static_metacall"};
return list;
}
CppQuickFixOperation::CppQuickFixOperation(const CppQuickFixInterface &interface, int priority)
: QuickFixOperation(priority), CppQuickFixInterface(interface)
{}
CppQuickFixOperation::~CppQuickFixOperation() = default;
} // namespace Internal
} // namespace CppEditor
|