summaryrefslogtreecommitdiffstats
path: root/src/part/scan.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 00:38:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 00:38:19 +0000
commitf0296ef9e1f94e23c00d6f490e565d1dc768416d (patch)
tree7f3fd9f99621c111ff67f2d62feb5960a3371853 /src/part/scan.cpp
parent3098eb909534268622ce776f9a7bb5310d31b3c1 (diff)
downloadfilelight-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/scan.cpp')
-rw-r--r--src/part/scan.cpp32
1 files changed, 16 insertions, 16 deletions
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 <kcursor.h>
#include "localLister.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#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<Directory> )
{
@@ -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<Directory> *trees = new Chain<Directory>;
@@ -76,7 +76,7 @@ namespace Filelight
for( Iterator<Directory> 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<File> jt;
@@ -93,7 +93,7 @@ namespace Filelight
jt = d->iterator();
const Link<File> *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();
}
}