summaryrefslogtreecommitdiffstats
path: root/src/part/localLister.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/localLister.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/localLister.cpp')
-rw-r--r--src/part/localLister.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/part/localLister.cpp b/src/part/localLister.cpp
index 6bf7945..363b093 100644
--- a/src/part/localLister.cpp
+++ b/src/part/localLister.cpp
@@ -10,8 +10,8 @@
#ifdef HAVE_MNTENT_H
#include <mntent.h>
#endif
-#include <qapplication.h> //postEvent()
-#include <qfile.h>
+#include <tqapplication.h> //postEvent()
+#include <tqfile.h>
#include "scan.h"
#include <sys/stat.h>
#include <sys/types.h>
@@ -19,23 +19,23 @@
namespace Filelight
{
- QStringList LocalLister::s_remoteMounts;
- QStringList LocalLister::s_localMounts;
+ TQStringList LocalLister::s_remoteMounts;
+ TQStringList LocalLister::s_localMounts;
- LocalLister::LocalLister( const QString &path, Chain<Directory> *cachedTrees, QObject *parent )
- : QThread()
+ LocalLister::LocalLister( const TQString &path, Chain<Directory> *cachedTrees, TQObject *tqparent )
+ : TQThread()
, m_path( path )
, m_trees( cachedTrees )
- , m_parent( parent )
+ , m_parent( tqparent )
{
//add empty directories for any mount points that are in the path
//TODO empty directories is not ideal as adds to fileCount incorrectly
- QStringList list( Config::skipList );
+ TQStringList list( Config::skipList );
if( !Config::scanAcrossMounts ) list += s_localMounts;
if( !Config::scanRemoteMounts ) list += s_remoteMounts;
- for( QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it )
+ for( TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it )
if( (*it).startsWith( path ) )
//prevent scanning of these directories
m_trees->append( new Directory( (*it).local8Bit() ) );
@@ -47,7 +47,7 @@ namespace Filelight
LocalLister::run()
{
//recursively scan the requested path
- const QCString path = QFile::encodeName( m_path );
+ const TQCString path = TQFile::encodeName( m_path );
Directory *tree = scan( path, path );
//delete the list of trees useful for this scan,
@@ -61,9 +61,9 @@ namespace Filelight
tree = 0;
}
- QCustomEvent *e = new QCustomEvent( 1000 );
+ TQCustomEvent *e = new TQCustomEvent( 1000 );
e->setData( tree );
- QApplication::postEvent( m_parent, e );
+ TQApplication::postEvent( m_parent, e );
}
// from system.h in GNU coreutils package
@@ -127,7 +127,7 @@ namespace Filelight
#include <errno.h>
static void
- outputError( QCString path )
+ outputError( TQCString path )
{
///show error message that stat or opendir may give
@@ -160,7 +160,7 @@ namespace Filelight
}
Directory*
- LocalLister::scan( const QCString &path, const QCString &dirname )
+ LocalLister::scan( const TQCString &path, const TQCString &dirname )
{
Directory *cwd = new Directory( dirname );
DIR *dir = opendir( path );
@@ -180,7 +180,7 @@ namespace Filelight
if( qstrcmp( ent->d_name, "." ) == 0 || qstrcmp( ent->d_name, ".." ) == 0 )
continue;
- QCString new_path = path; new_path += ent->d_name;
+ TQCString new_path = path; new_path += ent->d_name;
//get file information
if( lstat( new_path, &statbuf ) == -1 ) {
@@ -204,7 +204,7 @@ namespace Filelight
else if( S_ISDIR( statbuf.st_mode ) ) //directory
{
Directory *d = 0;
- QCString new_dirname = ent->d_name;
+ TQCString new_dirname = ent->d_name;
new_dirname += '/';
new_path += '/';
@@ -216,7 +216,7 @@ namespace Filelight
{
debug() << "Tree pre-completed: " << (*it)->name() << "\n";
d = it.remove();
- ScanManager::s_files += d->children();
+ ScanManager::s_files += d->tqchildren();
//**** ideally don't have this redundant extra somehow
cwd->append( d, new_dirname );
}
@@ -251,7 +251,7 @@ namespace Filelight
#ifdef HAVE_MNTENT_H
struct mntent *mnt_ent;
#endif
- QString str;
+ TQString str;
#ifdef HAVE_MNTENT_H
@@ -267,7 +267,7 @@ namespace Filelight
#define FS_TYPE fstab_ent->fs_vfstype // fs-type
#define FS_MNTOPS fstab_ent->fs_mntops // mount-options
- QStringList remoteFsTypes;
+ TQStringList remoteFsTypes;
remoteFsTypes << "smbfs" ;
#ifdef MNTTYPE_NFS
remoteFsTypes << MNTTYPE_NFS;
@@ -278,11 +278,11 @@ namespace Filelight
while( (fstab_ent = getfsent()) != NULL )
{
- str = QString( FS_FILE );
+ str = TQString( FS_FILE );
if( str == "/" ) continue;
str += '/';
- if( remoteFsTypes.contains( FS_TYPE ) )
+ if( remoteFsTypes.tqcontains( FS_TYPE ) )
s_remoteMounts.append( str ); //**** NO! can't be sure won't have trailing slash, need to do a check first dummy!!
else
@@ -310,15 +310,15 @@ namespace Filelight
{
bool b = false;
- str = QString( FS_FILE );
+ str = TQString( FS_FILE );
if( str == "/" ) continue;
str += "/";
- if( remoteFsTypes.contains( FS_TYPE ) )
- if( b = !s_remoteMounts.contains( str ) )
+ if( remoteFsTypes.tqcontains( FS_TYPE ) )
+ if( b = !s_remoteMounts.tqcontains( str ) )
s_remoteMounts.append( str ); //**** NO! can't be sure won't have trailing slash, need to do a check first dummy!!
- else if( b = !s_localMounts.contains( str ) )
+ else if( b = !s_localMounts.tqcontains( str ) )
s_localMounts.append( str ); //**** NO! can't be sure won't have trailing slash, need to do a check first dummy!!
if( b ) kdDebug() << "MTAB: " << FS_TYPE << "\n";