summaryrefslogtreecommitdiffstats
path: root/libkonq/kivfreespaceoverlay.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-04-08 20:35:52 +0000
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-04-08 20:35:52 +0000
commita3c47872204bf2fb4a4c005547e76e976fa2dc92 (patch)
tree600cfb9b7e5139e799fbc4acd93bbe0f4cac230c /libkonq/kivfreespaceoverlay.cc
parentea6a2153684d1e5cdb70e0601ebc178c047a54ea (diff)
downloadtdebase-a3c47872204bf2fb4a4c005547e76e976fa2dc92.tar.gz
tdebase-a3c47872204bf2fb4a4c005547e76e976fa2dc92.zip
Remove unnecessary KDirLister instance from IVI free space indicator module
This relates to Bug 1666
Diffstat (limited to 'libkonq/kivfreespaceoverlay.cc')
-rw-r--r--libkonq/kivfreespaceoverlay.cc27
1 files changed, 6 insertions, 21 deletions
diff --git a/libkonq/kivfreespaceoverlay.cc b/libkonq/kivfreespaceoverlay.cc
index 3d2ecad63..29069cf4f 100644
--- a/libkonq/kivfreespaceoverlay.cc
+++ b/libkonq/kivfreespaceoverlay.cc
@@ -26,6 +26,7 @@
#include <tqbitmap.h>
#include <tqimage.h>
#include <tqfile.h>
+#include <tqtimer.h>
#include <tdefileivi.h>
#include <tdefileitem.h>
@@ -48,40 +49,29 @@
#include "kivfreespaceoverlay.h"
KIVFreeSpaceOverlay::KIVFreeSpaceOverlay(KFileIVI* freespace)
-: m_lister(0)
{
- if (!m_lister)
- {
- m_lister = new KDirLister;
- m_lister->setAutoErrorHandlingEnabled(false, 0);
- connect(m_lister, TQT_SIGNAL(completed()), TQT_SLOT(slotCompleted()));
- connect(m_lister, TQT_SIGNAL(newItems( const KFileItemList& )), TQT_SLOT(slotNewItems( const KFileItemList& )));
- m_lister->setShowingDotFiles(false);
- }
m_freespace = freespace;
}
KIVFreeSpaceOverlay::~KIVFreeSpaceOverlay()
{
- if (m_lister) m_lister->stop();
- delete m_lister;
+ //
}
void KIVFreeSpaceOverlay::start()
{
- if ( m_freespace->item()->isReadable() ) {
- m_lister->openURL(m_freespace->item()->url());
- } else {
+ if ( !m_freespace->item()->isReadable() ) {
emit finished();
}
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDisplay()));
}
void KIVFreeSpaceOverlay::timerEvent(TQTimerEvent *)
{
- m_lister->stop();
+ //
}
-void KIVFreeSpaceOverlay::slotCompleted()
+void KIVFreeSpaceOverlay::slotDisplay()
{
KFileItem* item = m_freespace->item();
if (item) {
@@ -125,9 +115,4 @@ void KIVFreeSpaceOverlay::slotCompleted()
emit finished();
}
-void KIVFreeSpaceOverlay::slotNewItems( const KFileItemList& items )
-{
- //
-}
-
#include "kivfreespaceoverlay.moc"