blob: 94336fd537dc7ff7dc9c28c802c448dbbac89561 (
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
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "iassistprocessor.h"
#include <QFutureWatcher>
namespace TextEditor {
class TEXTEDITOR_EXPORT AsyncProcessor : public TextEditor::IAssistProcessor
{
public:
AsyncProcessor();
IAssistProposal *perform() override;
bool running() override;
void cancel() override;
virtual IAssistProposal *performAsync() = 0;
virtual IAssistProposal *immediateProposal();
protected:
bool isCanceled() const;
QFutureWatcher<IAssistProposal *> m_watcher;
};
} // namespace TextEditor
|