forked from qt-creator/qt-creator
CppEditor: Hide CppRefactoringChangesData
Change-Id: I5d88651a9b3a295bd95de5ee5e9b117e449195b3 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "cpprefactoringchanges.h"
|
||||
|
||||
#include "cppeditorconstants.h"
|
||||
#include "cppworkingcopy.h"
|
||||
|
||||
#include <projectexplorer/editorconfiguration.h>
|
||||
|
||||
@@ -22,6 +23,18 @@ using namespace CPlusPlus;
|
||||
using namespace Utils;
|
||||
|
||||
namespace CppEditor {
|
||||
namespace Internal {
|
||||
class CppRefactoringChangesData
|
||||
{
|
||||
public:
|
||||
explicit CppRefactoringChangesData(const CPlusPlus::Snapshot &snapshot);
|
||||
|
||||
CPlusPlus::Snapshot m_snapshot;
|
||||
WorkingCopy m_workingCopy;
|
||||
};
|
||||
} // namespace Internal
|
||||
|
||||
using namespace Internal;
|
||||
|
||||
static std::unique_ptr<TextEditor::Indenter> createIndenter(const FilePath &filePath,
|
||||
QTextDocument *textDocument)
|
||||
|
||||
@@ -6,22 +6,19 @@
|
||||
#include "cppeditor_global.h"
|
||||
|
||||
#include "cppmodelmanager.h"
|
||||
#include "cppworkingcopy.h"
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
|
||||
#include <texteditor/refactoringchanges.h>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace CppEditor {
|
||||
|
||||
class CppRefactoringChanges;
|
||||
class CppRefactoringFile;
|
||||
class CppRefactoringChangesData;
|
||||
using CppRefactoringFilePtr = QSharedPointer<CppRefactoringFile>;
|
||||
using CppRefactoringFileConstPtr = QSharedPointer<const CppRefactoringFile>;
|
||||
|
||||
namespace Internal { class CppRefactoringChangesData; }
|
||||
|
||||
class CPPEDITOR_EXPORT CppRefactoringFile: public TextEditor::RefactoringFile
|
||||
{
|
||||
public:
|
||||
@@ -52,7 +49,8 @@ public:
|
||||
QString textOf(const CPlusPlus::AST *ast) const;
|
||||
|
||||
private:
|
||||
CppRefactoringFile(const Utils::FilePath &filePath, const QSharedPointer<CppRefactoringChangesData> &data);
|
||||
CppRefactoringFile(const Utils::FilePath &filePath,
|
||||
const QSharedPointer<Internal::CppRefactoringChangesData> &data);
|
||||
CppRefactoringFile(QTextDocument *document, const Utils::FilePath &filePath);
|
||||
explicit CppRefactoringFile(TextEditor::TextEditorWidget *editor);
|
||||
|
||||
@@ -67,20 +65,11 @@ private:
|
||||
int startIndex) const;
|
||||
|
||||
mutable CPlusPlus::Document::Ptr m_cppDocument;
|
||||
QSharedPointer<CppRefactoringChangesData> m_data;
|
||||
QSharedPointer<Internal::CppRefactoringChangesData> m_data;
|
||||
|
||||
friend class CppRefactoringChanges; // for access to constructor
|
||||
};
|
||||
|
||||
class CPPEDITOR_EXPORT CppRefactoringChangesData
|
||||
{
|
||||
public:
|
||||
explicit CppRefactoringChangesData(const CPlusPlus::Snapshot &snapshot);
|
||||
|
||||
CPlusPlus::Snapshot m_snapshot;
|
||||
WorkingCopy m_workingCopy;
|
||||
};
|
||||
|
||||
class CPPEDITOR_EXPORT CppRefactoringChanges: public TextEditor::RefactoringFileFactory
|
||||
{
|
||||
public:
|
||||
@@ -98,7 +87,7 @@ public:
|
||||
const CPlusPlus::Snapshot &snapshot() const;
|
||||
|
||||
private:
|
||||
const QSharedPointer<CppRefactoringChangesData> m_data;
|
||||
const QSharedPointer<Internal::CppRefactoringChangesData> m_data;
|
||||
};
|
||||
|
||||
} // namespace CppEditor
|
||||
|
||||
Reference in New Issue
Block a user