CppElementEvaluator: Remove not very useful method

Change-Id: I73545f6366e0f8ca856e15dc4ea28603351a93f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2024-02-03 01:18:55 +01:00
parent 90c227b034
commit 2f81936218
3 changed files with 2 additions and 8 deletions

View File

@@ -56,8 +56,8 @@ private:
}
const FilePath filePath = editorWidget->textDocument()->filePath();
const QStringList fallback = identifierWordsUnderCursor(tc);
if (evaluator.identifiedCppElement()) {
const std::shared_ptr<CppElement> &cppElement = evaluator.cppElement();
const std::shared_ptr<CppElement> &cppElement = evaluator.cppElement();
if (cppElement) {
const QStringList candidates = cppElement->helpIdCandidates;
const HelpItem helpItem(candidates + fallback,
filePath,

View File

@@ -672,11 +672,6 @@ void CppElementEvaluator::execute()
exec(std::ref(d->m_functor), std::bind(&FromGuiFunctor::syncExec, &d->m_functor, _1, _2, _3), false);
}
bool CppElementEvaluator::identifiedCppElement() const
{
return bool(d->m_functor.m_element);
}
const std::shared_ptr<CppElement> &CppElementEvaluator::cppElement() const
{
return d->m_functor.m_element;

View File

@@ -41,7 +41,6 @@ public:
static QFuture<std::shared_ptr<CppElement>> asyncExecute(TextEditor::TextEditorWidget *editor);
static QFuture<std::shared_ptr<CppElement>> asyncExecute(const QString &expression,
const Utils::FilePath &filePath);
bool identifiedCppElement() const;
const std::shared_ptr<CppElement> &cppElement() const;
bool hasDiagnosis() const;
const QString &diagnosis() const;