summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-06-04 00:16:26 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-06-04 00:16:26 (GMT)
commit2490f061b9c5d954ab69e146bf43ab72abdb3ee0 (patch)
treea93c1d6d0cb19aa7725fbd21d8ce5b92eb1e8318
parent6d730b31c8f683fba0f705fc1c12f0a85e9296c0 (diff)
KTemporaryFile->QTemporaryFile.
-rw-r--r--editor/kgpgeditor.cpp9
-rw-r--r--foldercompressjob.cpp11
-rw-r--r--foldercompressjob.h4
-rw-r--r--kgpgexternalactions.cpp7
-rw-r--r--kgpgexternalactions.h4
5 files changed, 19 insertions, 16 deletions
diff --git a/editor/kgpgeditor.cpp b/editor/kgpgeditor.cpp
index da04f29..2990e02 100644
--- a/editor/kgpgeditor.cpp
+++ b/editor/kgpgeditor.cpp
@@ -34,11 +34,11 @@
#include <KFind>
#include <KFileDialog>
#include <KFindDialog>
+#include <KGlobal>
#include <KLocale>
#include <KMessageBox>
#include <KRecentFilesAction>
#include <KStandardAction>
-#include <KTemporaryFile>
#include <KToggleAction>
#include <KToolBar>
@@ -46,10 +46,11 @@
#include <QIcon>
#include <QMenuBar>
#include <QPainter>
-#include <QTextCodec>
-#include <QTextStream>
#include <QPrintDialog>
#include <QPrinter>
+#include <QTemporaryFile>
+#include <QTextCodec>
+#include <QTextStream>
#include <QVBoxLayout>
#include <QWidget>
#include <kio/netaccess.h>
@@ -314,7 +315,7 @@ bool KgpgEditor::slotFileSave()
}
else
{
- KTemporaryFile tmpfile;
+ QTemporaryFile tmpfile;
tmpfile.open();
QTextStream stream(&tmpfile);
stream.setCodec(cod);
diff --git a/foldercompressjob.cpp b/foldercompressjob.cpp
index bd50acc..abe88b1 100644
--- a/foldercompressjob.cpp
+++ b/foldercompressjob.cpp
@@ -16,30 +16,31 @@
#include <KArchive>
#include <KLocale>
#include <KTar>
-#include <KTemporaryFile>
#include <KZip>
+
#include <QDir>
#include <QMetaObject>
#include <QStringList>
+#include <QTemporaryFile>
class FolderCompressJobPrivate {
FolderCompressJob * const q_ptr;
Q_DECLARE_PUBLIC(FolderCompressJob)
public:
- FolderCompressJobPrivate(FolderCompressJob *parent, const KUrl::List &sources, const KUrl &dest, KTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions, const int archive);
+ FolderCompressJobPrivate(FolderCompressJob *parent, const KUrl::List &sources, const KUrl &dest, QTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions, const int archive);
const QString m_description;
const KUrl::List m_sources;
const KUrl m_dest;
- KTemporaryFile * const m_tempfile;
+ QTemporaryFile * const m_tempfile;
const QStringList m_keys;
QStringList m_options;
const KGpgEncrypt::EncryptOptions m_encOptions;
const int m_archiveType;
};
-FolderCompressJobPrivate::FolderCompressJobPrivate(FolderCompressJob *parent, const KUrl::List &sources, const KUrl &dest, KTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions, const int archive)
+FolderCompressJobPrivate::FolderCompressJobPrivate(FolderCompressJob *parent, const KUrl::List &sources, const KUrl &dest, QTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions, const int archive)
: q_ptr(parent),
m_description(i18n("Processing folder compression and encryption")),
m_sources(sources),
@@ -52,7 +53,7 @@ FolderCompressJobPrivate::FolderCompressJobPrivate(FolderCompressJob *parent, co
{
}
-FolderCompressJob::FolderCompressJob(QObject *parent, const KUrl::List &sources, const KUrl &dest, KTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions, const int archive)
+FolderCompressJob::FolderCompressJob(QObject *parent, const KUrl::List &sources, const KUrl &dest, QTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions, const int archive)
: KJob(parent),
d_ptr(new FolderCompressJobPrivate(this, sources, dest, tempfile, keys, options, encOptions, archive))
{
diff --git a/foldercompressjob.h b/foldercompressjob.h
index 980ea95..6aefb70 100644
--- a/foldercompressjob.h
+++ b/foldercompressjob.h
@@ -17,7 +17,7 @@
#include <KJob>
#include <KUrl>
-class KTemporaryFile;
+class QTemporaryFile;
class QString;
class QStringList;
@@ -51,7 +51,7 @@ public:
* @param encOptions special options to pass to the GnuPG process
* @param archive the archive type to use
*/
- FolderCompressJob(QObject *parent, const KUrl::List &sources, const KUrl &dest, KTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions, const int archive);
+ FolderCompressJob(QObject *parent, const KUrl::List &sources, const KUrl &dest, QTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions, const int archive);
/**
* @brief FolderCompressJob destructor
diff --git a/kgpgexternalactions.cpp b/kgpgexternalactions.cpp
index 56a3d38..53e3cd3 100644
--- a/kgpgexternalactions.cpp
+++ b/kgpgexternalactions.cpp
@@ -34,12 +34,13 @@
#include "transactions/kgpgverify.h"
#include <KActionCollection>
-#include <KMessageBox>
-#include <KTemporaryFile>
#include <KHelpClient>
+#include <KMessageBox>
+
#include <QFont>
#include <QProcess>
#include <QStringListModel>
+#include <QTemporaryFile>
#include <kio/global.h>
#include <kio/renamedialog.h>
#include <kjobtrackerinterface.h>
@@ -123,7 +124,7 @@ void KGpgExternalActions::slotEncryptionKeySelected()
void KGpgExternalActions::encryptFolders(KeysManager *parent, const KUrl::List &urls)
{
- KTemporaryFile *tmpfolder = new KTemporaryFile();
+ QTemporaryFile *tmpfolder = new QTemporaryFile();
if (!tmpfolder->open()) {
delete tmpfolder;
diff --git a/kgpgexternalactions.h b/kgpgexternalactions.h
index 7159f0c..bc698e8 100644
--- a/kgpgexternalactions.h
+++ b/kgpgexternalactions.h
@@ -27,7 +27,7 @@ class KGpgFirstAssistant;
class KGpgItemModel;
class KJob;
class QKeySequence;
-class KTemporaryFile;
+class QTemporaryFile;
class QString;
/**
@@ -69,7 +69,7 @@ private:
int compressionScheme;
QClipboard::Mode clipboardMode;
KGpgItemModel *m_model;
- KTemporaryFile *m_kgpgfoldertmp;
+ QTemporaryFile *m_kgpgfoldertmp;
void startAssistant();
void firstRun();