diff options
author | Fritz Elfert <felfert@to.com> | 2002-08-11 01:41:45 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2002-08-11 01:41:45 +0000 |
commit | 0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1 (patch) | |
tree | bf25a83298b223ea71428b1453f3b3a04de902ef /kde2/kpsion/kpsion.cpp | |
parent | 8a6406733e385afc86d9937ff79f228ef40afc99 (diff) | |
download | plptools-0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1.tar.gz plptools-0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1.tar.bz2 plptools-0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1.zip |
- Fixed setting of CFLAGS and CXXFLAGS: With --enable-debug, disable -O
- Removed ccmalloc support. Now using valgrind
- Added missing mainainer-clean-local targets
- Fixed uninitialized array in IOwatch, reported by valgrind.
- Fixed missing definition of LC_ALL if compiling without -O
- Fixed invalid access to datapump thread (not yet created), reported by
valgrind.
- Fixed wrong parameters of QRegExp when using QT 3.x
- Fixed KTar initialization which has changed in KDE 3.x
Diffstat (limited to 'kde2/kpsion/kpsion.cpp')
-rw-r--r-- | kde2/kpsion/kpsion.cpp | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/kde2/kpsion/kpsion.cpp b/kde2/kpsion/kpsion.cpp index 64bffd8..18e9374 100644 --- a/kde2/kpsion/kpsion.cpp +++ b/kde2/kpsion/kpsion.cpp @@ -28,7 +28,6 @@ #include "kpsionconfig.h" #include "wizards.h" -#include <kapp.h> #include <klocale.h> #include <kaction.h> #include <kstdaction.h> @@ -180,7 +179,11 @@ psion2unix(const char * const path) { QString tmp = path; tmp.replace(QRegExp("%"), "%25"); tmp.replace(QRegExp("/"), "%2f"); +#if QT_VERSION >= 300 + tmp.replace(QRegExp("\\\\"), "/"); +#else tmp.replace(QRegExp("\\"), "/"); +#endif return tmp; } @@ -909,7 +912,11 @@ doBackup() { strftime(tstr, sizeof(tstr), "%Y-%m-%d-%H-%M-%S.tmp.gz", localtime(&now)); archiveName += tstr; +#if KDE_VERSION >= 300 + backupTgz = new KTar(archiveName, "application/x-gzip"); +#else backupTgz = new KTarGz(archiveName); +#endif backupTgz->open(IO_WriteOnly); createIndex(); @@ -924,7 +931,6 @@ doBackup() { for (int i = 0; i < toBackup.size(); i++) { PlpDirent e = toBackup[i]; const char *fn = e.getName(); - QString unixname = psion2unix(fn); QByteArray ba; QDataStream os(ba, IO_WriteOnly); @@ -980,7 +986,8 @@ doBackup() { break; if (res != rfsv::E_PSI_GEN_NONE) continue; - backupTgz->writeFile(unixname, "root", "root", ba.size(), ba.data()); + backupTgz->writeFile(psion2unix(fn), "root", "root", ba.size(), + ba.data()); } if (!badBackup) { @@ -1088,7 +1095,11 @@ removeOldBackups(QStringList &drives) { while ((fi = it.current())) { kapp->processEvents(); +#if KDE_VERSION >= 300 + KTar tgz(fi->absFilePath()); +#else KTarGz tgz(fi->absFilePath()); +#endif const KTarEntry *te; tgz.open(IO_ReadOnly); @@ -1128,7 +1139,11 @@ removeOldBackups(QStringList &drives) { while ((fi = it.current())) { kapp->processEvents(); +#if KDE_VERSION >= 300 + KTar tgz(fi->absFilePath()); +#else KTarGz tgz(fi->absFilePath()); +#endif const KTarEntry *te; bool valid = false; bool del = false; @@ -1308,7 +1323,11 @@ slotStartRestore() { for (t = tars.begin(); t != tars.end(); t++) { PlpDir toRestore = restoreDialog.getRestoreList(*t); if (toRestore.size() > 0) { +#if KDE_VERSION >= 300 + KTar tgz(*t); +#else KTarGz tgz(*t); +#endif const KTarEntry *te; QString pDir(""); @@ -1318,7 +1337,6 @@ slotStartRestore() { PlpDirent olde; const char *fn = e.getName(); - QString unixname = psion2unix(fn); Enum<rfsv::errs> res; progressLocal = e.getSize(); @@ -1327,7 +1345,7 @@ slotStartRestore() { emit setProgressText(QString("%1").arg(fn)); emit setProgress(0); - te = findTarEntry(tgz.directory(), unixname); + te = findTarEntry(tgz.directory(), psion2unix(fn)); if (te != 0L) { u_int32_t handle; QString cpDir(fn); |