forked from qt-creator/qt-creator
CppEditor: Remove CppToolsBridge & friends
This redirection did nothing except to horribly obfuscate the code. Note that most callers already accessed the model manager directly, and some bridge functions were not called at all. Change-Id: Ic1c728afe79bf98544da23a1955ee82d0dbde94f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
#include <cppeditor/cppmodelmanager.h>
|
||||
#include <cppeditor/editordocumenthandle.h>
|
||||
#include <cppeditor/projectinfo.h>
|
||||
#include <cppeditor/cpptoolsbridge.h>
|
||||
|
||||
#include <texteditor/codeassist/functionhintproposal.h>
|
||||
#include <texteditor/codeassist/iassistprocessor.h>
|
||||
@@ -164,7 +163,7 @@ void removeNonCppEditors(QList<Core::IEditor*> &visibleEditors)
|
||||
|
||||
Utf8StringVector visibleCppEditorDocumentsFilePaths()
|
||||
{
|
||||
auto visibleEditors = CppEditor::CppToolsBridge::visibleEditors();
|
||||
auto visibleEditors = Core::EditorManager::visibleEditors();
|
||||
|
||||
removeNonCppEditors(visibleEditors);
|
||||
|
||||
|
@@ -30,8 +30,6 @@
|
||||
#include "clangcompletionassistprocessor.h"
|
||||
#include "clangeditordocumentprocessor.h"
|
||||
|
||||
#include <cppeditor/cpptoolsbridge.h>
|
||||
|
||||
#include <clangsupport/clangcodemodelclientmessages.h>
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
@@ -36,7 +36,6 @@
|
||||
|
||||
#include <cppeditor/cppdoxygen.h>
|
||||
#include <cppeditor/cppmodelmanager.h>
|
||||
#include <cppeditor/cpptoolsbridge.h>
|
||||
#include <cppeditor/editordocumenthandle.h>
|
||||
|
||||
#include <texteditor/codeassist/assistproposalitem.h>
|
||||
|
@@ -42,7 +42,6 @@
|
||||
#include <cppeditor/compileroptionsbuilder.h>
|
||||
#include <cppeditor/cppcodemodelsettings.h>
|
||||
#include <cppeditor/cppmodelmanager.h>
|
||||
#include <cppeditor/cpptoolsbridge.h>
|
||||
#include <cppeditor/cpptoolsreuse.h>
|
||||
#include <cppeditor/cppworkingcopy.h>
|
||||
#include <cppeditor/editordocumenthandle.h>
|
||||
@@ -416,9 +415,8 @@ void ClangEditorDocumentProcessor::clearDiagnosticsWithFixIts()
|
||||
|
||||
ClangEditorDocumentProcessor *ClangEditorDocumentProcessor::get(const QString &filePath)
|
||||
{
|
||||
auto *processor = CppEditor::CppToolsBridge::baseEditorDocumentProcessor(filePath);
|
||||
|
||||
return qobject_cast<ClangEditorDocumentProcessor*>(processor);
|
||||
return qobject_cast<ClangEditorDocumentProcessor*>(
|
||||
CppEditor::CppModelManager::cppEditorDocumentProcessor(filePath));
|
||||
}
|
||||
|
||||
static bool isProjectPartLoadedOrIsFallback(CppEditor::ProjectPart::ConstPtr projectPart)
|
||||
|
@@ -96,9 +96,6 @@ add_qtc_plugin(CppEditor
|
||||
cppsemanticinfoupdater.cpp cppsemanticinfoupdater.h
|
||||
cppsourceprocessor.cpp cppsourceprocessor.h
|
||||
cppsymbolinfo.h
|
||||
cpptoolsbridge.cpp cpptoolsbridge.h
|
||||
cpptoolsbridgeinterface.h
|
||||
cpptoolsbridgeqtcreatorimplementation.cpp cpptoolsbridgeqtcreatorimplementation.h
|
||||
cpptoolsjsextension.cpp cpptoolsjsextension.h
|
||||
cpptoolsreuse.cpp cpptoolsreuse.h
|
||||
cpptoolssettings.cpp cpptoolssettings.h
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include "cppcodemodelsettings.h"
|
||||
#include "cppeditor_utils.h"
|
||||
#include "cppmodelmanager.h"
|
||||
#include "cpptoolsbridge.h"
|
||||
#include "cpptoolsreuse.h"
|
||||
#include "editordocumenthandle.h"
|
||||
|
||||
@@ -104,7 +103,7 @@ void BaseEditorDocumentProcessor::runParser(QFutureInterface<void> &future,
|
||||
}
|
||||
|
||||
parser->update(future, updateParams);
|
||||
CppToolsBridge::finishedRefreshingSourceFiles({parser->filePath()});
|
||||
CppModelManager::instance()->finishedRefreshingSourceFiles({parser->filePath()});
|
||||
|
||||
future.setProgressValue(1);
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include "cppeditorwidget.h"
|
||||
#include "cppeditordocument.h"
|
||||
#include "cppmodelmanager.h"
|
||||
#include "cpptoolsbridge.h"
|
||||
#include "cpptoolsreuse.h"
|
||||
#include "cppworkingcopy.h"
|
||||
|
||||
@@ -1539,7 +1538,7 @@ void CppCodeModelInspectorDialog::refresh()
|
||||
if (editor) {
|
||||
const QString editorFilePath = editor->document()->filePath().toString();
|
||||
cppEditorDocument = cmmi->cppEditorDocument(editorFilePath);
|
||||
if (auto documentProcessor = CppToolsBridge::baseEditorDocumentProcessor(editorFilePath)) {
|
||||
if (auto documentProcessor = CppModelManager::cppEditorDocumentProcessor(editorFilePath)) {
|
||||
const Snapshot editorSnapshot = documentProcessor->snapshot();
|
||||
m_snapshotInfos->append(SnapshotInfo(editorSnapshot, SnapshotInfo::EditorSnapshot));
|
||||
const QString editorSnapshotTitle
|
||||
|
@@ -91,9 +91,6 @@ HEADERS += \
|
||||
cppsemanticinfoupdater.h \
|
||||
cppsourceprocessor.h \
|
||||
cppsymbolinfo.h \
|
||||
cpptoolsbridge.h \
|
||||
cpptoolsbridgeinterface.h \
|
||||
cpptoolsbridgeqtcreatorimplementation.h \
|
||||
cpptoolsjsextension.h \
|
||||
cpptoolsreuse.h \
|
||||
cpptoolssettings.h \
|
||||
@@ -205,8 +202,6 @@ SOURCES += \
|
||||
cppselectionchanger.cpp \
|
||||
cppsemanticinfoupdater.cpp \
|
||||
cppsourceprocessor.cpp \
|
||||
cpptoolsbridge.cpp \
|
||||
cpptoolsbridgeqtcreatorimplementation.cpp \
|
||||
cpptoolsjsextension.cpp \
|
||||
cpptoolsreuse.cpp \
|
||||
cpptoolssettings.cpp \
|
||||
|
@@ -205,11 +205,6 @@ QtcPlugin {
|
||||
"cppsourceprocessor.cpp",
|
||||
"cppsourceprocessor.h",
|
||||
"cppsymbolinfo.h",
|
||||
"cpptoolsbridge.cpp",
|
||||
"cpptoolsbridge.h",
|
||||
"cpptoolsbridgeinterface.h",
|
||||
"cpptoolsbridgeqtcreatorimplementation.cpp",
|
||||
"cpptoolsbridgeqtcreatorimplementation.h",
|
||||
"cpptoolsjsextension.cpp",
|
||||
"cpptoolsjsextension.h",
|
||||
"cpptoolsreuse.cpp",
|
||||
|
@@ -44,8 +44,6 @@
|
||||
#include "cppquickfixes.h"
|
||||
#include "cppquickfixprojectsettingswidget.h"
|
||||
#include "cppquickfixsettingspage.h"
|
||||
#include "cpptoolsbridge.h"
|
||||
#include "cpptoolsbridgeqtcreatorimplementation.h"
|
||||
#include "cpptoolsreuse.h"
|
||||
#include "cpptoolssettings.h"
|
||||
#include "cpptypehierarchy.h"
|
||||
@@ -227,8 +225,6 @@ static QHash<QString, QString> m_headerSourceMapping;
|
||||
CppEditorPlugin::CppEditorPlugin()
|
||||
{
|
||||
m_instance = this;
|
||||
CppToolsBridge::setCppToolsBridgeImplementation(
|
||||
std::make_unique<CppToolsBridgeQtCreatorImplementation>());
|
||||
}
|
||||
|
||||
CppEditorPlugin::~CppEditorPlugin()
|
||||
|
@@ -33,7 +33,6 @@
|
||||
#include "cppeditorplugin.h"
|
||||
#include "cppelementevaluator.h"
|
||||
#include "cppmodelmanager.h"
|
||||
#include "cpptoolsbridge.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
@@ -224,7 +223,7 @@ void CppIncludeHierarchyItem::fetchMore()
|
||||
|
||||
setChildrenChecked();
|
||||
if (m_subTree == InIncludes) {
|
||||
auto processor = CppToolsBridge::baseEditorDocumentProcessor(editorFilePath);
|
||||
auto processor = CppModelManager::cppEditorDocumentProcessor(editorFilePath);
|
||||
QTC_ASSERT(processor, return);
|
||||
const Snapshot snapshot = processor->snapshot();
|
||||
const FileAndLines includes = findIncludes(filePath(), snapshot);
|
||||
|
@@ -849,6 +849,12 @@ CppEditorDocumentHandle *CppModelManager::cppEditorDocument(const QString &fileP
|
||||
return d->m_cppEditorDocuments.value(filePath, 0);
|
||||
}
|
||||
|
||||
BaseEditorDocumentProcessor *CppModelManager::cppEditorDocumentProcessor(const QString &filePath)
|
||||
{
|
||||
const auto document = instance()->cppEditorDocument(filePath);
|
||||
return document ? document->processor() : nullptr;
|
||||
}
|
||||
|
||||
void CppModelManager::registerCppEditorDocument(CppEditorDocumentHandle *editorDocument)
|
||||
{
|
||||
QTC_ASSERT(editorDocument, return);
|
||||
|
@@ -148,6 +148,7 @@ public:
|
||||
|
||||
QList<CppEditorDocumentHandle *> cppEditorDocuments() const;
|
||||
CppEditorDocumentHandle *cppEditorDocument(const QString &filePath) const;
|
||||
static BaseEditorDocumentProcessor *cppEditorDocumentProcessor(const QString &filePath);
|
||||
void registerCppEditorDocument(CppEditorDocumentHandle *cppEditorDocument);
|
||||
void unregisterCppEditorDocument(const QString &filePath);
|
||||
|
||||
|
@@ -37,7 +37,6 @@
|
||||
#include "cppquickfixassistant.h"
|
||||
#include "cppquickfixprojectsettings.h"
|
||||
#include "cpprefactoringchanges.h"
|
||||
#include "cpptoolsbridge.h"
|
||||
#include "cpptoolsreuse.h"
|
||||
#include "cppvirtualfunctionassistprovider.h"
|
||||
#include "includeutils.h"
|
||||
@@ -7551,7 +7550,8 @@ void ConvertQt4Connect::match(const CppQuickFixInterface &interface, QuickFixOpe
|
||||
void ExtraRefactoringOperations::match(const CppQuickFixInterface &interface,
|
||||
QuickFixOperations &result)
|
||||
{
|
||||
const auto processor = CppToolsBridge::baseEditorDocumentProcessor(interface.filePath().toString());
|
||||
const auto processor = CppModelManager::cppEditorDocumentProcessor(
|
||||
interface.filePath().toString());
|
||||
if (processor) {
|
||||
const auto clangFixItOperations = processor->extraRefactoringOperations(interface);
|
||||
result.append(clangFixItOperations);
|
||||
|
@@ -29,7 +29,6 @@
|
||||
#include "cppmodelmanager.h"
|
||||
#include "cppsourceprocessertesthelper.h"
|
||||
#include "cppsourceprocessor.h"
|
||||
#include "cpptoolsbridge.h"
|
||||
#include "cpptoolstestcase.h"
|
||||
#include "editordocumenthandle.h"
|
||||
|
||||
@@ -132,7 +131,7 @@ void SourceProcessorTest::testIncludesCyclic()
|
||||
|
||||
// Check editor snapshot
|
||||
const QString filePath = editor->document()->filePath().toString();
|
||||
auto *processor = CppToolsBridge::baseEditorDocumentProcessor(filePath);
|
||||
auto *processor = CppModelManager::cppEditorDocumentProcessor(filePath);
|
||||
QVERIFY(processor);
|
||||
QVERIFY(TestCase::waitForProcessedEditorDocument(filePath));
|
||||
Snapshot snapshot = processor->snapshot();
|
||||
|
@@ -1,66 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "cpptoolsbridge.h"
|
||||
|
||||
#include "cpptoolsbridgeinterface.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
namespace CppEditor {
|
||||
|
||||
std::unique_ptr<CppToolsBridgeInterface> CppToolsBridge::m_interface;
|
||||
|
||||
void CppToolsBridge::setCppToolsBridgeImplementation(std::unique_ptr<CppToolsBridgeInterface> &&interface)
|
||||
{
|
||||
m_interface = std::move(interface);
|
||||
}
|
||||
|
||||
CppEditorDocumentHandle *CppToolsBridge::cppEditorDocument(const QString &filePath)
|
||||
{
|
||||
return m_interface->cppEditorDocument(filePath);
|
||||
}
|
||||
|
||||
QString CppToolsBridge::projectPartIdForFile(const QString &filePath)
|
||||
{
|
||||
return m_interface->projectPartIdForFile(filePath);
|
||||
}
|
||||
|
||||
BaseEditorDocumentProcessor *CppToolsBridge::baseEditorDocumentProcessor(const QString &filePath)
|
||||
{
|
||||
return m_interface->baseEditorDocumentProcessor(filePath);
|
||||
}
|
||||
|
||||
void CppToolsBridge::finishedRefreshingSourceFiles(const QSet<QString> &filePaths)
|
||||
{
|
||||
m_interface->finishedRefreshingSourceFiles(filePaths);
|
||||
}
|
||||
|
||||
QList<Core::IEditor *> CppToolsBridge::visibleEditors()
|
||||
{
|
||||
return m_interface->visibleEditors();
|
||||
}
|
||||
|
||||
} // namespace CppEditor
|
@@ -1,57 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cppeditor_global.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Core { class IEditor; }
|
||||
|
||||
namespace CppEditor {
|
||||
class CppEditorDocumentHandle;
|
||||
class BaseEditorDocumentProcessor;
|
||||
class CppToolsBridgeInterface;
|
||||
|
||||
class CPPEDITOR_EXPORT CppToolsBridge
|
||||
{
|
||||
public:
|
||||
static void setCppToolsBridgeImplementation(std::unique_ptr<CppToolsBridgeInterface> &&interface
|
||||
);
|
||||
|
||||
static CppEditorDocumentHandle *cppEditorDocument(const QString &filePath);
|
||||
static QString projectPartIdForFile(const QString &filePath);
|
||||
static BaseEditorDocumentProcessor *baseEditorDocumentProcessor(const QString &filePath);
|
||||
static void finishedRefreshingSourceFiles(const QSet<QString> &filePaths);
|
||||
static QList<Core::IEditor *> visibleEditors();
|
||||
|
||||
private:
|
||||
static std::unique_ptr<CppToolsBridgeInterface> m_interface;
|
||||
};
|
||||
|
||||
} // namespace CppEditor
|
@@ -1,51 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QList>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QString;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core { class IEditor; }
|
||||
|
||||
namespace CppEditor {
|
||||
class CppEditorDocumentHandle;
|
||||
class BaseEditorDocumentProcessor;
|
||||
|
||||
class CppToolsBridgeInterface
|
||||
{
|
||||
public:
|
||||
virtual ~CppToolsBridgeInterface() = default;
|
||||
virtual CppEditorDocumentHandle *cppEditorDocument(const QString &filePath) const = 0;
|
||||
virtual QString projectPartIdForFile(const QString &filePath) const = 0;
|
||||
virtual BaseEditorDocumentProcessor *baseEditorDocumentProcessor(const QString &filePath) const = 0;
|
||||
virtual void finishedRefreshingSourceFiles(const QSet<QString> &filePaths) const = 0;
|
||||
virtual QList<Core::IEditor *> visibleEditors() const = 0;
|
||||
};
|
||||
|
||||
} // namespace CppEditor
|
@@ -1,94 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "cpptoolsbridgeqtcreatorimplementation.h"
|
||||
|
||||
#include "baseeditordocumentparser.h"
|
||||
#include "cppmodelmanager.h"
|
||||
#include "projectpart.h"
|
||||
#include "editordocumenthandle.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
namespace CppEditor::Internal {
|
||||
|
||||
CppEditorDocumentHandle *
|
||||
CppToolsBridgeQtCreatorImplementation::cppEditorDocument(const QString &filePath) const
|
||||
{
|
||||
return CppModelManager::instance()->cppEditorDocument(filePath);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
ProjectPart::ConstPtr projectPartForFile(const QString &filePath)
|
||||
{
|
||||
if (const auto parser = BaseEditorDocumentParser::get(filePath))
|
||||
return parser->projectPartInfo().projectPart;
|
||||
|
||||
return ProjectPart::ConstPtr();
|
||||
}
|
||||
|
||||
bool isProjectPartValid(const ProjectPart::ConstPtr projectPart)
|
||||
{
|
||||
if (projectPart)
|
||||
return !CppModelManager::instance()->projectPartForId(projectPart->id()).isNull();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
QString CppToolsBridgeQtCreatorImplementation::projectPartIdForFile(const QString &filePath) const
|
||||
{
|
||||
const ProjectPart::ConstPtr projectPart = projectPartForFile(filePath);
|
||||
|
||||
if (isProjectPartValid(projectPart))
|
||||
return projectPart->id(); // OK, Project Part is still loaded
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
BaseEditorDocumentProcessor *
|
||||
CppToolsBridgeQtCreatorImplementation::baseEditorDocumentProcessor(const QString &filePath) const
|
||||
{
|
||||
auto *document = cppEditorDocument(filePath);
|
||||
if (document)
|
||||
return document->processor();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CppToolsBridgeQtCreatorImplementation::finishedRefreshingSourceFiles(
|
||||
const QSet<QString> &filePaths) const
|
||||
{
|
||||
CppModelManager::instance()->finishedRefreshingSourceFiles(filePaths);
|
||||
}
|
||||
|
||||
QList<Core::IEditor *> CppToolsBridgeQtCreatorImplementation::visibleEditors() const
|
||||
{
|
||||
return Core::EditorManager::visibleEditors();
|
||||
}
|
||||
|
||||
} // namespace CppEditor::Internal
|
@@ -1,42 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cpptoolsbridgeinterface.h"
|
||||
|
||||
namespace CppEditor::Internal {
|
||||
|
||||
class CppToolsBridgeQtCreatorImplementation final : public CppToolsBridgeInterface
|
||||
{
|
||||
public:
|
||||
CppEditorDocumentHandle *cppEditorDocument(const QString &filePath) const override;
|
||||
QString projectPartIdForFile(const QString &filePath) const override;
|
||||
BaseEditorDocumentProcessor *baseEditorDocumentProcessor(const QString &filePath) const override;
|
||||
void finishedRefreshingSourceFiles(const QSet<QString> &filePaths) const override;
|
||||
QList<Core::IEditor *> visibleEditors() const override;
|
||||
};
|
||||
|
||||
} // namespace CppEditor::Internal
|
Reference in New Issue
Block a user