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 "cpprefactoringchanges.h"
|
||||||
|
|
||||||
#include "cppeditorconstants.h"
|
#include "cppeditorconstants.h"
|
||||||
|
#include "cppworkingcopy.h"
|
||||||
|
|
||||||
#include <projectexplorer/editorconfiguration.h>
|
#include <projectexplorer/editorconfiguration.h>
|
||||||
|
|
||||||
@@ -22,6 +23,18 @@ using namespace CPlusPlus;
|
|||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace CppEditor {
|
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,
|
static std::unique_ptr<TextEditor::Indenter> createIndenter(const FilePath &filePath,
|
||||||
QTextDocument *textDocument)
|
QTextDocument *textDocument)
|
||||||
|
|||||||
@@ -6,22 +6,19 @@
|
|||||||
#include "cppeditor_global.h"
|
#include "cppeditor_global.h"
|
||||||
|
|
||||||
#include "cppmodelmanager.h"
|
#include "cppmodelmanager.h"
|
||||||
#include "cppworkingcopy.h"
|
|
||||||
|
|
||||||
#include <cplusplus/CppDocument.h>
|
#include <cplusplus/CppDocument.h>
|
||||||
|
|
||||||
#include <texteditor/refactoringchanges.h>
|
#include <texteditor/refactoringchanges.h>
|
||||||
|
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
namespace CppEditor {
|
namespace CppEditor {
|
||||||
|
|
||||||
class CppRefactoringChanges;
|
class CppRefactoringChanges;
|
||||||
class CppRefactoringFile;
|
class CppRefactoringFile;
|
||||||
class CppRefactoringChangesData;
|
|
||||||
using CppRefactoringFilePtr = QSharedPointer<CppRefactoringFile>;
|
using CppRefactoringFilePtr = QSharedPointer<CppRefactoringFile>;
|
||||||
using CppRefactoringFileConstPtr = QSharedPointer<const CppRefactoringFile>;
|
using CppRefactoringFileConstPtr = QSharedPointer<const CppRefactoringFile>;
|
||||||
|
|
||||||
|
namespace Internal { class CppRefactoringChangesData; }
|
||||||
|
|
||||||
class CPPEDITOR_EXPORT CppRefactoringFile: public TextEditor::RefactoringFile
|
class CPPEDITOR_EXPORT CppRefactoringFile: public TextEditor::RefactoringFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -52,7 +49,8 @@ public:
|
|||||||
QString textOf(const CPlusPlus::AST *ast) const;
|
QString textOf(const CPlusPlus::AST *ast) const;
|
||||||
|
|
||||||
private:
|
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);
|
CppRefactoringFile(QTextDocument *document, const Utils::FilePath &filePath);
|
||||||
explicit CppRefactoringFile(TextEditor::TextEditorWidget *editor);
|
explicit CppRefactoringFile(TextEditor::TextEditorWidget *editor);
|
||||||
|
|
||||||
@@ -67,20 +65,11 @@ private:
|
|||||||
int startIndex) const;
|
int startIndex) const;
|
||||||
|
|
||||||
mutable CPlusPlus::Document::Ptr m_cppDocument;
|
mutable CPlusPlus::Document::Ptr m_cppDocument;
|
||||||
QSharedPointer<CppRefactoringChangesData> m_data;
|
QSharedPointer<Internal::CppRefactoringChangesData> m_data;
|
||||||
|
|
||||||
friend class CppRefactoringChanges; // for access to constructor
|
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
|
class CPPEDITOR_EXPORT CppRefactoringChanges: public TextEditor::RefactoringFileFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -98,7 +87,7 @@ public:
|
|||||||
const CPlusPlus::Snapshot &snapshot() const;
|
const CPlusPlus::Snapshot &snapshot() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QSharedPointer<CppRefactoringChangesData> m_data;
|
const QSharedPointer<Internal::CppRefactoringChangesData> m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CppEditor
|
} // namespace CppEditor
|
||||||
|
|||||||
Reference in New Issue
Block a user