mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 02:49:12 -04:00
refactor: Remove legacy code (#344)
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
// Copyright (C) 2025 Povilas Kanapickas <povilas@radix.lt>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "context/IDocumentReader.hpp"
|
||||
#include <memory>
|
||||
#include <QTextDocument>
|
||||
|
||||
namespace QodeAssist {
|
||||
|
||||
class MockDocumentReader : public Context::IDocumentReader
|
||||
{
|
||||
public:
|
||||
MockDocumentReader() = default;
|
||||
|
||||
Context::DocumentInfo readDocument(const QString &path) const override
|
||||
{
|
||||
return m_documentInfo;
|
||||
}
|
||||
|
||||
void setDocumentInfo(const QString &text, const QString &filePath, const QString &mimeType)
|
||||
{
|
||||
m_document = std::make_unique<QTextDocument>(text);
|
||||
m_documentInfo.document = m_document.get();
|
||||
m_documentInfo.filePath = filePath;
|
||||
m_documentInfo.mimeType = mimeType;
|
||||
}
|
||||
|
||||
~MockDocumentReader() = default;
|
||||
|
||||
private:
|
||||
Context::DocumentInfo m_documentInfo;
|
||||
std::unique_ptr<QTextDocument> m_document;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist
|
||||
Reference in New Issue
Block a user