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:
Christian Kandeler
2023-11-17 13:26:13 +01:00
parent ac952955a4
commit b8c2be4cf8
2 changed files with 19 additions and 17 deletions

View File

@@ -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