diff --git a/src/plugins/cppeditor/cpprefactoringchanges.cpp b/src/plugins/cppeditor/cpprefactoringchanges.cpp index e0e0249c0ee..e15dca72cb8 100644 --- a/src/plugins/cppeditor/cpprefactoringchanges.cpp +++ b/src/plugins/cppeditor/cpprefactoringchanges.cpp @@ -4,6 +4,7 @@ #include "cpprefactoringchanges.h" #include "cppeditorconstants.h" +#include "cppworkingcopy.h" #include @@ -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 createIndenter(const FilePath &filePath, QTextDocument *textDocument) diff --git a/src/plugins/cppeditor/cpprefactoringchanges.h b/src/plugins/cppeditor/cpprefactoringchanges.h index 05539d940ab..35e26940de0 100644 --- a/src/plugins/cppeditor/cpprefactoringchanges.h +++ b/src/plugins/cppeditor/cpprefactoringchanges.h @@ -6,22 +6,19 @@ #include "cppeditor_global.h" #include "cppmodelmanager.h" -#include "cppworkingcopy.h" #include #include -#include - namespace CppEditor { - class CppRefactoringChanges; class CppRefactoringFile; -class CppRefactoringChangesData; using CppRefactoringFilePtr = QSharedPointer; using CppRefactoringFileConstPtr = QSharedPointer; +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 &data); + CppRefactoringFile(const Utils::FilePath &filePath, + const QSharedPointer &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 m_data; + QSharedPointer 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 m_data; + const QSharedPointer m_data; }; } // namespace CppEditor