diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-26 00:38:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-26 00:38:19 +0000 |
commit | f0296ef9e1f94e23c00d6f490e565d1dc768416d (patch) | |
tree | 7f3fd9f99621c111ff67f2d62feb5960a3371853 /src/part/remoteLister.cpp | |
parent | 3098eb909534268622ce776f9a7bb5310d31b3c1 (diff) | |
download | filelight-f0296ef9e1f94e23c00d6f490e565d1dc768416d.tar.gz filelight-f0296ef9e1f94e23c00d6f490e565d1dc768416d.zip |
TQt4 port Filelight
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/filelight@1233561 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/part/remoteLister.cpp')
-rw-r--r-- | src/part/remoteLister.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/part/remoteLister.cpp b/src/part/remoteLister.cpp index dcfbbee..fa80b4b 100644 --- a/src/part/remoteLister.cpp +++ b/src/part/remoteLister.cpp @@ -3,9 +3,9 @@ #include <debug.h> #include "fileTree.h" -#include <qapplication.h> -#include <qtimer.h> -#include <qvaluelist.h> +#include <tqapplication.h> +#include <tqtimer.h> +#include <tqvaluelist.h> #include "remoteLister.h" #include "scan.h" @@ -18,21 +18,21 @@ namespace Filelight struct Store { - typedef QValueList<Store*> List; + typedef TQValueList<Store*> List; /// location of the directory const KURL url; /// the directory on which we are operating Directory *directory; - /// so we can reference the parent store - Store *parent; + /// so we can reference the tqparent store + Store *tqparent; /// directories in this directory that need to be scanned before we can propagate() List stores; Store() - : directory( 0 ), parent( 0 ) {} - Store( const KURL &u, const QString &name, Store *s ) - : url( u ), directory( new Directory( name.local8Bit() + '/' ) ), parent( s ) {} + : directory( 0 ), tqparent( 0 ) {} + Store( const KURL &u, const TQString &name, Store *s ) + : url( u ), directory( new Directory( name.local8Bit() + '/' ) ), tqparent( s ) {} Store* @@ -42,13 +42,13 @@ namespace Filelight debug() << "propagate: " << url << endl; - if( parent ) { - parent->directory->append( directory ); - if( parent->stores.isEmpty() ) { - return parent->propagate(); + if( tqparent ) { + tqparent->directory->append( directory ); + if( tqparent->stores.isEmpty() ) { + return tqparent->propagate(); } else - return parent; + return tqparent; } //we reached the root, let's get our next directory scanned @@ -61,18 +61,18 @@ namespace Filelight }; - RemoteLister::RemoteLister( const KURL &url, QWidget *parent ) + RemoteLister::RemoteLister( const KURL &url, TQWidget *tqparent ) : KDirLister( true /*don't fetch mimetypes*/ ) , m_root( new Store( url, url.url(), 0 ) ) , m_store( m_root ) { setAutoUpdate( false ); //don't use KDirWatchers setShowingDotFiles( true ); //stupid KDirLister API function names - setMainWindow( parent ); + setMainWindow( tqparent ); - //use SIGNAL(result(KIO::Job*)) instead and then use Job::error() - connect( this, SIGNAL(completed()), SLOT(completed()) ); - connect( this, SIGNAL(canceled()), SLOT(canceled()) ); + //use TQT_SIGNAL(result(KIO::Job*)) instead and then use Job::error() + connect( this, TQT_SIGNAL(completed()), TQT_SLOT(completed()) ); + connect( this, TQT_SIGNAL(canceled()), TQT_SLOT(canceled()) ); //we do this non-recursively - it is the only way! openURL( url ); @@ -82,9 +82,9 @@ namespace Filelight { Directory *tree = isFinished() ? m_store->directory : 0; - QCustomEvent *e = new QCustomEvent( 1000 ); + TQCustomEvent *e = new TQCustomEvent( 1000 ); e->setData( tree ); - QApplication::postEvent( parent(), e ); + TQApplication::postEvent( tqparent(), e ); delete m_root; } @@ -97,7 +97,7 @@ namespace Filelight //as usual KDE documentation didn't suggest I needed to do this at all //I had to figure it out myself // -- avoid crash - QTimer::singleShot( 0, this, SLOT(_completed()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(_completed()) ); } void @@ -105,7 +105,7 @@ namespace Filelight { debug() << "canceled: " << url().prettyURL() << endl; - QTimer::singleShot( 0, this, SLOT(_completed()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(_completed()) ); } void @@ -126,7 +126,7 @@ namespace Filelight if( m_store->stores.isEmpty() ) - //no directories to scan, so we need to append ourselves to the parent directory + //no directories to scan, so we need to append ourselves to the tqparent directory //propagate() will return the next ancestor that has stores left to be scanned, or root if we are done m_store = m_store->propagate(); |