Cache the UTF-8 encoded contents of the text editors, and some cleanup in updateEditorSelections().

This commit is contained in:
Roberto Raggi
2009-03-02 16:30:25 +01:00
parent a8cfda0ddb
commit b74fcb7702
4 changed files with 22 additions and 14 deletions

View File

@@ -61,7 +61,7 @@ public:
int updateDocumentInterval() const;
void setUpdateDocumentInterval(int updateDocumentInterval);
QString contents();
QByteArray contents(); // UTF-8 encoded
Q_SIGNALS:
void contentsChanged();
@@ -78,7 +78,7 @@ private:
QTimer *_updateDocumentTimer;
int _updateDocumentInterval;
QFuture<void> _documentParser;
QString _cachedContents;
QByteArray _cachedContents;
};
} // namespace Internal