forked from qt-creator/qt-creator
CppEditor: rename Internal::CppEditorDocumentHandle
... to avoid name duplication with base class. Change-Id: I02d104688e068f1ea1f51bf2e5eb43a3fd7aa551 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -63,17 +63,17 @@ namespace Internal {
|
|||||||
|
|
||||||
enum { processDocumentIntervalInMs = 150 };
|
enum { processDocumentIntervalInMs = 150 };
|
||||||
|
|
||||||
class CppEditorDocumentHandle : public CppTools::CppEditorDocumentHandle
|
class CppEditorDocumentHandleImpl : public CppTools::CppEditorDocumentHandle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CppEditorDocumentHandle(CppEditor::Internal::CppEditorDocument *cppEditorDocument)
|
CppEditorDocumentHandleImpl(CppEditorDocument *cppEditorDocument)
|
||||||
: m_cppEditorDocument(cppEditorDocument)
|
: m_cppEditorDocument(cppEditorDocument)
|
||||||
, m_registrationFilePath(cppEditorDocument->filePath().toString())
|
, m_registrationFilePath(cppEditorDocument->filePath().toString())
|
||||||
{
|
{
|
||||||
mm()->registerCppEditorDocument(this);
|
mm()->registerCppEditorDocument(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~CppEditorDocumentHandle() { mm()->unregisterCppEditorDocument(m_registrationFilePath); }
|
~CppEditorDocumentHandleImpl() { mm()->unregisterCppEditorDocument(m_registrationFilePath); }
|
||||||
|
|
||||||
QString filePath() const { return m_cppEditorDocument->filePath().toString(); }
|
QString filePath() const { return m_cppEditorDocument->filePath().toString(); }
|
||||||
QByteArray contents() const { return m_cppEditorDocument->contentsText(); }
|
QByteArray contents() const { return m_cppEditorDocument->contentsText(); }
|
||||||
@@ -209,7 +209,7 @@ void CppEditorDocument::onFilePathChanged(const Utils::FileName &oldPath,
|
|||||||
|
|
||||||
// Un-Register/Register in ModelManager
|
// Un-Register/Register in ModelManager
|
||||||
m_editorDocumentHandle.reset();
|
m_editorDocumentHandle.reset();
|
||||||
m_editorDocumentHandle.reset(new CppEditorDocumentHandle(this));
|
m_editorDocumentHandle.reset(new CppEditorDocumentHandleImpl(this));
|
||||||
|
|
||||||
resetProcessor();
|
resetProcessor();
|
||||||
updatePreprocessorSettings();
|
updatePreprocessorSettings();
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class CppEditorDocument : public TextEditor::TextDocument
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
friend class CppEditorDocumentHandle;
|
friend class CppEditorDocumentHandleImpl;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CppEditorDocument();
|
explicit CppEditorDocument();
|
||||||
|
|||||||
Reference in New Issue
Block a user