From f0296ef9e1f94e23c00d6f490e565d1dc768416d Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 26 May 2011 00:38:19 +0000 Subject: 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 --- src/part/scan.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/part/scan.cpp') diff --git a/src/part/scan.cpp b/src/part/scan.cpp index 2101624..4dfbb5d 100644 --- a/src/part/scan.cpp +++ b/src/part/scan.cpp @@ -5,7 +5,7 @@ #include "fileTree.h" #include #include "localLister.h" -#include +#include #include "remoteLister.h" #include "scan.h" @@ -15,8 +15,8 @@ namespace Filelight bool ScanManager::s_abort = false; uint ScanManager::s_files = 0; - ScanManager::ScanManager( QObject *parent ) - : QObject( parent ) + ScanManager::ScanManager( TQObject *tqparent ) + : TQObject( tqparent ) , m_thread( 0 ) , m_cache( new Chain ) { @@ -33,7 +33,7 @@ namespace Filelight delete m_cache; - //RemoteListers are QObjects and get automatically deleted + //RemoteListers are TQObjects and get automatically deleted } bool @@ -62,7 +62,7 @@ namespace Filelight if( url.protocol() == "file" ) { - const QString path = url.path( 1 ); + const TQString path = url.path( 1 ); Chain *trees = new Chain; @@ -76,7 +76,7 @@ namespace Filelight for( Iterator it = m_cache->iterator(); it != m_cache->end(); ++it ) { - QString cachePath = (*it)->name(); + TQString cachePath = (*it)->name(); if( path.startsWith( cachePath ) ) //then whole tree already scanned { @@ -84,7 +84,7 @@ namespace Filelight debug() << "Cache-(a)hit: " << cachePath << endl; - QStringList split = QStringList::split( '/', path.mid( cachePath.length() ) ); + TQStringList split = TQStringList::split( '/', path.mid( cachePath.length() ) ); Directory *d = *it; Iterator jt; @@ -93,7 +93,7 @@ namespace Filelight jt = d->iterator(); const Link *end = d->end(); - QString s = split.first(); s += '/'; + TQString s = split.first(); s += '/'; for( d = 0; jt != end; ++jt ) if( s == (*jt)->name() ) @@ -113,16 +113,16 @@ namespace Filelight debug() << "Found cache-handle, generating map..\n"; //1001 indicates that this should not be cached - QCustomEvent *e = new QCustomEvent( 1001 ); + TQCustomEvent *e = new TQCustomEvent( 1001 ); e->setData( d ); - QApplication::postEvent( this, e ); + TQApplication::postEvent( this, e ); return true; } else { //something went wrong, we couldn't find the directory we were expecting - error() << "Didn't find " << path << " in the cache!\n"; + error() << "Didn't tqfind " << path << " in the cache!\n"; delete it.remove(); //safest to get rid of it break; //do a full scan } @@ -135,16 +135,16 @@ namespace Filelight } m_url.setPath( path ); //FIXME stop switching between paths and KURLs all the time - QApplication::setOverrideCursor( KCursor::workingCursor() ); + TQApplication::setOverrideCursor( KCursor::workingCursor() ); //starts listing by itself m_thread = new Filelight::LocalLister( path, trees, this ); return true; } m_url = url; - QApplication::setOverrideCursor( KCursor::workingCursor() ); + TQApplication::setOverrideCursor( KCursor::workingCursor() ); //will start listing straight away - QObject *o = new Filelight::RemoteLister( url, (QWidget*)parent() ); + TQObject *o = new Filelight::RemoteLister( url, (TQWidget*)tqparent() ); insertChild( o ); o->setName( "remote_lister" ); return true; @@ -174,7 +174,7 @@ namespace Filelight } void - ScanManager::customEvent( QCustomEvent *e ) + ScanManager::customEvent( TQCustomEvent *e ) { Directory *tree = (Directory*)e->data(); @@ -197,7 +197,7 @@ namespace Filelight else //scan failed m_cache->empty(); //FIXME this is safe but annoying - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } -- cgit v1.2.1