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/fileTree.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/part/fileTree.h') diff --git a/src/part/fileTree.h b/src/part/fileTree.h index 25ac6fb..eb0cad2 100644 --- a/src/part/fileTree.h +++ b/src/part/fileTree.h @@ -4,8 +4,8 @@ #ifndef FILETREE_H #define FILETREE_H -#include //qstrdup -#include //decodeName() +#include //qstrdup +#include //decodeName() #include @@ -153,7 +153,7 @@ private: class Directory; -class QString; +class TQString; class File { @@ -168,21 +168,21 @@ public: File( const char *name, FileSize size ) : m_parent( 0 ), m_name( qstrdup( name ) ), m_size( size ) {} virtual ~File() { delete [] m_name; } - const Directory *parent() const { return m_parent; } + const Directory *tqparent() const { return m_parent; } const char *name8Bit() const { return m_name; } const FileSize size() const { return m_size; } - QString name() const { return QFile::decodeName( m_name ); } + TQString name() const { return TQFile::decodeName( m_name ); } virtual bool isDirectory() const { return false; } - QString fullPath( const Directory* = 0 ) const; - QString humanReadableSize( UnitPrefix key = mega ) const; + TQString fullPath( const Directory* = 0 ) const; + TQString humanReadableSize( UnitPrefix key = mega ) const; public: - static QString humanReadableSize( uint size, UnitPrefix Key = mega ); + static TQString humanReadableSize( uint size, UnitPrefix Key = mega ); protected: - File( const char *name, FileSize size, Directory *parent ) : m_parent( parent ), m_name( qstrdup( name ) ), m_size( size ) {} + File( const char *name, FileSize size, Directory *tqparent ) : m_parent( tqparent ), m_name( qstrdup( name ) ), m_size( size ) {} Directory *m_parent; //0 if this is treeRoot char *m_name; @@ -197,9 +197,9 @@ private: class Directory : public Chain, public File { public: - Directory( const char *name ) : File( name, 0 ), m_children( 0 ) {} //DON'T pass the full path! + Directory( const char *name ) : File( name, 0 ), m_tqchildren( 0 ) {} //DON'T pass the full path! - uint children() const { return m_children; } + uint tqchildren() const { return m_tqchildren; } virtual bool isDirectory() const { return true; } ///appends a Directory @@ -209,7 +209,7 @@ public: delete [] d->m_name; d->m_name = qstrdup( name ); } //directories that had a fullpath copy just their names this way - m_children += d->children(); //doesn't include the dir itself + m_tqchildren += d->tqchildren(); //doesn't include the dir itself d->m_parent = this; append( (File*)d ); //will add 1 to filecount for the dir itself } @@ -223,12 +223,12 @@ public: private: void append( File *p ) { - m_children++; + m_tqchildren++; m_size += p->size(); Chain::append( p ); } - uint m_children; + uint m_tqchildren; private: Directory( const Directory& ); //undefined -- cgit v1.2.1