DiffEditor: Preserve source for state recovery

Task-number: QTCREATORBUG-10126
Change-Id: I707e7cdac84c91d52c5661718ac48e3d79fc7c91
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-09-11 22:36:34 +03:00
committed by Orgad Shaneh
parent 18bba097bd
commit f29ce3d9b9
4 changed files with 25 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ struct FileData;
class DIFFEDITOR_EXPORT DiffEditorWidget : public QWidget
{
Q_PROPERTY(QString source READ source WRITE setSource)
Q_OBJECT
public:
struct DiffFileInfo {
@@ -83,6 +84,9 @@ public:
void setDiff(const QList<DiffFilesContents> &diffFileList, const QString &workingDirectory = QString());
QTextCodec *codec() const;
QString source() const;
void setSource(const QString &source);
#ifdef WITH_TESTS
void testAssemblyRows();
#endif // WITH_TESTS
@@ -151,6 +155,7 @@ private:
bool m_syncScrollBars;
bool m_foldingBlocker;
QString m_source;
QTextCharFormat m_fileLineFormat;
QTextCharFormat m_chunkLineFormat;