diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-04-08 20:35:52 +0000 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-04-08 20:35:52 +0000 |
commit | a3c47872204bf2fb4a4c005547e76e976fa2dc92 (patch) | |
tree | 600cfb9b7e5139e799fbc4acd93bbe0f4cac230c | |
parent | ea6a2153684d1e5cdb70e0601ebc178c047a54ea (diff) | |
download | tdebase-a3c47872204bf2fb4a4c005547e76e976fa2dc92.tar.gz tdebase-a3c47872204bf2fb4a4c005547e76e976fa2dc92.zip |
Remove unnecessary KDirLister instance from IVI free space indicator module
This relates to Bug 1666
-rw-r--r-- | libkonq/kivfreespaceoverlay.cc | 27 | ||||
-rw-r--r-- | libkonq/kivfreespaceoverlay.h | 4 |
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; }; |