summaryrefslogtreecommitdiffstats
path: root/kompare/libdiff2
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/libdiff2
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/libdiff2')
-rw-r--r--kompare/libdiff2/cvsdiffparser.cpp10
-rw-r--r--kompare/libdiff2/difference.h2
-rw-r--r--kompare/libdiff2/diffhunk.cpp12
-rw-r--r--kompare/libdiff2/diffhunk.h2
-rw-r--r--kompare/libdiff2/diffmodel.cpp20
-rw-r--r--kompare/libdiff2/diffmodel.h5
-rw-r--r--kompare/libdiff2/diffparser.cpp10
-rw-r--r--kompare/libdiff2/kompare.h4
-rw-r--r--kompare/libdiff2/komparemodellist.cpp80
-rw-r--r--kompare/libdiff2/komparemodellist.h11
-rw-r--r--kompare/libdiff2/kompareprocess.h3
-rw-r--r--kompare/libdiff2/levenshteintable.cpp4
-rw-r--r--kompare/libdiff2/parser.cpp2
-rw-r--r--kompare/libdiff2/parserbase.cpp2
-rw-r--r--kompare/libdiff2/perforceparser.cpp26
15 files changed, 98 insertions, 95 deletions
diff --git a/kompare/libdiff2/cvsdiffparser.cpp b/kompare/libdiff2/cvsdiffparser.cpp
index 47c79a0f..f29e422c 100644
--- a/kompare/libdiff2/cvsdiffparser.cpp
+++ b/kompare/libdiff2/cvsdiffparser.cpp
@@ -53,27 +53,27 @@ enum Kompare::Format CVSDiffParser::determineFormat()
while( it != m_diffLines.end() )
{
- if( (*it).find( normalRE, 0 ) == 0 )
+ if( (*it).tqfind( normalRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from a Normal diff..." << endl;
return Kompare::Normal;
}
- else if( (*it).find( unifiedRE, 0 ) == 0 )
+ else if( (*it).tqfind( unifiedRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from a Unified diff..." << endl;
return Kompare::Unified;
}
- else if( (*it).find( contextRE, 0 ) == 0 )
+ else if( (*it).tqfind( contextRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from a Context diff..." << endl;
return Kompare::Context;
}
- else if( (*it).find( rcsRE, 0 ) == 0 )
+ else if( (*it).tqfind( rcsRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from a RCS diff..." << endl;
return Kompare::RCS;
}
- else if( (*it).find( edRE, 0 ) == 0 )
+ else if( (*it).tqfind( edRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from an ED diff..." << endl;
return Kompare::Ed;
diff --git a/kompare/libdiff2/difference.h b/kompare/libdiff2/difference.h
index 87b8f556..4e440222 100644
--- a/kompare/libdiff2/difference.h
+++ b/kompare/libdiff2/difference.h
@@ -130,7 +130,7 @@ public:
protected:
void calculateHash()
{
- unsigned short const* str = reinterpret_cast<unsigned short const*>( m_string.unicode() );
+ unsigned short const* str = reinterpret_cast<unsigned short const*>( m_string.tqunicode() );
const unsigned int len = m_string.length();
m_hash = 1315423911;
diff --git a/kompare/libdiff2/diffhunk.cpp b/kompare/libdiff2/diffhunk.cpp
index 3b48d796..efa7e12d 100644
--- a/kompare/libdiff2/diffhunk.cpp
+++ b/kompare/libdiff2/diffhunk.cpp
@@ -97,16 +97,16 @@ TQString DiffHunk::recreateHunk() const
}
// recreate header
- hunk += TQString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" )
- .arg( m_sourceLine )
- .arg( m_destinationLine )
- .arg( slc )
- .arg( dlc );
+ hunk += TQString::tqfromLatin1( "@@ -%1,%3 +%2,%4 @@" )
+ .tqarg( m_sourceLine )
+ .tqarg( m_destinationLine )
+ .tqarg( slc )
+ .tqarg( dlc );
if ( !m_function.isEmpty() )
hunk += " " + m_function;
- hunk += TQString::fromLatin1( "\n" );
+ hunk += TQString::tqfromLatin1( "\n" );
hunk += differences;
diff --git a/kompare/libdiff2/diffhunk.h b/kompare/libdiff2/diffhunk.h
index a4194a3a..f71a6a84 100644
--- a/kompare/libdiff2/diffhunk.h
+++ b/kompare/libdiff2/diffhunk.h
@@ -33,7 +33,7 @@ public:
enum Type { Normal, AddedByBlend };
public:
- DiffHunk( int sourceLine, int destinationLine, TQString function = TQString::null, Type type = Normal );
+ DiffHunk( int sourceLine, int destinationLine, TQString function = TQString(), Type type = Normal );
~DiffHunk();
const DifferenceList& differences() const { return m_differences; };
diff --git a/kompare/libdiff2/diffmodel.cpp b/kompare/libdiff2/diffmodel.cpp
index 1b3822b0..438055c6 100644
--- a/kompare/libdiff2/diffmodel.cpp
+++ b/kompare/libdiff2/diffmodel.cpp
@@ -79,10 +79,10 @@ void DiffModel::splitSourceInPathAndFileName()
{
int pos;
- if( ( pos = m_source.findRev( "/" ) ) >= 0 )
+ if( ( pos = m_source.tqfindRev( "/" ) ) >= 0 )
m_sourcePath = m_source.mid( 0, pos+1 );
- if( ( pos = m_source.findRev( "/" ) ) >= 0 )
+ if( ( pos = m_source.tqfindRev( "/" ) ) >= 0 )
m_sourceFile = m_source.mid( pos+1, m_source.length() - pos );
else
m_sourceFile = m_source;
@@ -94,10 +94,10 @@ void DiffModel::splitDestinationInPathAndFileName()
{
int pos;
- if( ( pos = m_destination.findRev( "/" ) )>= 0 )
+ if( ( pos = m_destination.tqfindRev( "/" ) )>= 0 )
m_destinationPath = m_destination.mid( 0, pos+1 );
- if( ( pos = m_destination.findRev( "/" ) ) >= 0 )
+ if( ( pos = m_destination.tqfindRev( "/" ) ) >= 0 )
m_destinationFile = m_destination.mid( pos+1, m_destination.length() - pos );
else
m_destinationFile = m_source;
@@ -152,13 +152,13 @@ TQString DiffModel::recreateDiff() const
TQString diff;
// recreate header
- TQString tab = TQString::fromLatin1( "\t" );
- TQString nl = TQString::fromLatin1( "\n" );
- diff += TQString::fromLatin1( "--- %1\t%2" ).arg( m_source ).arg( m_sourceTimestamp );
+ TQString tab = TQString::tqfromLatin1( "\t" );
+ TQString nl = TQString::tqfromLatin1( "\n" );
+ diff += TQString::tqfromLatin1( "--- %1\t%2" ).tqarg( m_source ).tqarg( m_sourceTimestamp );
if ( !m_sourceRevision.isEmpty() )
diff += tab + m_sourceRevision;
diff += nl;
- diff += TQString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp );
+ diff += TQString::tqfromLatin1( "+++ %1\t%2" ).tqarg( m_destination ).tqarg( m_destinationTimestamp );
if ( !m_destinationRevision.isEmpty() )
diff += tab + m_destinationRevision;
diff += nl;
@@ -393,10 +393,10 @@ bool DiffModel::setSelectedDifference( Difference* diff )
if ( diff != m_selectedDifference )
{
- if ( ( m_differences.findIndex( diff ) ) == -1 )
+ if ( ( m_differences.tqfindIndex( diff ) ) == -1 )
return false;
// Dont set m_diffIndex if it cant be found
- m_diffIndex = m_differences.findIndex( diff );
+ m_diffIndex = m_differences.tqfindIndex( diff );
kdDebug( 8101 ) << "m_diffIndex = " << m_diffIndex << endl;
m_selectedDifference = diff;
}
diff --git a/kompare/libdiff2/diffmodel.h b/kompare/libdiff2/diffmodel.h
index 3b957b89..3467b55b 100644
--- a/kompare/libdiff2/diffmodel.h
+++ b/kompare/libdiff2/diffmodel.h
@@ -32,9 +32,10 @@ namespace Diff2
class DiffHunk;
class Difference;
-class DiffModel : public QObject
+class DiffModel : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
DiffModel( const TQString& srcBaseURL, const TQString& destBaseURL );
@@ -60,7 +61,7 @@ public:
DifferenceList* allDifferences();
- int findDifference( Difference* diff ) const { return m_differences.findIndex( diff ); }
+ int findDifference( Difference* diff ) const { return m_differences.tqfindIndex( diff ); }
Difference* firstDifference();
Difference* lastDifference();
diff --git a/kompare/libdiff2/diffparser.cpp b/kompare/libdiff2/diffparser.cpp
index d85256d2..b077ec20 100644
--- a/kompare/libdiff2/diffparser.cpp
+++ b/kompare/libdiff2/diffparser.cpp
@@ -49,27 +49,27 @@ enum Kompare::Format DiffParser::determineFormat()
while( it != m_diffLines.end() )
{
kdDebug(8101) << (*it) << endl;
- if( (*it).find( normalRE, 0 ) == 0 )
+ if( (*it).tqfind( normalRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Normal diff..." << endl;
return Kompare::Normal;
}
- else if( (*it).find( unifiedRE, 0 ) == 0 )
+ else if( (*it).tqfind( unifiedRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Unified diff..." << endl;
return Kompare::Unified;
}
- else if( (*it).find( contextRE, 0 ) == 0 )
+ else if( (*it).tqfind( contextRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Context diff..." << endl;
return Kompare::Context;
}
- else if( (*it).find( rcsRE, 0 ) == 0 )
+ else if( (*it).tqfind( rcsRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from an RCS diff..." << endl;
return Kompare::RCS;
}
- else if( (*it).find( edRE, 0 ) == 0 )
+ else if( (*it).tqfind( edRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from an ED diff..." << endl;
return Kompare::Ed;
diff --git a/kompare/libdiff2/kompare.h b/kompare/libdiff2/kompare.h
index 8f6b7fe5..1c21db07 100644
--- a/kompare/libdiff2/kompare.h
+++ b/kompare/libdiff2/kompare.h
@@ -63,7 +63,7 @@ namespace Kompare
UnknownDiffMode // Use to initialize the Info struct
};
- enum Status {
+ enum tqStatus {
RunningDiff,
Parsing,
FinishedParsing,
@@ -135,7 +135,7 @@ public:
relative += "../";
}
- relative += TQString( to ).replace( 0, root.path(1).length(), "" );
+ relative += TQString( to ).tqreplace( 0, root.path(1).length(), "" );
return relative;
}
diff --git a/kompare/libdiff2/komparemodellist.cpp b/kompare/libdiff2/komparemodellist.cpp
index db10f4c3..dc39c1bc 100644
--- a/kompare/libdiff2/komparemodellist.cpp
+++ b/kompare/libdiff2/komparemodellist.cpp
@@ -46,8 +46,8 @@
using namespace Diff2;
-KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent, const char* name )
- : TQObject( parent, name ),
+KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* tqparent, const char* name )
+ : TQObject( tqparent, name ),
m_diffProcess( 0 ),
m_diffSettings( diffSettings ),
m_models( 0 ),
@@ -58,34 +58,34 @@ KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::
m_info( info ),
m_textCodec( 0 )
{
- m_applyDifference = new KAction( i18n("&Apply Difference"), "1rightarrow", Qt::Key_Space,
+ m_applyDifference = new KAction( i18n("&Apply Difference"), "1rightarrow", TQt::Key_Space,
this, TQT_SLOT(slotActionApplyDifference()),
- (( KomparePart* )parent)->actionCollection(), "difference_apply" );
- m_unApplyDifference = new KAction( i18n("Un&apply Difference"), "1leftarrow", Qt::Key_BackSpace,
+ (( KomparePart* )tqparent)->actionCollection(), "difference_apply" );
+ m_unApplyDifference = new KAction( i18n("Un&apply Difference"), "1leftarrow", TQt::Key_BackSpace,
this, TQT_SLOT(slotActionUnApplyDifference()),
- (( KomparePart* )parent)->actionCollection(), "difference_unapply" );
- m_applyAll = new KAction( i18n("App&ly All"), "2rightarrow", Qt::CTRL + Qt::Key_A,
+ (( KomparePart* )tqparent)->actionCollection(), "difference_unapply" );
+ m_applyAll = new KAction( i18n("App&ly All"), "2rightarrow", TQt::CTRL + TQt::Key_A,
this, TQT_SLOT(slotActionApplyAllDifferences()),
- (( KomparePart* )parent)->actionCollection(), "difference_applyall" );
- m_unapplyAll = new KAction( i18n("&Unapply All"), "2leftarrow", Qt::CTRL + Qt::Key_U,
+ (( KomparePart* )tqparent)->actionCollection(), "difference_applyall" );
+ m_unapplyAll = new KAction( i18n("&Unapply All"), "2leftarrow", TQt::CTRL + TQt::Key_U,
this, TQT_SLOT(slotActionUnapplyAllDifferences()),
- (( KomparePart* )parent)->actionCollection(), "difference_unapplyall" );
- m_previousFile = new KAction( i18n("P&revious File"), "2uparrow", Qt::CTRL + Qt::Key_PageUp,
+ (( KomparePart* )tqparent)->actionCollection(), "difference_unapplyall" );
+ m_previousFile = new KAction( i18n("P&revious File"), "2uparrow", TQt::CTRL + TQt::Key_PageUp,
this, TQT_SLOT(slotPreviousModel()),
- (( KomparePart* )parent)->actionCollection(), "difference_previousfile" );
- m_nextFile = new KAction( i18n("N&ext File"), "2downarrow", Qt::CTRL + Qt::Key_PageDown,
+ (( KomparePart* )tqparent)->actionCollection(), "difference_previousfile" );
+ m_nextFile = new KAction( i18n("N&ext File"), "2downarrow", TQt::CTRL + TQt::Key_PageDown,
this, TQT_SLOT(slotNextModel()),
- (( KomparePart* )parent)->actionCollection(), "difference_nextfile" );
- m_previousDifference = new KAction( i18n("&Previous Difference"), "1uparrow", Qt::CTRL + Qt::Key_Up,
+ (( KomparePart* )tqparent)->actionCollection(), "difference_nextfile" );
+ m_previousDifference = new KAction( i18n("&Previous Difference"), "1uparrow", TQt::CTRL + TQt::Key_Up,
this, TQT_SLOT(slotPreviousDifference()),
- (( KomparePart* )parent)->actionCollection(), "difference_previous" );
- m_nextDifference = new KAction( i18n("&Next Difference"), "1downarrow", Qt::CTRL + Qt::Key_Down,
+ (( KomparePart* )tqparent)->actionCollection(), "difference_previous" );
+ m_nextDifference = new KAction( i18n("&Next Difference"), "1downarrow", TQt::CTRL + TQt::Key_Down,
this, TQT_SLOT(slotNextDifference()),
- (( KomparePart* )parent)->actionCollection(), "difference_next" );
+ (( KomparePart* )tqparent)->actionCollection(), "difference_next" );
m_previousDifference->setEnabled( false );
m_nextDifference->setEnabled( false );
- m_save = KStdAction::save( this, TQT_SLOT(slotSaveDestination()), ((KomparePart*)parent)->actionCollection() );
+ m_save = KStdAction::save( this, TQT_SLOT(slotSaveDestination()), ((KomparePart*)tqparent)->actionCollection() );
m_save->setEnabled( false );
updateModelListActions();
@@ -235,7 +235,7 @@ bool KompareModelList::openFileAndDiff( const TQString& file, const TQString& di
if ( parseDiffOutput( readFile( diff ) ) != 0 )
{
- emit error( i18n( "<qt>No models or no differences, this file: <b>%1</b>, is not a valid diff file.</qt>" ).arg( diff ) );
+ emit error( i18n( "<qt>No models or no differences, this file: <b>%1</b>, is not a valid diff file.</qt>" ).tqarg( diff ) );
return false;
}
@@ -243,7 +243,7 @@ bool KompareModelList::openFileAndDiff( const TQString& file, const TQString& di
if ( !blendOriginalIntoModelList( file ) )
{
kdDebug(8101) << "Oops cant blend original file into modellist : " << file << endl;
- emit( i18n( "<qt>There were problems applying the diff <b>%1</b> to the file <b>%2</b>.</qt>" ).arg( diff ).arg( file ) );
+ emit( i18n( "<qt>There were problems applying the diff <b>%1</b> to the file <b>%2</b>.</qt>" ).tqarg( diff ).tqarg( file ) );
return false;
}
@@ -259,7 +259,7 @@ bool KompareModelList::openDirAndDiff( const TQString& dir, const TQString& diff
if ( parseDiffOutput( readFile( diff ) ) != 0 )
{
- emit error( i18n( "<qt>No models or no differences, this file: <b>%1</b>, is not a valid diff file.</qt>" ).arg( diff ) );
+ emit error( i18n( "<qt>No models or no differences, this file: <b>%1</b>, is not a valid diff file.</qt>" ).tqarg( diff ) );
return false;
}
@@ -268,7 +268,7 @@ bool KompareModelList::openDirAndDiff( const TQString& dir, const TQString& diff
{
// Trouble blending the original into the model
kdDebug(8101) << "Oops cant blend original dir into modellist : " << dir << endl;
- emit error( i18n( "<qt>There were problems applying the diff <b>%1</b> to the folder <b>%2</b>.</qt>" ).arg( diff ).arg( dir ) );
+ emit error( i18n( "<qt>There were problems applying the diff <b>%1</b> to the folder <b>%2</b>.</qt>" ).tqarg( diff ).tqarg( dir ) );
return false;
}
@@ -347,7 +347,7 @@ bool KompareModelList::saveDestination( DiffModel* model )
temp->close();
if( temp->status() != 0 ) {
- emit error( i18n( "<qt>Could not write to the temporary file <b>%1</b>, deleting it.</qt>" ).arg( temp->name() ) );
+ emit error( i18n( "<qt>Could not write to the temporary file <b>%1</b>, deleting it.</qt>" ).tqarg( temp->name() ) );
temp->unlink();
delete temp;
return false;
@@ -361,26 +361,26 @@ bool KompareModelList::saveDestination( DiffModel* model )
kdDebug(8101) << "Tempfilename : " << temp->name() << endl;
kdDebug(8101) << "DestinationURL : " << destination << endl;
KIO::UDSEntry entry;
- if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (TQWidget*)parent() ) )
+ if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (TQWidget*)tqparent() ) )
{
- if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (TQWidget*)parent() ) )
+ if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (TQWidget*)tqparent() ) )
{
emit error( i18n( "<qt>Could not create destination directory <b>%1</b>.\nThe file has not been saved.</qt>" ) );
return false;
}
}
- result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (TQWidget*)parent() );
+ result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (TQWidget*)tqparent() );
}
else
{
kdDebug(8101) << "Tempfilename : " << temp->name() << endl;
kdDebug(8101) << "DestinationURL : " << m_destination << endl;
- result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (TQWidget*)parent() );
+ result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (TQWidget*)tqparent() );
}
if ( !result )
{
- emit error( i18n( "<qt>Could not upload the temporary file to the destination location <b>%1</b>. The temporary file is still available under: <b>%2</b>. You can manually copy it to the right place.</qt>" ).arg( m_destination ).arg( temp->name() ) );
+ emit error( i18n( "<qt>Could not upload the temporary file to the destination location <b>%1</b>. The temporary file is still available under: <b>%2</b>. You can manually copy it to the right place.</qt>" ).tqarg( m_destination ).tqarg( temp->name() ) );
}
else
{
@@ -489,12 +489,12 @@ TQStringList KompareModelList::split( const TQString& fileContents )
int pos = 0;
unsigned int oldpos = 0;
// split that does not strip the split char
-#ifdef QT_OS_MAC
+#ifdef TQT_OS_MAC
const char split = '\r';
#else
const char split = '\n';
#endif
- while ( ( pos = contents.find( split, oldpos ) ) >= 0 )
+ while ( ( pos = contents.tqfind( split, oldpos ) ) >= 0 )
{
list.append( contents.mid( oldpos, pos - oldpos + 1 ) );
oldpos = pos + 1;
@@ -613,7 +613,7 @@ void KompareModelList::slotWriteDiffOutput( bool success )
emit error( i18n( "Could not write to the temporary file." ) );
}
- KIO::NetAccess::upload( m_diffTemp->name(), KURL( m_diffURL ), (TQWidget*)parent() );
+ KIO::NetAccess::upload( m_diffTemp->name(), KURL( m_diffURL ), (TQWidget*)tqparent() );
emit status( Kompare::FinishedWritingDiff );
}
@@ -633,11 +633,11 @@ void KompareModelList::slotSelectionChanged( const Diff2::DiffModel* model, cons
// This method will signal all the other objects about a change in selection,
// it will emit setSelection( const DiffModel*, const Difference* ) to all who are connected
kdDebug(8101) << "KompareModelList::slotSelectionChanged( " << model << ", " << diff << " )" << endl;
- kdDebug(8101) << "Sender is : " << sender()->className() << endl;
+ kdDebug(8101) << "Sender is : " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->className() << endl;
// kdDebug(8101) << kdBacktrace() << endl;
m_selectedModel = const_cast<DiffModel*>(model);
- m_modelIndex = m_models->findIndex( m_selectedModel );
+ m_modelIndex = m_models->tqfindIndex( m_selectedModel );
kdDebug( 8101 ) << "m_modelIndex = " << m_modelIndex << endl;
m_selectedDifference = const_cast<Difference*>(diff);
@@ -668,7 +668,7 @@ void KompareModelList::slotSelectionChanged( const Diff2::Difference* diff )
// This method will emit setSelection( const Difference* ) to whomever is listening
// when for instance in kompareview the selection has changed
kdDebug(8101) << "KompareModelList::slotSelectionChanged( " << diff << " )" << endl;
- kdDebug(8101) << "Sender is : " << sender()->className() << endl;
+ kdDebug(8101) << "Sender is : " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->className() << endl;
m_selectedDifference = const_cast<Difference*>(diff);
@@ -901,7 +901,7 @@ bool KompareModelList::blendOriginalIntoModelList( const TQString& localURL )
if ( fi.isDir() )
{ // is a dir
kdDebug() << "Blend Dir" << endl;
-// TQDir dir( localURL, TQString::null, TQDir::Name|TQDir::DirsFirst, TQDir::All );
+// TQDir dir( localURL, TQString(), TQDir::Name|TQDir::DirsFirst, TQDir::All );
DiffModelListIterator modelIt = m_models->begin();
DiffModelListIterator mEnd = m_models->end();
for ( ; modelIt != mEnd; ++modelIt )
@@ -1086,7 +1086,7 @@ bool KompareModelList::blendFile( DiffModel* model, const TQString& fileContents
case Difference::Change:
kdDebug(8101) << "Change" << endl;
- //QStringListConstIterator saveIt = linesIt;
+ //TQStringListConstIterator saveIt = linesIt;
for ( int i = 0; i < diff->sourceLineCount(); i++ )
{
@@ -1255,10 +1255,10 @@ bool KompareModelList::setSelectedModel( DiffModel* model )
if ( model != m_selectedModel )
{
- if ( m_models->findIndex( model ) == -1 )
+ if ( m_models->tqfindIndex( model ) == -1 )
return false;
kdDebug(8101) << "m_selectedModel (was) = " << m_selectedModel << endl;
- m_modelIndex = m_models->findIndex( model );
+ m_modelIndex = m_models->tqfindIndex( model );
kdDebug(8101) << "m_selectedModel (is) = " << m_selectedModel << endl;
m_selectedModel = model;
}
@@ -1272,7 +1272,7 @@ void KompareModelList::updateModelListActions()
{
if ( m_models && m_selectedModel && m_selectedDifference )
{
- if ( ( ( KomparePart* )parent() )->isReadWrite() )
+ if ( ( ( KomparePart* )tqparent() )->isReadWrite() )
{
if ( m_selectedModel->appliedCount() != m_selectedModel->differenceCount() )
m_applyAll->setEnabled( true );
diff --git a/kompare/libdiff2/komparemodellist.h b/kompare/libdiff2/komparemodellist.h
index afeb770f..3b7b6bff 100644
--- a/kompare/libdiff2/komparemodellist.h
+++ b/kompare/libdiff2/komparemodellist.h
@@ -38,11 +38,12 @@ class KompareProcess;
namespace Diff2
{
-class KompareModelList : public QObject
+class KompareModelList : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent = 0, const char* name = 0 );
+ KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* tqparent = 0, const char* name = 0 );
~KompareModelList();
public:
@@ -87,11 +88,11 @@ public:
int appliedCount() const;
const DiffModel* modelAt( int i ) const { return *( m_models->at( i ) ); };
- int findModel( DiffModel* model ) const { return m_models->findIndex( model ); };
+ int findModel( DiffModel* model ) const { return m_models->tqfindIndex( model ); };
bool isModified() const;
- int currentModel() const { return m_models->findIndex( m_selectedModel ); };
+ int currentModel() const { return m_models->tqfindIndex( m_selectedModel ); };
int currentDifference() const { return m_selectedModel ? m_selectedModel->findDifference( m_selectedDifference ) : -1; };
const DiffModel* selectedModel() const { return m_selectedModel; };
@@ -113,7 +114,7 @@ protected:
bool blendFile( DiffModel* model, const TQString& lines );
signals:
- void status( Kompare::Status status );
+ void status( Kompare::tqStatus status );
void setStatusBarModelInfo( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
void error( TQString error );
void modelsChanged( const Diff2::DiffModelList* models );
diff --git a/kompare/libdiff2/kompareprocess.h b/kompare/libdiff2/kompareprocess.h
index 079e24cf..aea920c2 100644
--- a/kompare/libdiff2/kompareprocess.h
+++ b/kompare/libdiff2/kompareprocess.h
@@ -31,9 +31,10 @@ class DiffSettings;
class KompareProcess : public KProcess, public KompareFunctions
{
Q_OBJECT
+ TQ_OBJECT
public:
- KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString directory = TQString::null );
+ KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString directory = TQString() );
~KompareProcess();
bool start();
diff --git a/kompare/libdiff2/levenshteintable.cpp b/kompare/libdiff2/levenshteintable.cpp
index 7e4ddbbe..c031ee61 100644
--- a/kompare/libdiff2/levenshteintable.cpp
+++ b/kompare/libdiff2/levenshteintable.cpp
@@ -113,8 +113,8 @@ unsigned int LevenshteinTable::createTable( DifferenceString* source, Difference
unsigned int m = s.length();
unsigned int n = d.length();
- const TQChar* sq = s.unicode();
- const TQChar* dq = d.unicode();
+ const TQChar* sq = s.tqunicode();
+ const TQChar* dq = d.tqunicode();
if ( m == 1 )
return --n;
diff --git a/kompare/libdiff2/parser.cpp b/kompare/libdiff2/parser.cpp
index 1e3efc8a..67386508 100644
--- a/kompare/libdiff2/parser.cpp
+++ b/kompare/libdiff2/parser.cpp
@@ -50,7 +50,7 @@ int Parser::cleanUpCrap( TQStringList& diffLines )
// correcting the advance of the iterator because of the remove
--it;
TQString temp( *it );
- temp.truncate( temp.find( '\n' ) );
+ temp.truncate( temp.tqfind( '\n' ) );
*it = temp;
++nol;
}
diff --git a/kompare/libdiff2/parserbase.cpp b/kompare/libdiff2/parserbase.cpp
index ca19d232..8a503019 100644
--- a/kompare/libdiff2/parserbase.cpp
+++ b/kompare/libdiff2/parserbase.cpp
@@ -456,7 +456,7 @@ bool ParserBase::parseNormalHunkBody()
{
// kdDebug(8101) << "ParserBase::parseNormalHunkBody" << endl;
- TQString type = TQString::null;
+ TQString type = TQString();
int linenoA = 0, linenoB = 0;
diff --git a/kompare/libdiff2/perforceparser.cpp b/kompare/libdiff2/perforceparser.cpp
index 0e0a2aef..59a2dae2 100644
--- a/kompare/libdiff2/perforceparser.cpp
+++ b/kompare/libdiff2/perforceparser.cpp
@@ -53,22 +53,22 @@ enum Kompare::Format PerforceParser::determineFormat()
while( it != m_diffLines.end() )
{
- if( (*it).find( unifiedRE, 0 ) == 0 )
+ if( (*it).tqfind( unifiedRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Unified diff..." << endl;
return Kompare::Unified;
}
- else if( (*it).find( contextRE, 0 ) == 0 )
+ else if( (*it).tqfind( contextRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Context diff..." << endl;
return Kompare::Context;
}
- else if( (*it).find( normalRE, 0 ) == 0 )
+ else if( (*it).tqfind( normalRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Normal diff..." << endl;
return Kompare::Normal;
}
- else if( (*it).find( rcsRE, 0 ) == 0 )
+ else if( (*it).tqfind( rcsRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a RCS diff..." << endl;
return Kompare::RCS;
@@ -103,8 +103,8 @@ bool PerforceParser::parseContextDiffHeader()
destinationFileRE.exactMatch( m_contextDiffHeader1.cap( 2 ) );
kdDebug(8101) << "Matched length = " << sourceFileRE.matchedLength() << endl;
kdDebug(8101) << "Matched length = " << destinationFileRE.matchedLength() << endl;
- kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl;
- kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << endl;
+ kdDebug(8101) << "Captured texts = " << sourceFileRE.tqcapturedTexts() << endl;
+ kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl;
kdDebug(8101) << "Source File : " << sourceFileRE.cap( 1 ) << endl;
kdDebug(8101) << "Destination File : " << destinationFileRE.cap( 1 ) << endl;
m_currentModel->setSourceFile ( sourceFileRE.cap( 1 ) );
@@ -117,7 +117,7 @@ bool PerforceParser::parseContextDiffHeader()
else
{
kdDebug(8101) << "Matched length = " << m_contextDiffHeader1.matchedLength() << endl;
- kdDebug(8101) << "Captured texts = " << m_contextDiffHeader1.capturedTexts() << endl;
+ kdDebug(8101) << "Captured texts = " << m_contextDiffHeader1.tqcapturedTexts() << endl;
}
}
@@ -149,8 +149,8 @@ bool PerforceParser::parseNormalDiffHeader()
destinationFileRE.exactMatch( m_normalDiffHeader.cap( 2 ) );
kdDebug(8101) << "Matched length = " << sourceFileRE.matchedLength() << endl;
kdDebug(8101) << "Matched length = " << destinationFileRE.matchedLength() << endl;
- kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl;
- kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << endl;
+ kdDebug(8101) << "Captured texts = " << sourceFileRE.tqcapturedTexts() << endl;
+ kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl;
kdDebug(8101) << "Source File : " << sourceFileRE.cap( 1 ) << endl;
kdDebug(8101) << "Destination File : " << destinationFileRE.cap( 1 ) << endl;
m_currentModel->setSourceFile ( sourceFileRE.cap( 1 ) );
@@ -163,7 +163,7 @@ bool PerforceParser::parseNormalDiffHeader()
else
{
kdDebug(8101) << "Matched length = " << m_normalDiffHeader.matchedLength() << endl;
- kdDebug(8101) << "Captured texts = " << m_normalDiffHeader.capturedTexts() << endl;
+ kdDebug(8101) << "Captured texts = " << m_normalDiffHeader.tqcapturedTexts() << endl;
}
}
@@ -200,8 +200,8 @@ bool PerforceParser::parseUnifiedDiffHeader()
destinationFileRE.exactMatch( m_unifiedDiffHeader1.cap( 2 ) );
// kdDebug(8101) << "Matched length = " << sourceFileRE.matchedLength() << endl;
// kdDebug(8101) << "Matched length = " << destinationFileRE.matchedLength() << endl;
-// kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl;
-// kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << endl;
+// kdDebug(8101) << "Captured texts = " << sourceFileRE.tqcapturedTexts() << endl;
+// kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl;
// kdDebug(8101) << "Source File : " << sourceFileRE.cap( 1 ) << endl;
// kdDebug(8101) << "Destination File : " << destinationFileRE.cap( 1 ) << endl;
m_currentModel->setSourceFile ( sourceFileRE.cap( 1 ) );
@@ -214,7 +214,7 @@ bool PerforceParser::parseUnifiedDiffHeader()
else
{
// kdDebug(8101) << "Matched length = " << m_unifiedDiffHeader1.matchedLength() << endl;
-// kdDebug(8101) << "Captured texts = " << m_unifiedDiffHeader1.capturedTexts() << endl;
+// kdDebug(8101) << "Captured texts = " << m_unifiedDiffHeader1.tqcapturedTexts() << endl;
}
}