[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise/kdepim/kmail
From: Allen Winter <winter () kde ! org>
Date: 2010-10-15 19:05:12
Message-ID: 20101015190512.10D30AC896 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1186306 by winterz:
when DND an attachment to the desktop, make sure to give the resulting file
write permission.
part of kolab/issue3688
MERGE: trunk
M +2 -1 kmcomposewin.cpp
M +7 -3 urlhandlermanager.cpp
--- branches/kdepim/enterprise/kdepim/kmail/kmcomposewin.cpp #1186305:1186306
@@ -5388,10 +5388,11 @@
KTempDir * tempDir = new KTempDir(); // will be deleted on composer close
tempDir->setAutoDelete( true );
mTempDirs.insert( tempDir );
- const QString fileName = tempDir->name() + "/" + msgPart->name();
+ const QString fileName = tempDir->name() + msgPart->name();
KPIM::kByteArrayToFile(msgPart->bodyDecodedBinary(),
fileName,
false, false, false);
+ KPIM::checkAndCorrectPermissionsIfPossible( fileName, false, true, true );
KURL url;
url.setPath( fileName );
filenames << url.path();
--- branches/kdepim/enterprise/kdepim/kmail/urlhandlermanager.cpp #1186305:1186306
@@ -47,6 +47,8 @@
#include "callback.h"
#include "stl_util.h"
+#include <libkdepim/kfileio.h>
+
#include <kabc/stdaddressbook.h>
#include <kabc/addressee.h>
#include <dcopclient.h>
@@ -777,10 +779,12 @@
if ( !node )
return false;
- KURL file = window->tempFileUrlFromPartNode( node ).path();
- if ( !file.isEmpty() ) {
+ const KURL tUrl = window->tempFileUrlFromPartNode( node );
+ const QString fileName = tUrl.path();
+ if ( !fileName.isEmpty() ) {
+ KPIM::checkAndCorrectPermissionsIfPossible( fileName, false, true, true );
QString icon = node->msgPart().iconName( KIcon::Small );
- KURLDrag* urlDrag = new KURLDrag( file, window );
+ KURLDrag *urlDrag = new KURLDrag( tUrl, window );
if ( !icon.isEmpty() ) {
QPixmap iconMap( icon );
urlDrag->setPixmap( iconMap );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic