1/*
2 SPDX-FileCopyrightText: 2010-2018 Dominik Haumann <dhaumann@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6#ifndef KATE_SWAP_DIFF_CREATOR_H
7#define KATE_SWAP_DIFF_CREATOR_H
8
9#include <QProcess>
10#include <QTemporaryFile>
11
12namespace Kate
13{
14class SwapFile;
15}
16
17class SwapDiffCreator : public QObject
18{
19public:
20 explicit SwapDiffCreator(Kate::SwapFile *swapFile);
21 ~SwapDiffCreator() override = default;
22
23public:
24 void viewDiff();
25
26private:
27 Kate::SwapFile *const m_swapFile;
28
29protected:
30 void slotDataAvailable();
31 void slotDiffFinished();
32
33private:
34 QProcess m_proc;
35 QTemporaryFile m_originalFile;
36 QTemporaryFile m_recoveredFile;
37 QTemporaryFile m_diffFile;
38};
39
40#endif // KATE_SWAP_DIFF_CREATOR_H
41

source code of ktexteditor/src/swapfile/kateswapdiffcreator.h