Minor code cleanup

pull/2/head
Timothy Pearson 11 years ago
parent b88d1a9c26
commit f534a63b03

@ -1099,12 +1099,15 @@ void KonqIconViewWidget::slotSelectionChanged()
KURL url = item->url(); KURL url = item->url();
TQString local_path = item->localPath(); TQString local_path = item->localPath();
if ( url.directory(false) == TDEGlobalSettings::trashPath() ) if ( url.directory(false) == TDEGlobalSettings::trashPath() ) {
bInTrash = true; bInTrash = true;
if ( KProtocolInfo::supportsDeleting( url ) ) }
if ( KProtocolInfo::supportsDeleting( url ) ) {
canDel++; canDel++;
if ( !local_path.isEmpty() ) }
if ( !local_path.isEmpty() ) {
canTrash++; canTrash++;
}
} }
} }

@ -177,9 +177,11 @@ void KonqOperations::copy( TQWidget * parent, int method, const KURL::List & sel
void KonqOperations::_del( int method, const KURL::List & _selectedURLs, ConfirmationType confirmation ) void KonqOperations::_del( int method, const KURL::List & _selectedURLs, ConfirmationType confirmation )
{ {
KURL::List selectedURLs; KURL::List selectedURLs;
for (KURL::List::ConstIterator it = _selectedURLs.begin(); it != _selectedURLs.end(); ++it) for (KURL::List::ConstIterator it = _selectedURLs.begin(); it != _selectedURLs.end(); ++it) {
if (KProtocolInfo::supportsDeleting(*it)) if (KProtocolInfo::supportsDeleting(*it)) {
selectedURLs.append(*it); selectedURLs.append(*it);
}
}
if (selectedURLs.isEmpty()) { if (selectedURLs.isEmpty()) {
delete this; delete this;
return; return;

Loading…
Cancel
Save