- Fix deadlocks in vfs error messages

- Fix local file handling

Obtained from:	krusader svn repo
Approved by:	miwi, tabthorpe (mentors implicit)
This commit is contained in:
Dima Panov 2010-01-05 08:15:13 +00:00
parent 53d62e0123
commit b05a3201f8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=247195
3 changed files with 601 additions and 2 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= krusader
PORTVERSION= 2.1.0.b1
PORTREVISION= 1
CATEGORIES= x11-fm kde
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:S/.b/-beta/}/
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.b/-beta/}
@ -17,8 +18,8 @@ COMMENT= A two window file-manager for KDE, like midnight or norton commander
USE_KDE4= kdelibs kdeprefix kdehier automoc4
KDE4_BUILDENV= yes
USE_QT_VER= 4
QT_COMPONENTS= gui network xml moc_build qmake_build\
rcc_build uic_build
QT_COMPONENTS= gui network xml moc_build qmake_build \
rcc_build uic_build
USE_BZIP2= yes
USE_GETTEXT= yes
USE_ICONV= yes

View file

@ -0,0 +1,109 @@
diff -urN --exclude=.svn krusader-2.1.0-beta1/ChangeLog krusader/ChangeLog
--- ./ChangeLog 2009-11-01 08:11:41.000000000 +1000
+++ ./ChangeLog 2009-11-16 19:10:44.000000000 +1000
@@ -11,6 +11,8 @@
CHANGED: the packer/unpacker/archive tester are job based now
CHANGED: the old views were replaced by the interviews
+ FIXED: deadlock when trying to display error message after failed mount
+ FIXED: [ 2858133 ] wrong background color in listviews
FIXED: [ 2857663 ] deadlock when trying to display error message after failed unmount
FIXED: problem with autorefresh in the new interviews
FIXED: [ 2609505 ] problem with directory refresh
diff -urN --exclude=.svn krusader-2.1.0-beta1/krusader/GUI/mediabutton.cpp krusader/krusader/GUI/mediabutton.cpp
--- ./krusader/GUI/mediabutton.cpp 2009-11-01 08:11:25.000000000 +1000
+++ ./krusader/GUI/mediabutton.cpp 2009-11-16 19:02:30.000000000 +1000
@@ -416,10 +416,12 @@
name = udiNameMap[ udi ];
if (errorData.isValid()) {
- KMessageBox::sorry(this, i18n("An error occurred while accessing '%1', the system responded: %2",
+ KMessageBox::queuedMessageBox(this, KMessageBox::Sorry,
+ i18n("An error occurred while accessing '%1', the system responded: %2",
name, errorData.toString()));
} else {
- KMessageBox::sorry(this, i18n("An error occurred while accessing '%1'",
+ KMessageBox::queuedMessageBox(this, KMessageBox::Sorry,
+ i18n("An error occurred while accessing '%1'",
name));
}
}
diff -urN --exclude=.svn krusader-2.1.0-beta1/krusader/Panel/krinterbriefview.cpp krusader/krusader/Panel/krinterbriefview.cpp
--- ./krusader/Panel/krinterbriefview.cpp 2009-11-01 08:11:35.000000000 +1000
+++ ./krusader/Panel/krinterbriefview.cpp 2009-11-16 19:08:14.000000000 +1000
@@ -264,8 +264,12 @@
void KrInterBriefView::refreshColors()
{
- if (_model->rowCount() != 0)
- _model->emitChanged();
+ QPalette p(palette());
+ KrColorGroup cg;
+ KrColorCache::getColorCache().getColors(cg, KrColorItemType(KrColorItemType::File,
+ false, _focused, false, false));
+ p.setColor(QPalette::Base, cg.background());
+ setPalette(p);
}
void KrInterBriefView::restoreSettings()
diff -urN --exclude=.svn krusader-2.1.0-beta1/krusader/Panel/krinterdetailedview.cpp krusader/krusader/Panel/krinterdetailedview.cpp
--- ./krusader/Panel/krinterdetailedview.cpp 2009-11-01 08:11:35.000000000 +1000
+++ ./krusader/Panel/krinterdetailedview.cpp 2009-11-16 19:08:14.000000000 +1000
@@ -265,8 +265,12 @@
void KrInterDetailedView::refreshColors()
{
- if (_model->rowCount() != 0)
- _model->emitChanged();
+ QPalette p(palette());
+ KrColorGroup cg;
+ KrColorCache::getColorCache().getColors(cg, KrColorItemType(KrColorItemType::File,
+ false, _focused, false, false));
+ p.setColor(QPalette::Base, cg.background());
+ setPalette(p);
}
void KrInterDetailedView::restoreSettings()
diff -urN --exclude=.svn krusader-2.1.0-beta1/krusader/Queue/queue_mgr.cpp krusader/krusader/Queue/queue_mgr.cpp
--- ./krusader/Queue/queue_mgr.cpp 2009-11-01 08:11:21.000000000 +1000
+++ ./krusader/Queue/queue_mgr.cpp 2009-11-16 19:02:45.000000000 +1000
@@ -20,6 +20,7 @@
#include "queuedialog.h"
#include "queue.h"
#include <QList>
+#include <QVector>
#include <QVariant>
#include <klocale.h>
#include "../krusader.h"
@@ -44,11 +45,10 @@
if (queuesSize == 0)
queues << defaultName;
- Queue *queueArray [ queuesSize ];
+ QVector<Queue*> queueArray;
- int counter = 0;
foreach(const QString &queueName, queues)
- queueArray[ counter++ ] = createQueue(queueName);
+ queueArray.append(createQueue(queueName));
if (current < queuesSize)
setCurrentQueue(queueArray[ current ]);
diff -urN --exclude=.svn krusader-2.1.0-beta1/krusader/VFS/normal_vfs.h krusader/krusader/VFS/normal_vfs.h
--- ./krusader/VFS/normal_vfs.h 2009-11-01 08:11:12.000000000 +1000
+++ ./krusader/VFS/normal_vfs.h 2009-11-16 18:59:10.000000000 +1000
@@ -70,7 +70,14 @@
/// return the VFS working dir
virtual QString vfs_workingDir() {
+#ifdef Q_OS_WIN
+
+ QString path = vfs_origin.toLocalFile();
+ if(path.endsWith('/')) path.chop(1);
+ return path;
+#else
return vfs_origin.path(KUrl::RemoveTrailingSlash);
+#endif
}
/// Get ACL permissions

View file

@ -0,0 +1,489 @@
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