forked from qt-creator/qt-creator
Clang: Break dependency to visible Core::EditorManager::visibleEditors()
Change-Id: I4157cd190a8c00b07c0e2f3eeeab18409f2405b7 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "cpptoolsbridgeinterface.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
namespace CppTools {
|
||||
|
||||
std::unique_ptr<CppToolsBridgeInterface> CppToolsBridge::m_interface;
|
||||
@@ -56,4 +58,9 @@ void CppToolsBridge::finishedRefreshingSourceFiles(const QSet<QString> &filePath
|
||||
m_interface->finishedRefreshingSourceFiles(filePaths);
|
||||
}
|
||||
|
||||
QList<Core::IEditor *> CppToolsBridge::visibleEditors()
|
||||
{
|
||||
return m_interface->visibleEditors();
|
||||
}
|
||||
|
||||
} // namespace CppTools
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Core {
|
||||
class IEditor;
|
||||
}
|
||||
|
||||
namespace CppTools {
|
||||
class CppEditorDocumentHandle;
|
||||
class BaseEditorDocumentProcessor;
|
||||
@@ -47,6 +51,7 @@ public:
|
||||
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;
|
||||
|
||||
@@ -32,6 +32,10 @@ QT_BEGIN_NAMESPACE
|
||||
class QString;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
class IEditor;
|
||||
}
|
||||
|
||||
namespace CppTools {
|
||||
class CppEditorDocumentHandle;
|
||||
class BaseEditorDocumentProcessor;
|
||||
@@ -44,6 +48,8 @@ public:
|
||||
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 CppTools
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "projectpart.h"
|
||||
#include "editordocumenthandle.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
namespace CppTools {
|
||||
|
||||
namespace Internal {
|
||||
@@ -86,6 +88,11 @@ void CppToolsBridgeQtCreatorImplementation::finishedRefreshingSourceFiles(
|
||||
CppModelManager::instance()->finishedRefreshingSourceFiles(filePaths);
|
||||
}
|
||||
|
||||
QList<Core::IEditor *> CppToolsBridgeQtCreatorImplementation::visibleEditors() const
|
||||
{
|
||||
return Core::EditorManager::visibleEditors();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
} // namespace CppTools
|
||||
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
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 Internal
|
||||
|
||||
Reference in New Issue
Block a user