summaryrefslogtreecommitdiffstats
path: root/libkonq
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2014-04-08 20:35:52 +0000
committerTimothy Pearson <[email protected]>2014-04-08 20:35:52 +0000
commita3c47872204bf2fb4a4c005547e76e976fa2dc92 (patch)
tree600cfb9b7e5139e799fbc4acd93bbe0f4cac230c /libkonq
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')
-rw-r--r--libkonq/kivfreespaceoverlay.cc27
-rw-r--r--libkonq/kivfreespaceoverlay.h4
2 files changed, 7 insertions, 24 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"
diff --git a/libkonq/kivfreespaceoverlay.h b/libkonq/kivfreespaceoverlay.h
index 3b454e74b..6527ccd29 100644
--- a/libkonq/kivfreespaceoverlay.h
+++ b/libkonq/kivfreespaceoverlay.h
@@ -45,11 +45,9 @@ protected:
virtual void timerEvent(TQTimerEvent *);
private slots:
- void slotCompleted();
- void slotNewItems( const KFileItemList& items );
+ void slotDisplay();
private:
- KDirLister* m_lister;
KFileIVI* m_freespace;
};