mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-07-17 20:44:32 -04:00
refactor: Don't use global state in ContextManager::isSpecifyCompletion (#112)
Using global state makes testing things way harder.
This commit is contained in:
committed by
GitHub
parent
3aae923d43
commit
44b3b0cc0c
@ -24,6 +24,7 @@
|
||||
|
||||
#include "ContentFile.hpp"
|
||||
#include "ProgrammingLanguage.hpp"
|
||||
#include "settings/GeneralSettings.hpp"
|
||||
|
||||
namespace QodeAssist::Context {
|
||||
|
||||
@ -35,8 +36,10 @@ public:
|
||||
static ContextManager &instance();
|
||||
QString readFile(const QString &filePath) const;
|
||||
QList<ContentFile> getContentFiles(const QStringList &filePaths) const;
|
||||
ProgrammingLanguage getDocumentLanguage(const QJsonObject &request) const;
|
||||
bool isSpecifyCompletion(const QJsonObject &request);
|
||||
|
||||
static ProgrammingLanguage getDocumentLanguage(const QJsonObject &request);
|
||||
static bool isSpecifyCompletion(
|
||||
const QJsonObject &request, const Settings::GeneralSettings &generalSettings);
|
||||
|
||||
private:
|
||||
explicit ContextManager(QObject *parent = nullptr);
|
||||
|
Reference in New Issue
Block a user