Commit 791e112c authored by Michal Humpula's avatar Michal Humpula

port away from KTemporaryFile to QTemporaryFile

parent dfaae31d
......@@ -27,7 +27,6 @@
#include <KMessageBox>
#include <kprocess.h>
#include <KRun>
#include <KTemporaryFile>
#include <KPushButton>
#include <KVBox>
#include <klocalizedstring.h>
......@@ -36,6 +35,7 @@
#include <QLabel>
#include <QPushButton>
#include <QTextStream>
#include <QtCore/QTemporaryFile>
class KateDocItem : public QTreeWidgetItem
{
......@@ -240,7 +240,7 @@ void KateMwModOnHdDialog::slotDiff()
if (m_diffFile)
return;
m_diffFile = new KTemporaryFile();
m_diffFile = new QTemporaryFile();
m_diffFile->open();
// Start a KProcess that creates a diff
......
......@@ -31,7 +31,7 @@
typedef QVector<KTextEditor::Document*> DocVector;
class KProcess;
class KTemporaryFile;
class QTemporaryFile;
/**
* A dialog for handling multiple documents modified on disk
......@@ -62,7 +62,7 @@ class KateMwModOnHdDialog : public KDialog
class QTreeWidget *twDocuments;
class QPushButton *btnDiff;
KProcess *m_proc;
KTemporaryFile *m_diffFile;
QTemporaryFile *m_diffFile;
QStringList m_stateTexts;
protected:
......
......@@ -84,7 +84,6 @@
#include <kprocess.h>
#include <krun.h>
#include <kseparator.h>
#include <ktemporaryfile.h>
#include <kpushbutton.h>
#include <kvbox.h>
#include <kactioncollection.h>
......@@ -95,6 +94,7 @@
#include <QtCore/QStringList>
#include <QtCore/QTextCodec>
#include <QtCore/QTextStream>
#include <QtCore/QTemporaryFile>
#include <QtGui/QKeyEvent>
#include <QtGui/QPainter>
#include <QtWidgets/QCheckBox>
......@@ -1504,7 +1504,7 @@ void KateModOnHdPrompt::slotDiff()
if (m_diffFile)
return;
m_diffFile = new KTemporaryFile();
m_diffFile = new QTemporaryFile();
m_diffFile->open();
// Start a KProcess that creates a diff
......
......@@ -61,7 +61,6 @@ namespace KIO
class KComboBox;
class KShortcutsEditor;
class KTemporaryFile;
class KIntNumInput;
class KIntSpinBox;
class KPluginSelector;
......@@ -72,6 +71,7 @@ class QCheckBox;
class QLabel;
class QCheckBox;
class QKeyEvent;
class QTemporaryFile;
namespace Ui
{
......@@ -426,7 +426,7 @@ class KateModOnHdPrompt : public KDialog
KateDocument *m_doc;
KTextEditor::ModificationInterface::ModifiedOnDiskReason m_modtype;
KProcess *m_proc;
KTemporaryFile *m_diffFile;
QTemporaryFile *m_diffFile;
};
#endif
......
......@@ -29,6 +29,8 @@
#include <klocale.h>
#include <klocalizedstring.h>
#include <QtCore/QDir>
//BEGIN SwapDiffCreator
SwapDiffCreator::SwapDiffCreator(Kate::SwapFile* swapFile)
: QObject (swapFile)
......@@ -54,9 +56,9 @@ void SwapDiffCreator::viewDiff()
}
// create all needed tempfiles
m_originalFile.setSuffix(".original");
m_recoveredFile.setSuffix(".recovered");
m_diffFile.setSuffix(".diff");
m_originalFile.setFileTemplate(QDir::tempPath() + QLatin1String("/katepart_XXXXXX.original"));
m_recoveredFile.setFileTemplate(QDir::tempPath() + QLatin1String("/katepart_XXXXXX.recovered"));
m_diffFile.setFileTemplate(QDir::tempPath() + QLatin1String("/katepart_XXXXXX.diff"));
if (!m_originalFile.open() || !m_recoveredFile.open() || !m_diffFile.open()) {
qCWarning(LOG_PART) << "Can't open temporary files needed for diffing";
......
......@@ -23,7 +23,7 @@
#include <QByteArray>
#include <QAction>
#include <KTemporaryFile>
#include <QtCore/QTemporaryFile>
class KProcess;
......@@ -51,9 +51,9 @@ class SwapDiffCreator : public QObject
private:
KProcess* m_proc;
KTemporaryFile m_originalFile;
KTemporaryFile m_recoveredFile;
KTemporaryFile m_diffFile;
QTemporaryFile m_originalFile;
QTemporaryFile m_recoveredFile;
QTemporaryFile m_diffFile;
};
#endif //KATE_SWAP_DIFF_CREATOR_H
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment