forked from qt-creator/qt-creator
		
	C++: change working-copy to work on UTF-8 encoded QByteArrays.
These not only take less space than UTF-16 encoded QStrings, but due to the caching in the CppEditorSupport also take less time to build. This patch also fixes a number of possible encoding issues, where files and constant strings were (falsely) assumed to be UTF-8. Change-Id: Ib6f91c9a94ebed5b5dfbd4eb2998825c62c72784 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
		@@ -96,7 +96,7 @@ public:
 | 
			
		||||
 | 
			
		||||
    QString fileName() const;
 | 
			
		||||
 | 
			
		||||
    QString contents() const;
 | 
			
		||||
    QByteArray contents() const;
 | 
			
		||||
    unsigned editorRevision() const;
 | 
			
		||||
 | 
			
		||||
    void setExtraDiagnostics(const QString &key,
 | 
			
		||||
@@ -173,7 +173,7 @@ private:
 | 
			
		||||
    QFuture<void> m_documentParser;
 | 
			
		||||
 | 
			
		||||
    // content caching
 | 
			
		||||
    mutable QString m_cachedContents;
 | 
			
		||||
    mutable QByteArray m_cachedContents;
 | 
			
		||||
    mutable int m_cachedContentsEditorRevision;
 | 
			
		||||
    bool m_fileIsBeingReloaded;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user