summaryrefslogtreecommitdiffstats
path: root/libkonq/konq_dirpart.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-15 03:03:58 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-15 03:03:58 -0500
commit41c013e06c430febb6a5353286573c968ca01440 (patch)
tree0fee1f29c1dc2ac11009aeef169cf9376303d22a /libkonq/konq_dirpart.cc
parent9e4aad6b3bc3c1b4781a3c1cef6968640d4f6e67 (diff)
downloadtdebase-41c013e06c430febb6a5353286573c968ca01440.tar.gz
tdebase-41c013e06c430febb6a5353286573c968ca01440.zip
Fix a number of issues with the media tdeioslave
This relates to Bug 1450 Add media disk space overlay and enable by default
Diffstat (limited to 'libkonq/konq_dirpart.cc')
-rw-r--r--libkonq/konq_dirpart.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/libkonq/konq_dirpart.cc b/libkonq/konq_dirpart.cc
index 0e88a9925..9f08dfb3c 100644
--- a/libkonq/konq_dirpart.cc
+++ b/libkonq/konq_dirpart.cc
@@ -440,8 +440,9 @@ void KonqDirPart::updatePasteAction() // KDE4: merge into method above
void KonqDirPart::newItems( const KFileItemList & entries )
{
d->dirSizeDirty = true;
- if ( m_findPart )
+ if ( m_findPart ) {
emitTotalCount();
+ }
emit itemsAdded( entries );
}
@@ -454,8 +455,9 @@ void KonqDirPart::deleteItem( KFileItem * fileItem )
void KonqDirPart::emitTotalCount()
{
- if ( !d->dirLister || d->dirLister->url().isEmpty() )
+ if ( !d->dirLister || d->dirLister->url().isEmpty() ) {
return;
+ }
if ( d->dirSizeDirty ) {
m_lDirSize = 0;
m_lFileCount = 0;
@@ -465,12 +467,14 @@ void KonqDirPart::emitTotalCount()
{
if ( !it.current()->isDir() )
{
- if (!it.current()->isLink()) // symlinks don't contribute to the size
+ if (!it.current()->isLink()) { // symlinks don't contribute to the size
m_lDirSize += it.current()->size();
+ }
m_lFileCount++;
}
- else
+ else {
m_lDirCount++;
+ }
}
d->dirSizeDirty = false;
}
@@ -521,10 +525,12 @@ void KonqDirPart::emitCounts( const KFileItemList & lst )
void KonqDirPart::emitCounts( const KFileItemList & lst, bool selectionChanged )
{
- if ( lst.count() == 0 )
+ if ( lst.count() == 0 ) {
emitTotalCount();
- else
+ }
+ else {
emitCounts( lst );
+ }
// Yes, the caller could do that too :)
// But this bool could also be used to cache the TQString for the last
@@ -533,8 +539,9 @@ void KonqDirPart::emitCounts( const KFileItemList & lst, bool selectionChanged )
// MiB: no, I don't think it's worth it. Especially regarding the
// loss of readability of the code. Thus, this will be removed in
// KDE 4.0.
- if ( selectionChanged )
+ if ( selectionChanged ) {
emit m_extension->selectionInfo( lst );
+ }
}
void KonqDirPart::emitMouseOver( const KFileItem* item )