[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: disabling kio_devices
From: Stephan Kulow <coolo () kde ! org>
Date: 2002-10-28 23:00:37
[Download RAW message or body]
On Montag, 28. Oktober 2002 14:44, Stephan Kulow wrote:
> Hi!
>
> devices:/ has one critical bug open for over three weeks now
> without any progress and it's not a one line fix, but from what
> I would say a design flaw:
> http://bugs.kde.org/show_bug.cgi?id=48923
>
> David and I think, kio_devices should be disabled completly for
> the 3.1 release (including the kcontrol part of it) if that bug
> can't be fixed til we tag RC1 (which is about to be impossible
> as it's tonight).
>
> I will do that tonight unless Joseph can come up with a solution
> quickly. The solution to return desktop files from devices:/ is already
> prepared in the sources, but has never been implemented ;(
OK, please check the attached patch. It disallows the move of trash
and delete for protocols that do not support deleting.
Greetings, Stephan
["patch" (text/x-diff)]
Index: konq_operations.cc
===================================================================
RCS file: /home/kde/kdebase/libkonq/konq_operations.cc,v
retrieving revision 1.103
diff -u -p -u -r1.103 konq_operations.cc
--- konq_operations.cc 2002/09/27 18:04:04 1.103
+++ konq_operations.cc 2002/10/28 22:57:43
@@ -191,8 +191,18 @@ void KonqOperations::copy( QWidget * par
(void) new KonqCommandRecorder( \
method==MOVE?KonqCommand::MOVE:KonqCommand::LINK, selectedURLs, destUrl, job ); };
-void KonqOperations::_del( int method, const KURL::List & selectedURLs, int \
confirmation ) +void KonqOperations::_del( int method, const KURL::List & \
_selectedURLs, int confirmation ) {
+ KURL::List selectedURLs;
+ for (KURL::List::ConstIterator it = _selectedURLs.begin(); it != \
_selectedURLs.end(); ++it) + if (KProtocolInfo::supportsDeleting(*it))
+ selectedURLs.append(*it);
+ if (selectedURLs.isEmpty()) {
+ delete this;
+ return;
+ }
+
m_method = method;
if ( confirmation == SKIP_CONFIRMATION || askDeleteConfirmation( selectedURLs, \
confirmation ) ) {
@@ -536,8 +546,16 @@ void KonqOperations::asyncDrop( const KF
void KonqOperations::doFileCopy()
{
assert(m_info); // setDropInfo - and asyncDrop - should have been called before \
asyncDrop
- KURL::List lst = m_info->lst;
+ KURL::List lst;
QDropEvent::Action action = m_info->action;
+
+ for (KURL::List::Iterator it = m_info->lst.begin(); it != m_info->lst.end(); \
++it) + if ( KProtocolInfo::supportsDeleting( *it ) )
+ lst.append(*it);
+
+ if (lst.isEmpty())
+ return;
+
if ( m_destURL.path( 1 ) == KGlobalSettings::trashPath() )
{
if ( askDeleteConfirmation( lst, DEFAULT_CONFIRMATION ) )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic