blob: 29a859777592a752d11cb6bca85b9a19a3192633 (
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
48
49
50
51
52
53
54
55
56
57
58
59
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "cppeditor_global.h"
#include "cppmodelmanager.h"
#include <utils/futuresynchronizer.h>
#include <QFuture>
#include <functional>
namespace Utils { class SearchResultItem; }
namespace CppEditor::Internal {
enum class SymbolType {
Classes = 0x1,
Functions = 0x2,
Enums = 0x4,
Declarations = 0x8,
TypeAliases = 0x16,
AllTypes = Classes | Functions | Enums | Declarations
};
Q_DECLARE_FLAGS(SymbolTypes, SymbolType)
Q_DECLARE_OPERATORS_FOR_FLAGS(SymbolTypes)
enum SearchScope {
SearchProjectsOnly,
SearchGlobal
};
struct SearchParameters
{
QString text;
Utils::FindFlags flags;
SymbolTypes types;
SearchScope scope;
};
CPPEDITOR_EXPORT void searchForSymbols(QPromise<Utils::SearchResultItem> &promise,
const CPlusPlus::Snapshot &snapshot,
const SearchParameters ¶meters,
const QSet<Utils::FilePath> &filePaths);
CPPEDITOR_EXPORT bool isFindErrorsIndexingActive();
CPPEDITOR_EXPORT QFuture<void> refreshSourceFiles(
const std::function<QSet<Utils::FilePath>()> &sourceFiles,
CppModelManager::ProgressNotificationMode mode);
} // namespace CppEditor::Internal
Q_DECLARE_METATYPE(CppEditor::Internal::SearchScope)
Q_DECLARE_METATYPE(CppEditor::Internal::SearchParameters)
Q_DECLARE_METATYPE(CppEditor::Internal::SymbolTypes)
|