Implement diff for unsaved changes

Task-number: QTCREATORBUG-9732
Change-Id: I7e0f1d18046451ac1bc84b8c28113d72f63642a8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jarek Kobus
2016-10-05 13:22:55 +02:00
committed by Jarek Kobus
parent 90cf4487a5
commit ee095ef5d5
2 changed files with 276 additions and 40 deletions

View File

@@ -27,8 +27,13 @@
#include "diffeditor_global.h"
#include <texteditor/textdocument.h>
#include <extensionsystem/iplugin.h>
QT_FORWARD_DECLARE_CLASS(QAction)
namespace Core { class IEditor; }
namespace DiffEditor {
namespace Internal {
@@ -42,7 +47,11 @@ public:
void extensionsInitialized();
private slots:
void diff();
void updateCurrentEditor(Core::IEditor *editor);
void updateActions();
void diffCurrentFile();
void diffAllModifiedFiles();
void diffExternalFiles();
#ifdef WITH_TESTS
void testMakePatch_data();
@@ -50,6 +59,9 @@ private slots:
void testReadPatch_data();
void testReadPatch();
#endif // WITH_TESTS
private:
QAction *m_diffCurrentFileAction;
QPointer<TextEditor::TextDocument> m_currentTextDocument;
};
} // namespace Internal