summaryrefslogtreecommitdiffstats
path: root/kompare/komparenavtreepart
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kompare/komparenavtreepart
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kompare/komparenavtreepart')
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.cpp28
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.h18
2 files changed, 24 insertions, 22 deletions
diff --git a/kompare/komparenavtreepart/komparenavtreepart.cpp b/kompare/komparenavtreepart/komparenavtreepart.cpp
index 31b0388f..1fe65b4f 100644
--- a/kompare/komparenavtreepart/komparenavtreepart.cpp
+++ b/kompare/komparenavtreepart/komparenavtreepart.cpp
@@ -37,8 +37,8 @@
using namespace Diff2;
-KompareNavTreePart::KompareNavTreePart( TQWidget* parent, const char* name )
- : KParts::ReadOnlyPart( parent, name ),
+KompareNavTreePart::KompareNavTreePart( TQWidget* tqparent, const char* name )
+ : KParts::ReadOnlyPart( TQT_TQOBJECT(tqparent), name ),
m_splitter( 0 ),
m_modelList( 0 ),
m_srcDirTree( 0 ),
@@ -453,7 +453,7 @@ void KChangeLVI::setDifferenceText()
setText( 2, text );
}
-KChangeLVI::KChangeLVI( KListView* parent, Difference* diff ) : KListViewItem( parent )
+KChangeLVI::KChangeLVI( KListView* tqparent, Difference* diff ) : KListViewItem( tqparent )
{
m_difference = diff;
@@ -487,7 +487,7 @@ KChangeLVI::~KChangeLVI()
{
}
-KFileLVI::KFileLVI( KListView* parent, DiffModel* model ) : KListViewItem( parent )
+KFileLVI::KFileLVI( KListView* tqparent, DiffModel* model ) : KListViewItem( tqparent )
{
m_model = model;
@@ -519,7 +519,7 @@ KFileLVI::~KFileLVI()
{
}
-KDirLVI::KDirLVI( KListView* parent, TQString& dir ) : KListViewItem( parent )
+KDirLVI::KDirLVI( KListView* tqparent, TQString& dir ) : KListViewItem( tqparent )
{
// kdDebug(8105) << "KDirLVI (KListView) constructor called with dir = " << dir << endl;
m_rootItem = true;
@@ -533,7 +533,7 @@ KDirLVI::KDirLVI( KListView* parent, TQString& dir ) : KListViewItem( parent )
setText( 0, m_dirName );
}
-KDirLVI::KDirLVI( KDirLVI* parent, TQString& dir ) : KListViewItem( parent )
+KDirLVI::KDirLVI( KDirLVI* tqparent, TQString& dir ) : KListViewItem( tqparent )
{
// kdDebug(8105) << "KDirLVI (KDirLVI) constructor called with dir = " << dir << endl;
m_rootItem = false;
@@ -551,8 +551,8 @@ void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* mo
if ( !m_dirName.isEmpty() )
{
- if ( path.find( m_dirName ) > -1 )
- path = path.replace( path.find( m_dirName ), m_dirName.length(), "" );
+ if ( path.tqfind( m_dirName ) > -1 )
+ path = path.tqreplace( path.tqfind( m_dirName ), m_dirName.length(), "" );
}
// kdDebug(8105) << "Path after removal of own dir (\"" << m_dirName << "\") = " << path << endl;
@@ -565,7 +565,7 @@ void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* mo
KDirLVI* child;
- TQString dir = path.mid( 0, path.find( "/", 0 ) + 1 );
+ TQString dir = path.mid( 0, path.tqfind( "/", 0 ) + 1 );
child = findChild( dir );
if ( !child )
{
@@ -582,7 +582,7 @@ KDirLVI* KDirLVI::findChild( TQString dir )
// kdDebug(8105) << "KDirLVI::findChild called with dir = " << dir << endl;
KDirLVI* child;
if ( ( child = static_cast<KDirLVI*>(this->firstChild()) ) != 0L )
- { // has children, check if dir already exists, if so addModel
+ { // has tqchildren, check if dir already exists, if so addModel
do {
if ( dir == child->dirName() )
return child;
@@ -619,7 +619,7 @@ TQString KDirLVI::fullPath( TQString& path )
path = path.prepend( m_dirName );
- KDirLVI* lviParent = dynamic_cast<KDirLVI*>( parent() );
+ KDirLVI* lviParent = dynamic_cast<KDirLVI*>( tqparent() );
if ( lviParent )
{
path = lviParent->fullPath( path );
@@ -675,12 +675,12 @@ KompareNavTreePartFactory::~KompareNavTreePartFactory()
s_instance = 0L;
}
-KParts::Part* KompareNavTreePartFactory::createPartObject( TQWidget* parentWidget, const char* widgetName,
- TQObject* /*parent*/, const char* /*name*/,
+KParts::Part* KompareNavTreePartFactory::createPartObject( TQWidget* tqparentWidget, const char* widgetName,
+ TQObject* /*tqparent*/, const char* /*name*/,
const char* /*classname*/, const TQStringList & /*args*/ )
{
// Create an instance of our Part
- KompareNavTreePart* obj = new KompareNavTreePart( parentWidget, widgetName );
+ KompareNavTreePart* obj = new KompareNavTreePart( tqparentWidget, widgetName );
KGlobal::locale()->insertCatalogue("kompare");
diff --git a/kompare/komparenavtreepart/komparenavtreepart.h b/kompare/komparenavtreepart/komparenavtreepart.h
index a126cfe5..6fa0667b 100644
--- a/kompare/komparenavtreepart/komparenavtreepart.h
+++ b/kompare/komparenavtreepart/komparenavtreepart.h
@@ -47,9 +47,10 @@ class KChangeLVI;
class KompareNavTreePart : public KParts::ReadOnlyPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- KompareNavTreePart( TQWidget* parent = 0L, const char* name = 0L );
+ KompareNavTreePart( TQWidget* tqparent = 0L, const char* name = 0L );
virtual ~KompareNavTreePart();
public:
@@ -87,7 +88,7 @@ private:
TQString compareFromEndAndReturnSame( const TQString& string1, const TQString& string2 );
void addDirToTreeView( enum Kompare::Target, const TQString& filename );
- KListViewItem* findDirInDirTree( const KListViewItem* parent, const TQString& dir );
+ KListViewItem* findDirInDirTree( const KListViewItem* tqparent, const TQString& dir );
// KListViewItem* firstItem();
// KListViewItem* lastItem();
@@ -124,7 +125,7 @@ private:
class KChangeLVI : public KListViewItem
{
public:
- KChangeLVI( KListView* parent, Diff2::Difference* diff );
+ KChangeLVI( KListView* tqparent, Diff2::Difference* diff );
~KChangeLVI();
public:
Diff2::Difference* difference() { return m_difference; };
@@ -138,7 +139,7 @@ private:
class KFileLVI : public KListViewItem
{
public:
- KFileLVI( KListView* parent, Diff2::DiffModel* model );
+ KFileLVI( KListView* tqparent, Diff2::DiffModel* model );
~KFileLVI();
public:
Diff2::DiffModel* model() { return m_model; };
@@ -150,8 +151,8 @@ private:
class KDirLVI : public KListViewItem
{
public:
- KDirLVI( KDirLVI* parent, TQString& dir );
- KDirLVI( KListView* parent, TQString& dir );
+ KDirLVI( KDirLVI* tqparent, TQString& dir );
+ KDirLVI( KListView* tqparent, TQString& dir );
~KDirLVI();
public:
void addModel( TQString& dir, Diff2::DiffModel* model, TQPtrDict<KDirLVI>* modelToDirItemDict );
@@ -175,11 +176,12 @@ class KAboutData;
class KompareNavTreePartFactory : public KParts::Factory
{
Q_OBJECT
+ TQ_OBJECT
public:
KompareNavTreePartFactory();
virtual ~KompareNavTreePartFactory();
- virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name,
+ virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
const char *classname, const TQStringList &args );
static KInstance* instance();