forked from qt-creator/qt-creator
		
	CppTools: CppHighlightingSupport takes a BaseTextDocument
...instead an ITextEditor. The ITextEditor was only used to access the file path and QTextDocument via the BaseTextEditorWidget. Change-Id: Idef2b8162b992fe3718e16e2a046e2ff214846f2 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
		@@ -38,7 +38,7 @@
 | 
			
		||||
 | 
			
		||||
#include <QFuture>
 | 
			
		||||
 | 
			
		||||
namespace TextEditor { class ITextEditor; }
 | 
			
		||||
namespace TextEditor { class BaseTextDocument; }
 | 
			
		||||
 | 
			
		||||
namespace CppTools {
 | 
			
		||||
 | 
			
		||||
@@ -60,7 +60,7 @@ public:
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    CppHighlightingSupport(TextEditor::ITextEditor *editor);
 | 
			
		||||
    CppHighlightingSupport(TextEditor::BaseTextDocument *baseTextDocument);
 | 
			
		||||
    virtual ~CppHighlightingSupport() = 0;
 | 
			
		||||
 | 
			
		||||
    virtual bool requiresSemanticInfo() const = 0;
 | 
			
		||||
@@ -73,11 +73,11 @@ public:
 | 
			
		||||
            const CPlusPlus::Snapshot &snapshot) const = 0;
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
    TextEditor::ITextEditor *editor() const
 | 
			
		||||
    { return m_editor; }
 | 
			
		||||
    TextEditor::BaseTextDocument *baseTextDocument() const
 | 
			
		||||
    { return m_baseTextDocument; }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    TextEditor::ITextEditor *m_editor;
 | 
			
		||||
    TextEditor::BaseTextDocument *m_baseTextDocument;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
} // namespace CppTools
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user