head	1.2;
access;
symbols
	RELEASE_7_3_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2010.05.10.08.43.19;	author fluffy;	state dead;
branches;
next	1.1;

1.1
date	2010.01.05.08.15.13;	author fluffy;	state Exp;
branches;
next	;


desc
@@


1.2
log
@- Update Krusader2 to 2.2.0-Beta1 release
@
text
@Index: ./krusader/Dialogs/checksumdlg.cpp
===================================================================
--- ./krusader/Dialogs/checksumdlg.cpp	(Revision 1051213)
+++ ./krusader/Dialogs/checksumdlg.cpp	(Arbeitskopie)
@@@@ -49,7 +49,7 @@@@
 
 class CS_Tool; // forward
 typedef void PREPARE_PROC_FUNC(KProcess& proc, CS_Tool *self, const QStringList& files,
-                               const QString checksumFile, bool recursive, const QString& type = QString());
+                               const QString checksumFile, bool recursive, const QString& type);
 typedef QStringList GET_FAILED_FUNC(const QStringList& stdOut, const QStringList& stdErr);
 
 class CS_Tool
Index: ./krusader/Dialogs/krdialogs.cpp
===================================================================
--- ./krusader/Dialogs/krdialogs.cpp	(Revision 1051213)
+++ ./krusader/Dialogs/krdialogs.cpp	(Arbeitskopie)
@@@@ -59,7 +59,7 @@@@
             u.addPath(temp.path());
             u.cleanPath();
             if (u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso") {
-                if (QDir(u.path()).exists()) {
+                if (QDir(u.toLocalFile()).exists()) {
                     u.setProtocol("file");
                 }
             }
@@@@ -87,7 +87,7 @@@@
             u.addPath(temp.path());
             u.cleanPath();
             if (u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso") {
-                if (QDir(u.path()).exists()) {
+                if (QDir(u.toLocalFile()).exists()) {
                     u.setProtocol("file");
                 }
             }
@@@@ -115,7 +115,7 @@@@
             u.addPath(temp.path());
             u.cleanPath();
             if (u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso") {
-                if (QDir(u.path()).exists()) {
+                if (QDir(u.toLocalFile()).exists()) {
                     u.setProtocol("file");
                 }
             }
@@@@ -146,7 +146,7 @@@@
             u.addPath(temp.path());
             u.cleanPath();
             if (u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso") {
-                if (QDir(u.path()).exists()) {
+                if (QDir(u.toLocalFile()).exists()) {
                     u.setProtocol("file");
                 }
             }
Index: ./krusader/Dialogs/popularurls.cpp
===================================================================
--- ./krusader/Dialogs/popularurls.cpp	(Revision 1051213)
+++ ./krusader/Dialogs/popularurls.cpp	(Arbeitskopie)
@@@@ -352,7 +352,7 @@@@
     for (it = list.begin(); it != list.end(); ++it) {
         QTreeWidgetItem *item = new QTreeWidgetItem(urls, lastItem);
         lastItem = item;
-        item->setText(0, (*it).isLocalFile() ? (*it).path() : (*it).prettyUrl());
+        item->setText(0, (*it).isLocalFile() ? (*it).toLocalFile() : (*it).prettyUrl());
         item->setIcon(0, (*it).isLocalFile() ? SmallIcon("folder") : SmallIcon("folder-html"));
     }
 
Index: ./krusader/BookMan/krbookmarkhandler.cpp
===================================================================
--- ./krusader/BookMan/krbookmarkhandler.cpp	(Revision 1051213)
+++ ./krusader/BookMan/krbookmarkhandler.cpp	(Arbeitskopie)
@@@@ -367,7 +367,7 @@@@
             KUrl::List::Iterator it;
             for (it = list.begin(); it != list.end(); ++it) {
                 QString name;
-                if ((*it).isLocalFile()) name = (*it).path();
+                if ((*it).isLocalFile()) name = (*it).toLocalFile();
                 else name = (*it).prettyUrl();
                 // note: these bookmark are put into the private collection
                 // as to not spam the general collection
Index: ./krusader/Synchronizer/synchronizertask.cpp
===================================================================
--- ./krusader/Synchronizer/synchronizertask.cpp	(Revision 1051213)
+++ ./krusader/Synchronizer/synchronizertask.cpp	(Arbeitskopie)
@@@@ -141,16 +141,16 @@@@
     m_state = ST_STATE_PENDING;
 
     if (leftURL.isLocalFile() && rightURL.isLocalFile()) {
-        leftFile = new QFile(leftURL.path());
+        leftFile = new QFile(leftURL.toLocalFile());
         if (!leftFile->open(QIODevice::ReadOnly)) {
-            KMessageBox::error(parentWidget, i18n("Error at opening %1!", leftURL.path()));
+            KMessageBox::error(parentWidget, i18n("Error at opening %1!", leftURL.toLocalFile()));
             m_state = ST_STATE_ERROR;
             return;
         }
 
         rightFile = new QFile(rightURL.path());
         if (!rightFile->open(QIODevice::ReadOnly)) {
-            KMessageBox::error(parentWidget, i18n("Error at opening %1!", rightURL.path()));
+            KMessageBox::error(parentWidget, i18n("Error at opening %1!", rightURL.toLocalFile()));
             m_state = ST_STATE_ERROR;
             return;
         }
Index: ./krusader/Synchronizer/synchronizerdirlist.cpp
===================================================================
--- ./krusader/Synchronizer/synchronizerdirlist.cpp	(Revision 1051213)
+++ ./krusader/Synchronizer/synchronizerdirlist.cpp	(Arbeitskopie)
@@@@ -127,7 +127,7 @@@@
     }
 
     if (url.isLocalFile()) {
-        QString path = url.path(KUrl::RemoveTrailingSlash);
+        QString path = url.toLocalFile(KUrl::RemoveTrailingSlash);
         DIR* dir = opendir(path.toLocal8Bit());
         if (!dir)  {
             KMessageBox::error(parentWidget, i18n("Can't open the %1 directory!", path), i18n("Error"));
Index: ./krusader/Synchronizer/synchronizer.cpp
===================================================================
--- ./krusader/Synchronizer/synchronizer.cpp	(Revision 1051213)
+++ ./krusader/Synchronizer/synchronizer.cpp	(Arbeitskopie)
@@@@ -1031,7 +1031,7 @@@@
                     timestamp.actime = time(0);
                     timestamp.modtime = item->rightDate() - timeOffset;
 
-                    utime((const char *)(leftURL.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
+                    utime((const char *)(leftURL.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
 
                     uid_t newOwnerID = (uid_t) - 1; // chown(2) : -1 means no change
                     if (!item->rightOwner().isEmpty()) {
@@@@ -1068,7 +1068,7 @@@@
                     timestamp.actime = time(0);
                     timestamp.modtime = item->leftDate() + timeOffset;
 
-                    utime((const char *)(rightURL.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
+                    utime((const char *)(rightURL.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
 
                     uid_t newOwnerID = (uid_t) - 1; // chown(2) : -1 means no change
                     if (!item->leftOwner().isEmpty()) {
Index: ./krusader/VFS/vfs.cpp
===================================================================
--- ./krusader/VFS/vfs.cpp	(Revision 1051213)
+++ ./krusader/VFS/vfs.cpp	(Arbeitskopie)
@@@@ -97,7 +97,7 @@@@
 QString vfs::pathOrUrl(const KUrl &originIn, KUrl::AdjustPathOption trailingSlash)
 {
     if (originIn.isLocalFile())
-        return originIn.path(trailingSlash);
+        return originIn.toLocalFile(trailingSlash);
     return originIn.prettyUrl(trailingSlash);
 }
 
@@@@ -300,7 +300,7 @@@@
     kds_totalDirs  = totalDirs;
 
     if (url.isLocalFile()) {
-        vfs_calcSpaceLocal(url.path(KUrl::RemoveTrailingSlash), totalSize, totalFiles, totalDirs, stop);
+        vfs_calcSpaceLocal(url.toLocalFile(KUrl::RemoveTrailingSlash), totalSize, totalFiles, totalDirs, stop);
         return;
     } else {
         stat_busy = true;
Index: ./krusader/VFS/virt_vfs.cpp
===================================================================
--- ./krusader/VFS/virt_vfs.cpp	(Revision 1051213)
+++ ./krusader/VFS/virt_vfs.cpp	(Arbeitskopie)
@@@@ -267,7 +267,7 @@@@
     // get file statistics
     QString name;
     if (url.isLocalFile())
-        name = url.path();
+        name = url.toLocalFile();
     else
         name = url.prettyUrl();
 
Index: ./krusader/VFS/abstractthreadedjob.cpp
===================================================================
--- ./krusader/VFS/abstractthreadedjob.cpp	(Revision 1051213)
+++ ./krusader/VFS/abstractthreadedjob.cpp	(Arbeitskopie)
@@@@ -392,7 +392,7 @@@@
 QString AbstractJobThread::tempFileIfRemote(const KUrl &kurl, const QString &type)
 {
     if (kurl.isLocalFile()) {
-        return kurl.path();
+        return kurl.toLocalFile();
     }
 
     _tempFile = new KTemporaryFile();
@@@@ -409,7 +409,7 @@@@
 QString AbstractJobThread::tempDirIfRemote(const KUrl &kurl)
 {
     if (kurl.isLocalFile()) {
-        return kurl.path(KUrl::RemoveTrailingSlash);
+        return kurl.toLocalFile(KUrl::RemoveTrailingSlash);
     }
 
     _tempDir = new KTempDir();
Index: ./krusader/VFS/krquery.cpp
===================================================================
--- ./krusader/VFS/krquery.cpp	(Revision 1051213)
+++ ./krusader/VFS/krquery.cpp	(Arbeitskopie)
@@@@ -241,7 +241,7 @@@@
         timer.start();
 
         if (vf->vfile_getUrl().isLocalFile()) {
-            if (!containsContent(vf->vfile_getUrl().path())) return false;
+            if (!containsContent(vf->vfile_getUrl().toLocalFile())) return false;
         } else {
             if (containOnRemote) {
                 if (processEventsConnected == 0) return false;
Index: ./krusader/VFS/preserveattrcopyjob.cpp
===================================================================
--- ./krusader/VFS/preserveattrcopyjob.cpp	(Revision 1051213)
+++ ./krusader/VFS/preserveattrcopyjob.cpp	(Arbeitskopie)
@@@@ -1096,7 +1096,7 @@@@
         if (uDest.isLocalFile()) {
             // if the source is a devices url, handle it a littlebit special
 
-            QString path = uDest.path();
+            QString path = uDest.toLocalFile();
             //kDebug(7007) << "PreserveAttrCopyJob::copyNextFile path=" << path;
             QFile f(path);
             if (f.open(QIODevice::ReadWrite)) {
@@@@ -1286,7 +1286,7 @@@@
         for (; it != m_directoriesCopied.end() ; ++it) {
             const KUrl& url = (*it).uDest;
             if (url.isLocalFile() && (*it).mtime != (time_t) - 1) {
-                const QByteArray path = QFile::encodeName(url.path());
+                const QByteArray path = QFile::encodeName(url.toLocalFile());
                 KDE_struct_stat statbuf;
                 if (KDE_lstat(path, &statbuf) == 0) {
                     struct utimbuf utbuf;
@@@@ -1401,8 +1401,8 @@@@
                  err == ERR_DIR_ALREADY_EXIST ||
                  err == ERR_IDENTICAL_FILES)) {
             //kDebug(7007) << "Couldn't rename directly, dest already exists. Detected special case of lower/uppercase renaming in same dir, try with 2 rename calls";
-            QByteArray _src(QFile::encodeName(m_currentSrcURL.path()));
-            QByteArray _dest(QFile::encodeName(dest.path()));
+            QByteArray _src(QFile::encodeName(m_currentSrcURL.toLocalFile()));
+            QByteArray _dest(QFile::encodeName(dest.toLocalFile()));
             KTemporaryFile tmpFile;
             tmpFile.setPrefix(m_currentSrcURL.directory(KUrl::ObeyTrailingSlash));
             tmpFile.setAutoRemove(false);
@@@@ -1473,13 +1473,13 @@@@
 
                 KDE_struct_stat stat_buf;
                 if (m_currentSrcURL.isLocalFile() &&
-                        KDE_stat(QFile::encodeName(m_currentSrcURL.path()), &stat_buf) == 0) {
+                        KDE_stat(QFile::encodeName(m_currentSrcURL.toLocalFile()), &stat_buf) == 0) {
                     sizeSrc = stat_buf.st_size;
                     ctimeSrc = stat_buf.st_ctime;
                     mtimeSrc = stat_buf.st_mtime;
                 }
                 if (dest.isLocalFile() &&
-                        KDE_stat(QFile::encodeName(dest.path()), &stat_buf) == 0) {
+                        KDE_stat(QFile::encodeName(dest.toLocalFile()), &stat_buf) == 0) {
                     sizeDest = stat_buf.st_size;
                     ctimeDest = stat_buf.st_ctime;
                     mtimeDest = stat_buf.st_mtime;
@@@@ -1655,11 +1655,11 @@@@
 
         if ((*it).uSource.isLocalFile()) {
             KDE_struct_stat stat_p;
-            KDE_lstat((*it).uSource.path(KUrl::RemoveTrailingSlash).toLocal8Bit(), &stat_p);    /* getting the date information */
+            KDE_lstat((*it).uSource.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit(), &stat_p);    /* getting the date information */
 
             QString aclStr;
 #ifdef HAVE_POSIX_ACL
-            acl_t acl = acl_get_file((*it).uSource.path(KUrl::RemoveTrailingSlash).toLocal8Bit(), ACL_TYPE_ACCESS);
+            acl_t acl = acl_get_file((*it).uSource.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit(), ACL_TYPE_ACCESS);
 
             bool aclExtended = false;
             if (acl) {
@@@@ -1717,7 +1717,7 @@@@
         QString path = to.path(KUrl::RemoveTrailingSlash);
 
         for (; i != directoriesToStamp.count(); i++)  // sort the URL-s to avoid parent time stamp modification
-            if (path >= directoriesToStamp[ i ].path(KUrl::RemoveTrailingSlash))
+            if (path >= directoriesToStamp[ i ].toLocalFile(KUrl::RemoveTrailingSlash))
                 break;
 
         if (i != directoriesToStamp.count()) {
@@@@ -1740,22 +1740,22 @@@@
                 timestamp.actime  = time(0);
                 timestamp.modtime = mtime;
 
-                ::utime((const char *)(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
+                ::utime((const char *)(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), &timestamp);
             }
 
             if (attrs.uid != (uid_t) - 1)
-                ::chown((const char *)(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), attrs.uid, (gid_t) - 1);
+                ::chown((const char *)(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), attrs.uid, (gid_t) - 1);
             if (attrs.gid != (gid_t) - 1)
-                ::chown((const char *)(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), (uid_t) - 1, attrs.gid);
+                ::chown((const char *)(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), (uid_t) - 1, attrs.gid);
 
             if (attrs.mode != (mode_t) - 1)
-                ::chmod((const char *)(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit()), attrs.mode);
+                ::chmod((const char *)(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit()), attrs.mode);
 
 #ifdef HAVE_POSIX_ACL
             if (!attrs.acl.isNull()) {
                 acl_t acl = acl_from_text(attrs.acl.toLatin1());
                 if (acl && !acl_valid(acl))
-                    acl_set_file(to.path(KUrl::RemoveTrailingSlash).toLocal8Bit(), ACL_TYPE_ACCESS, acl);
+                    acl_set_file(to.toLocalFile(KUrl::RemoveTrailingSlash).toLocal8Bit(), ACL_TYPE_ACCESS, acl);
                 if (acl)
                     acl_free(acl);
             }
Index: ./krusader/krslots.cpp
===================================================================
--- ./krusader/krslots.cpp	(Revision 1051213)
+++ ./krusader/krslots.cpp	(Arbeitskopie)
@@@@ -205,7 +205,7 @@@@
                 KMessageBox::sorry(krApp, i18n("Krusader is unable to download %1", url1.fileName()));
                 return;
             }
-        } else tmp1 = url1.path();
+        } else tmp1 = url1.toLocalFile();
         if (!url2.isLocalFile()) {
             if (!KIO::NetAccess::download(url2, tmp2, 0)) {
                 KMessageBox::sorry(krApp, i18n("Krusader is unable to download %1", url2.fileName()));
@@@@ -213,11 +213,11 @@@@
                     KIO::NetAccess::removeTempFile(tmp1);
                 return;
             }
-        } else tmp2 = url2.path();
+        } else tmp2 = url2.toLocalFile();
     }
 
-    KrProcess *p = new KrProcess(tmp1 != url1.path() ? tmp1 : QString(),
-                                 tmp2 != url2.path() ? tmp2 : QString());
+    KrProcess *p = new KrProcess(tmp1 != url1.toLocalFile() ? tmp1 : QString(),
+                                 tmp2 != url2.toLocalFile() ? tmp2 : QString());
     *p << diffProg << tmp1 << tmp2;
     p->start();
     if (!p->waitForStarted())
Index: ./krusader/paneltabbar.cpp
===================================================================
--- ./krusader/paneltabbar.cpp	(Revision 1051213)
+++ ./krusader/paneltabbar.cpp	(Arbeitskopie)
@@@@ -35,7 +35,7 @@@@
 #include "Panel/listpanel.h"
 #include "defaults.h"
 
-#define DISPLAY(X) (X.isLocalFile() ? X.path() : X.prettyUrl())
+#define DISPLAY(X) (X.isLocalFile() ? X.toLocalFile() : X.prettyUrl())
 
 PanelTabBar::PanelTabBar(QWidget *parent): KTabBar(parent), _maxTabLength(0)
 {
Index: ./krusader/main.cpp
===================================================================
--- ./krusader/main.cpp	(Revision 1051213)
+++ ./krusader/main.cpp	(Arbeitskopie)
@@@@ -75,7 +75,7 @@@@
 
     bool hasIcon = false;
     int i = 0;
-    char * myArgv[argc+2];
+    char **myArgv = new char *[argc+2];
 
 // if no --miniicon is given, --icon is used. So we don't need to check for --miniicon separately
     for (i = 0; i < argc; ++i) {
@@@@ -85,7 +85,7 @@@@
 
     static const char* const icon_text = "--icon";
     const char* icon_name = Krusader::privIcon();
-    char addedParams[strlen(icon_text)+strlen(icon_name)+2];
+    char *addedParams = new char[strlen(icon_text)+strlen(icon_name)+2];
 
     if (! hasIcon) {
         for (i = 0; i < argc; ++i)
@@@@ -223,6 +223,8 @@@@
     if (reply.isValid() && (bool)reply) {
         fprintf(stderr, "%s", i18n("Application already running!\n").toLocal8Bit().data());
         KStartupInfo::appStarted();
+        delete [] addedParams;
+        delete [] myArgv;
         return 1;
     }
 
@@@@ -268,4 +270,6 @@@@
 
     // let's go.
     return app.exec();
+    delete [] addedParams;
+    delete [] myArgv;  
 }
Index: ./krusader/Panel/panelfunc.cpp
===================================================================
--- ./krusader/Panel/panelfunc.cpp	(Revision 1051213)
+++ ./krusader/Panel/panelfunc.cpp	(Arbeitskopie)
@@@@ -803,12 +803,12 @@@@
     } else if (url.isLocalFile()) {
         bool encrypted;
         QString mime = vf->vfile_getMime();
-        QString type = KRarcHandler::getType(encrypted, url.path(), mime, false);
+        QString type = KRarcHandler::getType(encrypted, url.toLocalFile(), mime, false);
 
         if (KRarcHandler::arcSupported(type)) {    // archive autodetection
             // here we check whether KDE supports tar
             if (type == "-tlz") {
-                KTar tapeArchive(url.path());
+                KTar tapeArchive(url.toLocalFile());
                 if (tapeArchive.open(QIODevice::ReadOnly))
                     url.setProtocol("tar");
                 else
@@@@ -909,7 +909,7 @@@@
     KTemporaryFile *tempDestFile = 0;
     QString arcFile;
     if (destURL.isLocalFile())
-        arcFile = destURL.path();
+        arcFile = destURL.toLocalFile();
     else if (destURL.protocol() == "virt") {
         KMessageBox::error(krApp, i18n("Cannot pack files onto a virtual destination!"));
         return;
Index: ./krusader/krservices.cpp
===================================================================
--- ./krusader/krservices.cpp	(Revision 1051213)
+++ ./krusader/krservices.cpp	(Arbeitskopie)
@@@@ -209,7 +209,7 @@@@
 
 QString KrServices::getPath(const KUrl & url, KUrl::AdjustPathOption trailing)
 {
-    QString path = url.path(trailing);
+	QString path = url.isLocalFile() ? url.toLocalFile() : url.path(trailing);
     REPLACE_DIR_SEP2(path);
 
 #ifdef Q_WS_WIN
Index: ./krusader/KViewer/krviewer.cpp
===================================================================
--- ./krusader/KViewer/krviewer.cpp	(Revision 1051213)
+++ ./krusader/KViewer/krviewer.cpp	(Arbeitskopie)
@@@@ -313,7 +313,7 @@@@
         // if the file is local, pass a normal path and not a url. this solves
         // the problem for editors that aren't url-aware
         if (url.isLocalFile())
-            proc << edit.split(' ') << url.path();
+            proc << edit.split(' ') << url.toLocalFile();
         else
             proc << edit.split(' ') << url.prettyUrl();
         if (!proc.startDetached())
@@@@ -764,7 +764,7 @@@@
                 KMessageBox::sorry(this, i18n("KrViewer is unable to download: ") + url.url());
                 return ;
             }
-        } else file = url.path();
+        } else file = url.toLocalFile();
 
 
         // create a hex file
Index: ./krusader/KViewer/lister.cpp
===================================================================
--- ./krusader/KViewer/lister.cpp	(Revision 1051213)
+++ ./krusader/KViewer/lister.cpp	(Arbeitskopie)
@@@@ -1241,7 +1241,7 @@@@
     _fileSize = 0;
 
     if (listerUrl.isLocalFile()) {
-        _filePath = listerUrl.path();
+        _filePath = listerUrl.toLocalFile();
         if (!QFile::exists(_filePath))
             return false;
         _fileSize = getFileSize();
Index: ./krArc/krarc.cpp
===================================================================
--- ./krArc/krarc.cpp	(Revision 1051213)
+++ ./krArc/krarc.cpp	(Arbeitskopie)
@@@@ -62,8 +62,12 @@@@
         f.close();                \
     } while(0);
 #else
+#ifdef _MSC_VER
+#define KRDEBUG(X)
+#else
 #define KRDEBUG(X...)
 #endif
+#endif
 
 using namespace KIO;
 extern "C"
@@@@ -1861,7 +1865,7 @@@@
 
 QString kio_krarcProtocol::getPath(const KUrl & url, KUrl::AdjustPathOption trailing)
 {
-    QString path = url.path(trailing);
+	QString path = url.isLocalFile() ? url.toLocalFile(trailing) : url.path(trailing);
     REPLACE_DIR_SEP2(path);
 
 #ifdef Q_WS_WIN
@


1.1
log
@- Fix deadlocks in vfs error messages
- Fix local file handling

Obtained from:	krusader svn repo
Approved by:	miwi, tabthorpe (mentors implicit)
@
text
@@

