summaryrefslogtreecommitdiffstats
path: root/kompare/libdiff2
diff options
context:
space:
mode:
Diffstat (limited to 'kompare/libdiff2')
-rw-r--r--kompare/libdiff2/cvsdiffparser.cpp22
-rw-r--r--kompare/libdiff2/cvsdiffparser.h4
-rw-r--r--kompare/libdiff2/difference.cpp8
-rw-r--r--kompare/libdiff2/difference.h42
-rw-r--r--kompare/libdiff2/diffhunk.cpp12
-rw-r--r--kompare/libdiff2/diffhunk.h14
-rw-r--r--kompare/libdiff2/diffmodel.cpp38
-rw-r--r--kompare/libdiff2/diffmodel.h66
-rw-r--r--kompare/libdiff2/diffmodellist.h10
-rw-r--r--kompare/libdiff2/diffparser.cpp16
-rw-r--r--kompare/libdiff2/diffparser.h2
-rw-r--r--kompare/libdiff2/kompare.h14
-rw-r--r--kompare/libdiff2/komparemodellist.cpp164
-rw-r--r--kompare/libdiff2/komparemodellist.h52
-rw-r--r--kompare/libdiff2/kompareprocess.cpp44
-rw-r--r--kompare/libdiff2/kompareprocess.h16
-rw-r--r--kompare/libdiff2/levenshteintable.cpp18
-rw-r--r--kompare/libdiff2/parser.cpp20
-rw-r--r--kompare/libdiff2/parser.h6
-rw-r--r--kompare/libdiff2/parserbase.cpp54
-rw-r--r--kompare/libdiff2/parserbase.h60
-rw-r--r--kompare/libdiff2/perforceparser.cpp32
-rw-r--r--kompare/libdiff2/perforceparser.h2
23 files changed, 358 insertions, 358 deletions
diff --git a/kompare/libdiff2/cvsdiffparser.cpp b/kompare/libdiff2/cvsdiffparser.cpp
index d210eb66..47c79a0f 100644
--- a/kompare/libdiff2/cvsdiffparser.cpp
+++ b/kompare/libdiff2/cvsdiffparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@
using namespace Diff2;
-CVSDiffParser::CVSDiffParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+CVSDiffParser::CVSDiffParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
// The regexps needed for context cvs diff parsing, the rest is the same as in parserbase.cpp
// third capture in header1 is non optional for cvs diff, it is the revision
@@ -43,13 +43,13 @@ enum Kompare::Format CVSDiffParser::determineFormat()
{
// kdDebug(8101) << "Determining the format of the CVSDiff" << endl;
- QRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
- QRegExp unifiedRE( "^--- [^\\t]+\\t" );
- QRegExp contextRE( "^\\*\\*\\* [^\\t]+\\t" );
- QRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
- QRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
+ TQRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
+ TQRegExp unifiedRE( "^--- [^\\t]+\\t" );
+ TQRegExp contextRE( "^\\*\\*\\* [^\\t]+\\t" );
+ TQRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
+ TQRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
@@ -89,7 +89,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
kdDebug(8101) << "CVSDiffParser::parseNormalDiffHeader()" << endl;
bool result = false;
- QStringList::ConstIterator diffEnd = m_diffLines.end();
+ TQStringList::ConstIterator diffEnd = m_diffLines.end();
while ( m_diffIterator != diffEnd )
{
@@ -99,7 +99,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
kdDebug(8101) << "Matched string Header = " << m_normalDiffHeader.cap( 0 ) << endl;
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceFile ( m_normalDiffHeader.cap( 1 ) );
m_currentModel->setDestinationFile ( m_normalDiffHeader.cap( 1 ) );
@@ -120,7 +120,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
// Set this to the first line again and hope it is a single file diff
m_diffIterator = m_diffLines.begin();
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_singleFileDiff = true;
}
diff --git a/kompare/libdiff2/cvsdiffparser.h b/kompare/libdiff2/cvsdiffparser.h
index 88fef485..e856cc6d 100644
--- a/kompare/libdiff2/cvsdiffparser.h
+++ b/kompare/libdiff2/cvsdiffparser.h
@@ -18,7 +18,7 @@
#ifndef _CVSDIFF_PARSER_H
#define _CVSDIFF_PARSER_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include "parserbase.h"
@@ -30,7 +30,7 @@ class KompareModelList;
class CVSDiffParser : public ParserBase
{
public:
- CVSDiffParser( const KompareModelList* list, const QStringList& diff );
+ CVSDiffParser( const KompareModelList* list, const TQStringList& diff );
virtual ~CVSDiffParser();
protected:
diff --git a/kompare/libdiff2/difference.cpp b/kompare/libdiff2/difference.cpp
index 8cbb4093..c23dd1e9 100644
--- a/kompare/libdiff2/difference.cpp
+++ b/kompare/libdiff2/difference.cpp
@@ -34,12 +34,12 @@ Difference::~Difference()
{
}
-void Difference::addSourceLine( QString line )
+void Difference::addSourceLine( TQString line )
{
m_sourceLines.append( new DifferenceString( line ) );
}
-void Difference::addDestinationLine( QString line )
+void Difference::addDestinationLine( TQString line )
{
m_destinationLines.append( new DifferenceString( line ) );
}
@@ -85,9 +85,9 @@ void Difference::determineInlineDifferences()
}
}
-QString Difference::recreateDifference() const
+TQString Difference::recreateDifference() const
{
- QString difference;
+ TQString difference;
// source
DifferenceStringListConstIterator stringIt = m_sourceLines.begin();
diff --git a/kompare/libdiff2/difference.h b/kompare/libdiff2/difference.h
index 91065891..51295636 100644
--- a/kompare/libdiff2/difference.h
+++ b/kompare/libdiff2/difference.h
@@ -20,8 +20,8 @@
#ifndef DIFFERENCE_H
#define DIFFERENCE_H
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
@@ -62,9 +62,9 @@ private:
unsigned int m_offset;
};
-typedef QValueList<Marker*> MarkerList;
-typedef QValueList<Marker*>::iterator MarkerListIterator;
-typedef QValueList<Marker*>::const_iterator MarkerListConstIterator;
+typedef TQValueList<Marker*> MarkerList;
+typedef TQValueList<Marker*>::iterator MarkerListIterator;
+typedef TQValueList<Marker*>::const_iterator MarkerListConstIterator;
class DifferenceString
{
@@ -73,7 +73,7 @@ public:
{
// kdDebug(8101) << "DifferenceString::DifferenceString()" << endl;
}
- DifferenceString( const QString& string, const MarkerList& markerList = MarkerList() ) :
+ DifferenceString( const TQString& string, const MarkerList& markerList = MarkerList() ) :
m_string( string ),
m_markerList( markerList )
{
@@ -91,11 +91,11 @@ public:
~DifferenceString() {}
public:
- const QString& string() const
+ const TQString& string() const
{
return m_string;
}
- const QString& conflictString() const
+ const TQString& conflictString() const
{
return m_conflict;
}
@@ -103,12 +103,12 @@ public:
{
return m_markerList;
}
- void setString( const QString& string )
+ void setString( const TQString& string )
{
m_string = string;
calculateHash();
}
- void setConflictString( const QString& conflict )
+ void setConflictString( const TQString& conflict )
{
m_conflict = conflict;
}
@@ -142,15 +142,15 @@ protected:
}
private:
- QString m_string;
- QString m_conflict;
+ TQString m_string;
+ TQString m_conflict;
unsigned int m_hash;
MarkerList m_markerList;
};
-typedef QValueVector<DifferenceString*> DifferenceStringList;
-typedef QValueVector<DifferenceString*>::iterator DifferenceStringListIterator;
-typedef QValueVector<DifferenceString*>::const_iterator DifferenceStringListConstIterator;
+typedef TQValueVector<DifferenceString*> DifferenceStringList;
+typedef TQValueVector<DifferenceString*>::iterator DifferenceStringListIterator;
+typedef TQValueVector<DifferenceString*>::const_iterator DifferenceStringListConstIterator;
class Difference
{
@@ -190,13 +190,13 @@ public:
void setType( int type ) { m_type = type; }
- void addSourceLine( QString line );
- void addDestinationLine( QString line );
+ void addSourceLine( TQString line );
+ void addDestinationLine( TQString line );
/** This method will calculate the differences between the individual strings and store them as Markers */
void determineInlineDifferences();
- QString recreateDifference() const;
+ TQString recreateDifference() const;
private:
int m_type;
@@ -213,9 +213,9 @@ private:
LevenshteinTable* m_tableXXX; // now unused
};
-typedef QValueList<Difference*> DifferenceList;
-typedef QValueList<Difference*>::iterator DifferenceListIterator;
-typedef QValueList<Difference*>::const_iterator DifferenceListConstIterator;
+typedef TQValueList<Difference*> DifferenceList;
+typedef TQValueList<Difference*>::iterator DifferenceListIterator;
+typedef TQValueList<Difference*>::const_iterator DifferenceListConstIterator;
} // End of namespace Diff2
diff --git a/kompare/libdiff2/diffhunk.cpp b/kompare/libdiff2/diffhunk.cpp
index f980dd93..3b48d796 100644
--- a/kompare/libdiff2/diffhunk.cpp
+++ b/kompare/libdiff2/diffhunk.cpp
@@ -23,7 +23,7 @@
using namespace Diff2;
-DiffHunk::DiffHunk( int sourceLine, int destinationLine, QString function, Type type ) :
+DiffHunk::DiffHunk( int sourceLine, int destinationLine, TQString function, Type type ) :
m_sourceLine( sourceLine ),
m_destinationLine( destinationLine ),
m_function( function ),
@@ -66,10 +66,10 @@ int DiffHunk::destinationLineCount() const
return lineCount;
}
-QString DiffHunk::recreateHunk() const
+TQString DiffHunk::recreateHunk() const
{
- QString hunk;
- QString differences;
+ TQString hunk;
+ TQString differences;
// recreate body
DifferenceListConstIterator diffIt = m_differences.begin();
@@ -97,7 +97,7 @@ QString DiffHunk::recreateHunk() const
}
// recreate header
- hunk += QString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" )
+ hunk += TQString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" )
.arg( m_sourceLine )
.arg( m_destinationLine )
.arg( slc )
@@ -106,7 +106,7 @@ QString DiffHunk::recreateHunk() const
if ( !m_function.isEmpty() )
hunk += " " + m_function;
- hunk += QString::fromLatin1( "\n" );
+ hunk += TQString::fromLatin1( "\n" );
hunk += differences;
diff --git a/kompare/libdiff2/diffhunk.h b/kompare/libdiff2/diffhunk.h
index 8a76babb..a4194a3a 100644
--- a/kompare/libdiff2/diffhunk.h
+++ b/kompare/libdiff2/diffhunk.h
@@ -33,11 +33,11 @@ public:
enum Type { Normal, AddedByBlend };
public:
- DiffHunk( int sourceLine, int destinationLine, QString function = QString::null, Type type = Normal );
+ DiffHunk( int sourceLine, int destinationLine, TQString function = TQString::null, Type type = Normal );
~DiffHunk();
const DifferenceList& differences() const { return m_differences; };
- const QString& function() const { return m_function; };
+ const TQString& function() const { return m_function; };
int sourceLineNumber() const { return m_sourceLine; };
int destinationLineNumber() const { return m_destinationLine; };
@@ -50,19 +50,19 @@ public:
void add( Difference* diff );
- QString recreateHunk() const;
+ TQString recreateHunk() const;
private:
int m_sourceLine;
int m_destinationLine;
DifferenceList m_differences;
- QString m_function;
+ TQString m_function;
Type m_type;
};
-typedef QValueList<DiffHunk*> DiffHunkList;
-typedef QValueList<DiffHunk*>::iterator DiffHunkListIterator;
-typedef QValueList<DiffHunk*>::const_iterator DiffHunkListConstIterator;
+typedef TQValueList<DiffHunk*> DiffHunkList;
+typedef TQValueList<DiffHunk*>::iterator DiffHunkListIterator;
+typedef TQValueList<DiffHunk*>::const_iterator DiffHunkListConstIterator;
} // End of namespace Diff2
diff --git a/kompare/libdiff2/diffmodel.cpp b/kompare/libdiff2/diffmodel.cpp
index 54c33457..1b3822b0 100644
--- a/kompare/libdiff2/diffmodel.cpp
+++ b/kompare/libdiff2/diffmodel.cpp
@@ -17,8 +17,8 @@
**
***************************************************************************/
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
using namespace Diff2;
/** */
-DiffModel::DiffModel( const QString& source, const QString& destination ) :
+DiffModel::DiffModel( const TQString& source, const TQString& destination ) :
m_source( source ),
m_destination( destination ),
m_sourcePath( "" ),
@@ -146,19 +146,19 @@ int DiffModel::localeAwareCompareSource( const DiffModel& model )
return result;
}
-QString DiffModel::recreateDiff() const
+TQString DiffModel::recreateDiff() const
{
// For now we'll always return a diff in the diff format
- QString diff;
+ TQString diff;
// recreate header
- QString tab = QString::fromLatin1( "\t" );
- QString nl = QString::fromLatin1( "\n" );
- diff += QString::fromLatin1( "--- %1\t%2" ).arg( m_source ).arg( m_sourceTimestamp );
+ TQString tab = TQString::fromLatin1( "\t" );
+ TQString nl = TQString::fromLatin1( "\n" );
+ diff += TQString::fromLatin1( "--- %1\t%2" ).arg( m_source ).arg( m_sourceTimestamp );
if ( !m_sourceRevision.isEmpty() )
diff += tab + m_sourceRevision;
diff += nl;
- diff += QString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp );
+ diff += TQString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp );
if ( !m_destinationRevision.isEmpty() )
diff += tab + m_destinationRevision;
diff += nl;
@@ -262,54 +262,54 @@ Difference* DiffModel::nextDifference()
return m_selectedDifference;
}
-const QString DiffModel::sourceFile() const
+const TQString DiffModel::sourceFile() const
{
return m_sourceFile;
}
-const QString DiffModel::destinationFile() const
+const TQString DiffModel::destinationFile() const
{
return m_destinationFile;
}
-const QString DiffModel::sourcePath() const
+const TQString DiffModel::sourcePath() const
{
return m_sourcePath;
}
-const QString DiffModel::destinationPath() const
+const TQString DiffModel::destinationPath() const
{
return m_destinationPath;
}
-void DiffModel::setSourceFile( QString path )
+void DiffModel::setSourceFile( TQString path )
{
m_source = path;
splitSourceInPathAndFileName();
}
-void DiffModel::setDestinationFile( QString path )
+void DiffModel::setDestinationFile( TQString path )
{
m_destination = path;
splitDestinationInPathAndFileName();
}
-void DiffModel::setSourceTimestamp( QString timestamp )
+void DiffModel::setSourceTimestamp( TQString timestamp )
{
m_sourceTimestamp = timestamp;
}
-void DiffModel::setDestinationTimestamp( QString timestamp )
+void DiffModel::setDestinationTimestamp( TQString timestamp )
{
m_destinationTimestamp = timestamp;
}
-void DiffModel::setSourceRevision( QString revision )
+void DiffModel::setSourceRevision( TQString revision )
{
m_destinationRevision = revision;
}
-void DiffModel::setDestinationRevision( QString revision )
+void DiffModel::setDestinationRevision( TQString revision )
{
m_destinationRevision = revision;
}
diff --git a/kompare/libdiff2/diffmodel.h b/kompare/libdiff2/diffmodel.h
index 11c424b5..3b957b89 100644
--- a/kompare/libdiff2/diffmodel.h
+++ b/kompare/libdiff2/diffmodel.h
@@ -20,8 +20,8 @@
#ifndef DIFFMODEL_H
#define DIFFMODEL_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "diffhunk.h"
#include "kompare.h"
@@ -37,14 +37,14 @@ class DiffModel : public QObject
Q_OBJECT
public:
- DiffModel( const QString& srcBaseURL, const QString& destBaseURL );
+ DiffModel( const TQString& srcBaseURL, const TQString& destBaseURL );
DiffModel();
- DiffModel( const DiffModel& ) : QObject() {};
+ DiffModel( const DiffModel& ) : TQObject() {};
~DiffModel();
- int parseDiff( enum Kompare::Format format, const QStringList& list );
+ int parseDiff( enum Kompare::Format format, const TQStringList& list );
- QString recreateDiff() const;
+ TQString recreateDiff() const;
int hunkCount() const { return m_hunks.count(); }
int differenceCount() const { return m_differences.count(); }
@@ -67,23 +67,23 @@ public:
Difference* prevDifference();
Difference* nextDifference();
- const QString source() const { return m_source; }
- const QString destination() const { return m_destination; }
- const QString sourceFile() const;
- const QString destinationFile() const;
- const QString sourcePath() const;
- const QString destinationPath() const;
- const QString sourceTimestamp() const { return m_sourceTimestamp; }
- const QString destinationTimestamp() const { return m_destinationTimestamp; }
- const QString sourceRevision() const { return m_sourceRevision; }
- const QString destinationRevision() const { return m_destinationRevision; }
-
- void setSourceFile( QString path );
- void setDestinationFile( QString path );
- void setSourceTimestamp( QString timestamp );
- void setDestinationTimestamp( QString timestamp );
- void setSourceRevision( QString revision );
- void setDestinationRevision( QString revision );
+ const TQString source() const { return m_source; }
+ const TQString destination() const { return m_destination; }
+ const TQString sourceFile() const;
+ const TQString destinationFile() const;
+ const TQString sourcePath() const;
+ const TQString destinationPath() const;
+ const TQString sourceTimestamp() const { return m_sourceTimestamp; }
+ const TQString destinationTimestamp() const { return m_destinationTimestamp; }
+ const TQString sourceRevision() const { return m_sourceRevision; }
+ const TQString destinationRevision() const { return m_destinationRevision; }
+
+ void setSourceFile( TQString path );
+ void setDestinationFile( TQString path );
+ void setSourceTimestamp( TQString timestamp );
+ void setDestinationTimestamp( TQString timestamp );
+ void setSourceRevision( TQString revision );
+ void setDestinationRevision( TQString revision );
void addHunk( DiffHunk* hunk );
void addDiff( Difference* diff );
@@ -116,20 +116,20 @@ private:
void splitDestinationInPathAndFileName();
private:
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
- QString m_sourcePath;
- QString m_destinationPath;
+ TQString m_sourcePath;
+ TQString m_destinationPath;
- QString m_sourceFile;
- QString m_destinationFile;
+ TQString m_sourceFile;
+ TQString m_destinationFile;
- QString m_sourceTimestamp;
- QString m_destinationTimestamp;
+ TQString m_sourceTimestamp;
+ TQString m_destinationTimestamp;
- QString m_sourceRevision;
- QString m_destinationRevision;
+ TQString m_sourceRevision;
+ TQString m_destinationRevision;
DiffHunkList m_hunks;
DifferenceList m_differences;
diff --git a/kompare/libdiff2/diffmodellist.h b/kompare/libdiff2/diffmodellist.h
index 9c4f9807..bb4fefb5 100644
--- a/kompare/libdiff2/diffmodellist.h
+++ b/kompare/libdiff2/diffmodellist.h
@@ -19,21 +19,21 @@
#ifndef DIFFMODELLIST_H
#define DIFFMODELLIST_H
-#include <qvaluelist.h> // include for the base class
+#include <tqvaluelist.h> // include for the base class
#include "diffmodel.h"
namespace Diff2
{
-typedef QValueListIterator<DiffModel*> DiffModelListIterator;
-typedef QValueListConstIterator<DiffModel*> DiffModelListConstIterator;
+typedef TQValueListIterator<DiffModel*> DiffModelListIterator;
+typedef TQValueListConstIterator<DiffModel*> DiffModelListConstIterator;
-class DiffModelList : public QValueList<DiffModel*>
+class DiffModelList : public TQValueList<DiffModel*>
{
public:
DiffModelList() {}
- DiffModelList( const DiffModelList &list ) : QValueList<DiffModel*>( list ) {}
+ DiffModelList( const DiffModelList &list ) : TQValueList<DiffModel*>( list ) {}
virtual ~DiffModelList()
{
clear();
diff --git a/kompare/libdiff2/diffparser.cpp b/kompare/libdiff2/diffparser.cpp
index f98fbde5..d85256d2 100644
--- a/kompare/libdiff2/diffparser.cpp
+++ b/kompare/libdiff2/diffparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -23,7 +23,7 @@
using namespace Diff2;
-DiffParser::DiffParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+DiffParser::DiffParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
// The regexps needed for context diff parsing, the rest is the same as in parserbase.cpp
m_contextDiffHeader1.setPattern( "\\*\\*\\* ([^\\t]+)\\t([^\\t]+)\\n" );
@@ -38,13 +38,13 @@ enum Kompare::Format DiffParser::determineFormat()
{
kdDebug(8101) << "Determining the format of the diff Diff" << endl;
- QRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
- QRegExp unifiedRE( "^--- " );
- QRegExp contextRE( "^\\*\\*\\* " );
- QRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
- QRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
+ TQRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
+ TQRegExp unifiedRE( "^--- " );
+ TQRegExp contextRE( "^\\*\\*\\* " );
+ TQRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
+ TQRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
diff --git a/kompare/libdiff2/diffparser.h b/kompare/libdiff2/diffparser.h
index 72905e3f..8bdbf600 100644
--- a/kompare/libdiff2/diffparser.h
+++ b/kompare/libdiff2/diffparser.h
@@ -26,7 +26,7 @@ namespace Diff2
class DiffParser : public ParserBase
{
public:
- DiffParser( const KompareModelList* list, const QStringList& diff );
+ DiffParser( const KompareModelList* list, const TQStringList& diff );
virtual ~DiffParser();
protected:
diff --git a/kompare/libdiff2/kompare.h b/kompare/libdiff2/kompare.h
index 1ed5c4c7..8f6b7fe5 100644
--- a/kompare/libdiff2/kompare.h
+++ b/kompare/libdiff2/kompare.h
@@ -84,8 +84,8 @@ namespace Kompare
enum Generator _generator = UnknownGenerator,
KURL _source = KURL(),
KURL _destination = KURL(),
- QString _localSource = "",
- QString _localDestination = ""
+ TQString _localSource = "",
+ TQString _localDestination = ""
)
{
mode = _mode;
@@ -103,8 +103,8 @@ namespace Kompare
enum Generator generator;
KURL source;
KURL destination;
- QString localSource;
- QString localDestination;
+ TQString localSource;
+ TQString localDestination;
};
} // End of namespace Kompare
@@ -114,7 +114,7 @@ namespace Kompare
class KompareFunctions
{
public:
- static QString constructRelativePath( const QString& from, const QString& to )
+ static TQString constructRelativePath( const TQString& from, const TQString& to )
{
KURL fromURL( from );
KURL toURL( to );
@@ -130,12 +130,12 @@ public:
if( !root.isValid() ) return to;
- QString relative;
+ TQString relative;
for( ; upLevels > 0; upLevels-- ) {
relative += "../";
}
- relative += QString( to ).replace( 0, root.path(1).length(), "" );
+ relative += TQString( to ).replace( 0, root.path(1).length(), "" );
return relative;
}
diff --git a/kompare/libdiff2/komparemodellist.cpp b/kompare/libdiff2/komparemodellist.cpp
index ac3c725a..db10f4c3 100644
--- a/kompare/libdiff2/komparemodellist.cpp
+++ b/kompare/libdiff2/komparemodellist.cpp
@@ -19,11 +19,11 @@
* *
***************************************************************************/
-#include <qfile.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qvaluelist.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqvaluelist.h>
#include <kaction.h>
#include <kcharsets.h>
@@ -46,8 +46,8 @@
using namespace Diff2;
-KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, QObject* parent, const char* name )
- : QObject( parent, name ),
+KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent, const char* name )
+ : TQObject( parent, name ),
m_diffProcess( 0 ),
m_diffSettings( diffSettings ),
m_models( 0 ),
@@ -59,33 +59,33 @@ KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::
m_textCodec( 0 )
{
m_applyDifference = new KAction( i18n("&Apply Difference"), "1rightarrow", Qt::Key_Space,
- this, SLOT(slotActionApplyDifference()),
+ this, TQT_SLOT(slotActionApplyDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_apply" );
m_unApplyDifference = new KAction( i18n("Un&apply Difference"), "1leftarrow", Qt::Key_BackSpace,
- this, SLOT(slotActionUnApplyDifference()),
+ this, TQT_SLOT(slotActionUnApplyDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_unapply" );
m_applyAll = new KAction( i18n("App&ly All"), "2rightarrow", Qt::CTRL + Qt::Key_A,
- this, SLOT(slotActionApplyAllDifferences()),
+ this, TQT_SLOT(slotActionApplyAllDifferences()),
(( KomparePart* )parent)->actionCollection(), "difference_applyall" );
m_unapplyAll = new KAction( i18n("&Unapply All"), "2leftarrow", Qt::CTRL + Qt::Key_U,
- this, SLOT(slotActionUnapplyAllDifferences()),
+ this, TQT_SLOT(slotActionUnapplyAllDifferences()),
(( KomparePart* )parent)->actionCollection(), "difference_unapplyall" );
m_previousFile = new KAction( i18n("P&revious File"), "2uparrow", Qt::CTRL + Qt::Key_PageUp,
- this, SLOT(slotPreviousModel()),
+ this, TQT_SLOT(slotPreviousModel()),
(( KomparePart* )parent)->actionCollection(), "difference_previousfile" );
m_nextFile = new KAction( i18n("N&ext File"), "2downarrow", Qt::CTRL + Qt::Key_PageDown,
- this, SLOT(slotNextModel()),
+ this, TQT_SLOT(slotNextModel()),
(( KomparePart* )parent)->actionCollection(), "difference_nextfile" );
m_previousDifference = new KAction( i18n("&Previous Difference"), "1uparrow", Qt::CTRL + Qt::Key_Up,
- this, SLOT(slotPreviousDifference()),
+ this, TQT_SLOT(slotPreviousDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_previous" );
m_nextDifference = new KAction( i18n("&Next Difference"), "1downarrow", Qt::CTRL + Qt::Key_Down,
- this, SLOT(slotNextDifference()),
+ this, TQT_SLOT(slotNextDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_next" );
m_previousDifference->setEnabled( false );
m_nextDifference->setEnabled( false );
- m_save = KStdAction::save( this, SLOT(slotSaveDestination()), ((KomparePart*)parent)->actionCollection() );
+ m_save = KStdAction::save( this, TQT_SLOT(slotSaveDestination()), ((KomparePart*)parent)->actionCollection() );
m_save->setEnabled( false );
updateModelListActions();
@@ -95,16 +95,16 @@ KompareModelList::~KompareModelList()
{
}
-bool KompareModelList::isDirectory( const QString& url ) const
+bool KompareModelList::isDirectory( const TQString& url ) const
{
- QFileInfo fi( url );
+ TQFileInfo fi( url );
if ( fi.isDir() )
return true;
else
return false;
}
-bool KompareModelList::isDiff( const QString& mimeType ) const
+bool KompareModelList::isDiff( const TQString& mimeType ) const
{
if ( mimeType == "text/x-diff" )
return true;
@@ -112,7 +112,7 @@ bool KompareModelList::isDiff( const QString& mimeType ) const
return false;
}
-bool KompareModelList::compare( const QString& source, const QString& destination )
+bool KompareModelList::compare( const TQString& source, const TQString& destination )
{
bool result = false;
@@ -126,15 +126,15 @@ bool KompareModelList::compare( const QString& source, const QString& destinatio
}
else if ( !sourceIsDirectory && !destinationIsDirectory )
{
- QFile sourceFile( source );
+ TQFile sourceFile( source );
sourceFile.open( IO_ReadOnly );
- QString sourceMimeType = ( KMimeType::findByContent( sourceFile.readAll() ) )->name();
+ TQString sourceMimeType = ( KMimeType::findByContent( sourceFile.readAll() ) )->name();
sourceFile.close();
kdDebug(8101) << "Mimetype source : " << sourceMimeType << endl;
- QFile destinationFile( destination );
+ TQFile destinationFile( destination );
destinationFile.open( IO_ReadOnly );
- QString destinationMimeType = ( KMimeType::findByContent( destinationFile.readAll() ) )->name();
+ TQString destinationMimeType = ( KMimeType::findByContent( destinationFile.readAll() ) )->name();
destinationFile.close();
kdDebug(8101) << "Mimetype destination: " << destinationMimeType << endl;
@@ -172,7 +172,7 @@ bool KompareModelList::compare( const QString& source, const QString& destinatio
return result;
}
-bool KompareModelList::compareFiles( const QString& source, const QString& destination )
+bool KompareModelList::compareFiles( const TQString& source, const TQString& destination )
{
m_source = source;
m_destination = destination;
@@ -183,16 +183,16 @@ bool KompareModelList::compareFiles( const QString& source, const QString& desti
// m_fileWatch->addFile( m_source );
// m_fileWatch->addFile( m_destination );
-// connect( m_fileWatch, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
-// connect( m_fileWatch, SIGNAL( created( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
-// connect( m_fileWatch, SIGNAL( deleted( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( created( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( deleted( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
// m_fileWatch->startScan();
m_diffProcess = new KompareProcess( m_diffSettings, Kompare::Custom, m_source, m_destination );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotDiffProcessFinished( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotDiffProcessFinished( bool )) );
emit status( Kompare::RunningDiff );
m_diffProcess->start();
@@ -200,7 +200,7 @@ bool KompareModelList::compareFiles( const QString& source, const QString& desti
return true;
}
-bool KompareModelList::compareDirs( const QString& source, const QString& destination )
+bool KompareModelList::compareDirs( const TQString& source, const TQString& destination )
{
m_source = source;
m_destination = destination;
@@ -212,16 +212,16 @@ bool KompareModelList::compareDirs( const QString& source, const QString& destin
// m_dirWatch->addDir( m_source, true, true );
// m_dirWatch->addDir( m_destination, true, true );
-// connect( m_dirWatch, SIGNAL( dirty ( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
-// connect( m_dirWatch, SIGNAL( created( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
-// connect( m_dirWatch, SIGNAL( deleted( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( dirty ( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( created( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( deleted( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
// m_dirWatch->startScan();
m_diffProcess = new KompareProcess( m_diffSettings, Kompare::Custom, m_source, m_destination );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotDiffProcessFinished( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotDiffProcessFinished( bool )) );
emit status( Kompare::RunningDiff );
m_diffProcess->start();
@@ -229,7 +229,7 @@ bool KompareModelList::compareDirs( const QString& source, const QString& destin
return true;
}
-bool KompareModelList::openFileAndDiff( const QString& file, const QString& diff )
+bool KompareModelList::openFileAndDiff( const TQString& file, const TQString& diff )
{
clear();
@@ -253,7 +253,7 @@ bool KompareModelList::openFileAndDiff( const QString& file, const QString& diff
return true;
}
-bool KompareModelList::openDirAndDiff( const QString& dir, const QString& diff )
+bool KompareModelList::openDirAndDiff( const TQString& dir, const TQString& diff )
{
clear();
@@ -302,8 +302,8 @@ bool KompareModelList::saveDestination( DiffModel* model )
return false;
}
- QTextStream* stream = temp->textStream();
- QStringList list;
+ TQTextStream* stream = temp->textStream();
+ TQStringList list;
DiffHunkListConstIterator hunkIt = model->hunks()->begin();
DiffHunkListConstIterator hEnd = model->hunks()->end();
@@ -357,25 +357,25 @@ bool KompareModelList::saveDestination( DiffModel* model )
if ( m_info.mode == Kompare::ComparingDirs )
{
- QString destination = model->destinationPath() + model->destinationFile();
+ TQString destination = model->destinationPath() + model->destinationFile();
kdDebug(8101) << "Tempfilename : " << temp->name() << endl;
kdDebug(8101) << "DestinationURL : " << destination << endl;
KIO::UDSEntry entry;
- if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (QWidget*)parent() ) )
+ if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (TQWidget*)parent() ) )
{
- if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (QWidget*)parent() ) )
+ if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (TQWidget*)parent() ) )
{
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 ), (QWidget*)parent() );
+ result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (TQWidget*)parent() );
}
else
{
kdDebug(8101) << "Tempfilename : " << temp->name() << endl;
kdDebug(8101) << "DestinationURL : " << m_destination << endl;
- result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (QWidget*)parent() );
+ result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (TQWidget*)parent() );
}
if ( !result )
@@ -407,12 +407,12 @@ bool KompareModelList::saveAll()
return true;
}
-void KompareModelList::setEncoding( const QString& encoding )
+void KompareModelList::setEncoding( const TQString& encoding )
{
m_encoding = encoding;
if ( encoding.lower() == "default" )
{
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
}
else
{
@@ -420,7 +420,7 @@ void KompareModelList::setEncoding( const QString& encoding )
m_textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
kdDebug() << "TextCodec: " << m_textCodec << endl;
if ( !m_textCodec )
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
}
kdDebug() << "TextCodec: " << m_textCodec << endl;
}
@@ -459,7 +459,7 @@ void KompareModelList::slotDiffProcessFinished( bool success )
m_diffProcess = 0;
}
-void KompareModelList::slotDirectoryChanged( const QString& /*dir*/ )
+void KompareModelList::slotDirectoryChanged( const TQString& /*dir*/ )
{
// some debug output to see if watching works properly
kdDebug(8101) << "Yippie directories are being watched !!! :)" << endl;
@@ -470,7 +470,7 @@ void KompareModelList::slotDirectoryChanged( const QString& /*dir*/ )
}
}
-void KompareModelList::slotFileChanged( const QString& /*file*/ )
+void KompareModelList::slotFileChanged( const TQString& /*file*/ )
{
// some debug output to see if watching works properly
kdDebug(8101) << "Yippie files are being watched !!! :)" << endl;
@@ -481,10 +481,10 @@ void KompareModelList::slotFileChanged( const QString& /*file*/ )
}
}
-QStringList KompareModelList::split( const QString& fileContents )
+TQStringList KompareModelList::split( const TQString& fileContents )
{
- QString contents = fileContents;
- QStringList list;
+ TQString contents = fileContents;
+ TQStringList list;
int pos = 0;
unsigned int oldpos = 0;
@@ -508,36 +508,36 @@ QStringList KompareModelList::split( const QString& fileContents )
return list;
}
-QString KompareModelList::readFile( const QString& fileName )
+TQString KompareModelList::readFile( const TQString& fileName )
{
- QStringList list;
+ TQStringList list;
- QFile file( fileName );
+ TQFile file( fileName );
file.open( IO_ReadOnly );
- QTextStream stream( &file );
+ TQTextStream stream( &file );
kdDebug() << "Codec = " << m_textCodec << endl;
if ( !m_textCodec )
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
stream.setCodec( m_textCodec );
- QString contents = stream.read();
+ TQString contents = stream.read();
file.close();
return contents;
}
-bool KompareModelList::openDiff( const QString& diffFile )
+bool KompareModelList::openDiff( const TQString& diffFile )
{
kdDebug(8101) << "Stupid :) Url = " << diffFile << endl;
if ( diffFile.isEmpty() )
return false;
- QString diff = readFile( diffFile );
+ TQString diff = readFile( diffFile );
clear(); // Clear the current models
@@ -557,9 +557,9 @@ bool KompareModelList::openDiff( const QString& diffFile )
return true;
}
-QString KompareModelList::recreateDiff() const
+TQString KompareModelList::recreateDiff() const
{
- QString diff;
+ TQString diff;
DiffModelListConstIterator modelIt = m_models->begin();
DiffModelListConstIterator mEnd = m_models->end();
@@ -571,7 +571,7 @@ QString KompareModelList::recreateDiff() const
return diff;
}
-bool KompareModelList::saveDiff( const QString& url, QString directory, DiffSettings* diffSettings )
+bool KompareModelList::saveDiff( const TQString& url, TQString directory, DiffSettings* diffSettings )
{
kdDebug() << "KompareModelList::saveDiff: " << endl;
@@ -589,8 +589,8 @@ bool KompareModelList::saveDiff( const QString& url, QString directory, DiffSett
m_diffProcess = new KompareProcess( diffSettings, Kompare::Custom, m_source, m_destination, directory );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotWriteDiffOutput( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotWriteDiffOutput( bool )) );
emit status( Kompare::RunningDiff );
return m_diffProcess->start();
@@ -602,7 +602,7 @@ void KompareModelList::slotWriteDiffOutput( bool success )
if( success )
{
- QTextStream* stream = m_diffTemp->textStream();
+ TQTextStream* stream = m_diffTemp->textStream();
*stream << m_diffProcess->diffOutput();
@@ -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 ), (QWidget*)parent() );
+ KIO::NetAccess::upload( m_diffTemp->name(), KURL( m_diffURL ), (TQWidget*)parent() );
emit status( Kompare::FinishedWritingDiff );
}
@@ -857,11 +857,11 @@ void KompareModelList::slotApplyAllDifferences( bool apply )
emit applyAllDifferences( apply );
}
-int KompareModelList::parseDiffOutput( const QString& diff )
+int KompareModelList::parseDiffOutput( const TQString& diff )
{
kdDebug(8101) << "KompareModelList::parseDiffOutput" << endl;
- QStringList diffLines = split( diff );
+ TQStringList diffLines = split( diff );
Parser* parser = new Parser( this );
m_models = parser->parse( diffLines );
@@ -888,30 +888,30 @@ int KompareModelList::parseDiffOutput( const QString& diff )
return 0;
}
-bool KompareModelList::blendOriginalIntoModelList( const QString& localURL )
+bool KompareModelList::blendOriginalIntoModelList( const TQString& localURL )
{
kdDebug() << "Hurrah we are blending..." << endl;
- QFileInfo fi( localURL );
+ TQFileInfo fi( localURL );
bool result = false;
DiffModel* model;
- QString fileContents;
+ TQString fileContents;
if ( fi.isDir() )
{ // is a dir
kdDebug() << "Blend Dir" << endl;
-// QDir dir( localURL, QString::null, QDir::Name|QDir::DirsFirst, QDir::All );
+// TQDir dir( localURL, TQString::null, TQDir::Name|TQDir::DirsFirst, TQDir::All );
DiffModelListIterator modelIt = m_models->begin();
DiffModelListIterator mEnd = m_models->end();
for ( ; modelIt != mEnd; ++modelIt )
{
model = *modelIt;
kdDebug(8101) << "Model : " << model << endl;
- QString filename = model->sourcePath() + model->sourceFile();
+ TQString filename = model->sourcePath() + model->sourceFile();
if ( !filename.startsWith( localURL ) )
filename.prepend( localURL );
- QFileInfo fi2( filename );
+ TQFileInfo fi2( filename );
if ( fi2.exists() )
{
kdDebug(8101) << "Reading from: " << filename << endl;
@@ -941,7 +941,7 @@ bool KompareModelList::blendOriginalIntoModelList( const QString& localURL )
return result;
}
-bool KompareModelList::blendFile( DiffModel* model, const QString& fileContents )
+bool KompareModelList::blendFile( DiffModel* model, const TQString& fileContents )
{
if ( !model )
{
@@ -953,10 +953,10 @@ bool KompareModelList::blendFile( DiffModel* model, const QString& fileContents
int srcLineNo = 1, destLineNo = 1;
- QStringList lines = split( fileContents );
+ TQStringList lines = split( fileContents );
- QStringList::ConstIterator linesIt = lines.begin();
- QStringList::ConstIterator lEnd = lines.end();
+ TQStringList::ConstIterator linesIt = lines.begin();
+ TQStringList::ConstIterator lEnd = lines.end();
DiffHunkList* hunks = model->hunks();
kdDebug(8101) << "Hunks in hunklist: " << hunks->count() << endl;
@@ -1191,8 +1191,8 @@ void KompareModelList::clear()
void KompareModelList::swap()
{
- QString source = m_source;
- QString destination = m_destination;
+ TQString source = m_source;
+ TQString destination = m_destination;
if ( m_info.mode == Kompare::ComparingFiles )
compareFiles( destination, source );
else if ( m_info.mode == Kompare::ComparingDirs )
diff --git a/kompare/libdiff2/komparemodellist.h b/kompare/libdiff2/komparemodellist.h
index 8ba264fb..d1f834ae 100644
--- a/kompare/libdiff2/komparemodellist.h
+++ b/kompare/libdiff2/komparemodellist.h
@@ -20,7 +20,7 @@
#ifndef KOMPAREMODELLIST_H
#define KOMPAREMODELLIST_H
-#include <qobject.h>
+#include <tqobject.h>
#include "diffmodel.h"
#include "diffmodellist.h"
@@ -42,7 +42,7 @@ class KompareModelList : public QObject
{
Q_OBJECT
public:
- KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, QObject* parent = 0, const char* name = 0 );
+ KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent = 0, const char* name = 0 );
~KompareModelList();
public:
@@ -50,34 +50,34 @@ public:
void swap();
/* Comparing methods */
- bool compare( const QString& source, const QString& destination );
+ bool compare( const TQString& source, const TQString& destination );
- bool compareFiles( const QString& source, const QString& destination );
- bool compareDirs( const QString& source, const QString& destination );
+ bool compareFiles( const TQString& source, const TQString& destination );
+ bool compareDirs( const TQString& source, const TQString& destination );
- bool openDiff( const QString& diff );
+ bool openDiff( const TQString& diff );
- bool openFileAndDiff( const QString& file, const QString& diff );
- bool openDirAndDiff( const QString& dir, const QString& diff );
+ bool openFileAndDiff( const TQString& file, const TQString& diff );
+ bool openDirAndDiff( const TQString& dir, const TQString& diff );
- bool saveDiff( const QString& url, QString directory, DiffSettings* diffSettings );
+ bool saveDiff( const TQString& url, TQString directory, DiffSettings* diffSettings );
bool saveAll();
bool saveDestination( DiffModel* model );
- void setEncoding( const QString& encoding );
+ void setEncoding( const TQString& encoding );
- QString recreateDiff() const;
+ TQString recreateDiff() const;
// This parses the difflines and creates new models
- int parseDiffOutput( const QString& diff );
+ int parseDiffOutput( const TQString& diff );
// Call this to emit the signals to the rest of the "world" to show the diff
void show();
// This will blend the original URL (dir or file) into the diffmodel,
// this is like patching but with a twist
- bool blendOriginalIntoModelList( const QString& localURL );
+ bool blendOriginalIntoModelList( const TQString& localURL );
enum Kompare::Mode mode() const { return m_info.mode; };
const DiffModelList* models() const { return m_models; };
@@ -110,12 +110,12 @@ private:
void updateModelListActions();
protected:
- bool blendFile( DiffModel* model, const QString& lines );
+ bool blendFile( DiffModel* model, const TQString& lines );
signals:
void status( Kompare::Status status );
void setStatusBarModelInfo( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
- void error( QString error );
+ void error( TQString error );
void modelsChanged( const Diff2::DiffModelList* models );
void setSelection( const Diff2::DiffModel* model, const Diff2::Difference* diff );
void setSelection( const Diff2::Difference* diff );
@@ -154,24 +154,24 @@ protected slots:
void slotSaveDestination();
private slots:
- void slotDirectoryChanged( const QString& );
- void slotFileChanged( const QString& );
+ void slotDirectoryChanged( const TQString& );
+ void slotFileChanged( const TQString& );
private: // Helper methods
- bool isDirectory( const QString& url ) const;
- bool isDiff( const QString& mimetype ) const;
- QString readFile( const QString& fileName );
+ bool isDirectory( const TQString& url ) const;
+ bool isDiff( const TQString& mimetype ) const;
+ TQString readFile( const TQString& fileName );
bool hasPrevModel() const;
bool hasNextModel() const;
bool hasPrevDiff() const;
bool hasNextDiff() const;
- QStringList split( const QString& diff );
+ TQStringList split( const TQString& diff );
private:
KTempFile* m_diffTemp;
- QString m_diffURL;
+ TQString m_diffURL;
KompareProcess* m_diffProcess;
@@ -179,8 +179,8 @@ private:
DiffModelList* m_models;
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
DiffModel* m_selectedModel;
Difference* m_selectedDifference;
@@ -204,8 +204,8 @@ private:
KAction* m_save;
- QString m_encoding;
- QTextCodec* m_textCodec;
+ TQString m_encoding;
+ TQTextCodec* m_textCodec;
};
} // End of namespace Diff2
diff --git a/kompare/libdiff2/kompareprocess.cpp b/kompare/libdiff2/kompareprocess.cpp
index 2d5eac00..db165ae5 100644
--- a/kompare/libdiff2/kompareprocess.cpp
+++ b/kompare/libdiff2/kompareprocess.cpp
@@ -19,9 +19,9 @@
**
***************************************************************************/
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kdebug.h>
@@ -30,7 +30,7 @@
#include "diffsettings.h"
#include "kompareprocess.h"
-KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, QString source, QString destination, QString dir )
+KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString dir )
: KProcess(),
m_diffSettings( diffSettings ),
m_mode( mode ),
@@ -39,14 +39,14 @@ KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMo
setUseShell( true );
// connect the stdout and stderr signals
- connect( this, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- SLOT ( slotReceivedStdout( KProcess*, char*, int ) ) );
- connect( this, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- SLOT ( slotReceivedStderr( KProcess*, char*, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ TQT_SLOT ( slotReceivedStdout( KProcess*, char*, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ TQT_SLOT ( slotReceivedStderr( KProcess*, char*, int ) ) );
// connect the signal that indicates that the proces has exited
- connect( this, SIGNAL( processExited( KProcess* ) ),
- SLOT ( slotProcessExited( KProcess* ) ) );
+ connect( this, TQT_SIGNAL( processExited( KProcess* ) ),
+ TQT_SLOT ( slotProcessExited( KProcess* ) ) );
*this << "LANG=C";
@@ -61,7 +61,7 @@ KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMo
}
if( !dir.isEmpty() ) {
- QDir::setCurrent( dir );
+ TQDir::setCurrent( dir );
}
// Write file names
@@ -81,7 +81,7 @@ void KompareProcess::writeDefaultCommandLine()
*this << m_diffSettings->m_diffProgram << "-dr";
}
- *this << "-U" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-U" << TQString::number( m_diffSettings->m_linesOfContext );
}
void KompareProcess::writeCommandLine()
@@ -100,10 +100,10 @@ void KompareProcess::writeCommandLine()
switch( m_diffSettings->m_format ) {
case Kompare::Unified :
- *this << "-U" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-U" << TQString::number( m_diffSettings->m_linesOfContext );
break;
case Kompare::Context :
- *this << "-C" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-C" << TQString::number( m_diffSettings->m_linesOfContext );
break;
case Kompare::RCS :
*this << "-n";
@@ -188,8 +188,8 @@ void KompareProcess::writeCommandLine()
if ( m_diffSettings->m_excludeFilePattern )
{
- QStringList::ConstIterator it = m_diffSettings->m_excludeFilePatternList.begin();
- QStringList::ConstIterator end = m_diffSettings->m_excludeFilePatternList.end();
+ TQStringList::ConstIterator it = m_diffSettings->m_excludeFilePatternList.begin();
+ TQStringList::ConstIterator end = m_diffSettings->m_excludeFilePatternList.end();
for ( ; it != end; ++it )
{
*this << "-x" << KProcess::quote( *it );
@@ -206,21 +206,21 @@ KompareProcess::~KompareProcess()
{
}
-void KompareProcess::setEncoding( const QString& encoding )
+void KompareProcess::setEncoding( const TQString& encoding )
{
if ( encoding.lower() == "default" )
{
- m_textDecoder = QTextCodec::codecForLocale()->makeDecoder();
+ m_textDecoder = TQTextCodec::codecForLocale()->makeDecoder();
}
else
{
- QTextCodec* textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
+ TQTextCodec* textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
if ( textCodec )
m_textDecoder = textCodec->makeDecoder();
else
{
kdDebug(8101) << "Using locale codec as backup..." << endl;
- textCodec = QTextCodec::codecForLocale();
+ textCodec = TQTextCodec::codecForLocale();
m_textDecoder = textCodec->makeDecoder();
}
}
@@ -247,8 +247,8 @@ void KompareProcess::slotReceivedStderr( KProcess* /* process */, char* buffer,
bool KompareProcess::start()
{
#ifndef NDEBUG
- QString cmdLine;
- QValueList<QCString>::ConstIterator it = arguments.begin();
+ TQString cmdLine;
+ TQValueList<TQCString>::ConstIterator it = arguments.begin();
for (; it != arguments.end(); ++it )
cmdLine += "\"" + (*it) + "\" ";
kdDebug(8101) << cmdLine << endl;
diff --git a/kompare/libdiff2/kompareprocess.h b/kompare/libdiff2/kompareprocess.h
index 06a4a5ce..a2d2e92b 100644
--- a/kompare/libdiff2/kompareprocess.h
+++ b/kompare/libdiff2/kompareprocess.h
@@ -33,16 +33,16 @@ class KompareProcess : public KProcess, public KompareFunctions
Q_OBJECT
public:
- KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, QString source, QString destination, QString directory = QString::null );
+ KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString directory = TQString::null );
~KompareProcess();
bool start();
- QString diffOutput() { return m_stdout; }
- QString stdOut() { return m_stdout; }
- QString stdErr() { return m_stderr; }
+ TQString diffOutput() { return m_stdout; }
+ TQString stdOut() { return m_stdout; }
+ TQString stdErr() { return m_stderr; }
- void setEncoding( const QString& encoding );
+ void setEncoding( const TQString& encoding );
signals:
void diffHasFinished( bool finishedNormally );
@@ -59,9 +59,9 @@ protected slots:
private:
DiffSettings* m_diffSettings;
enum Kompare::DiffMode m_mode;
- QString m_stdout;
- QString m_stderr;
- QTextDecoder* m_textDecoder;
+ TQString m_stdout;
+ TQString m_stderr;
+ TQTextDecoder* m_textDecoder;
};
#endif
diff --git a/kompare/libdiff2/levenshteintable.cpp b/kompare/libdiff2/levenshteintable.cpp
index 54525aef..7e4ddbbe 100644
--- a/kompare/libdiff2/levenshteintable.cpp
+++ b/kompare/libdiff2/levenshteintable.cpp
@@ -18,7 +18,7 @@
#include <iostream>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -107,14 +107,14 @@ unsigned int LevenshteinTable::createTable( DifferenceString* source, Difference
m_source = source;
m_destination = destination;
- QString s = ' ' + source->string(); // Optimization, so i dont have to subtract 1 from the indexes every
- QString d = ' ' + destination->string(); // single time and add 1 to the width and height of the table
+ TQString s = ' ' + source->string(); // Optimization, so i dont have to subtract 1 from the indexes every
+ TQString d = ' ' + destination->string(); // single time and add 1 to the width and height of the table
unsigned int m = s.length();
unsigned int n = d.length();
- const QChar* sq = s.unicode();
- const QChar* dq = d.unicode();
+ const TQChar* sq = s.unicode();
+ const TQChar* dq = d.unicode();
if ( m == 1 )
return --n;
@@ -201,7 +201,7 @@ void LevenshteinTable::createListsOfMarkers()
{
case 0: // north
// kdDebug(8101) << "Picking north" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_destination->markerList().isEmpty() )
c = m_destination->markerList().first();
@@ -226,7 +226,7 @@ void LevenshteinTable::createListsOfMarkers()
break;
case 1: // northwest
// kdDebug(8101) << "Picking northwest" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_destination->markerList().isEmpty() )
c = m_destination->markerList().first();
@@ -271,7 +271,7 @@ void LevenshteinTable::createListsOfMarkers()
break;
case 2: // west
// kdDebug(8101) << "Picking west" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_source->markerList().isEmpty() )
c = m_source->markerList().first();
@@ -299,7 +299,7 @@ void LevenshteinTable::createListsOfMarkers()
// kdDebug(8101) << "Source string: " << m_source->string() << endl;
// c = m_source->markerList()->first();
-// QStringList list;
+// TQStringList list;
// unsigned int prevValue = 0;
// for ( ; c; c = m_source->markerList()->next() )
// {
diff --git a/kompare/libdiff2/parser.cpp b/kompare/libdiff2/parser.cpp
index 04ff7a4a..1e3efc8a 100644
--- a/kompare/libdiff2/parser.cpp
+++ b/kompare/libdiff2/parser.cpp
@@ -34,13 +34,13 @@ Parser::~Parser()
{
}
-int Parser::cleanUpCrap( QStringList& diffLines )
+int Parser::cleanUpCrap( TQStringList& diffLines )
{
- QStringList::Iterator it = diffLines.begin();
+ TQStringList::Iterator it = diffLines.begin();
int nol = 0;
- QString noNewLine( "\\ No newline" );
+ TQString noNewLine( "\\ No newline" );
for ( ; it != diffLines.end(); ++it )
{
@@ -49,7 +49,7 @@ int Parser::cleanUpCrap( QStringList& diffLines )
it = diffLines.remove( it );
// correcting the advance of the iterator because of the remove
--it;
- QString temp( *it );
+ TQString temp( *it );
temp.truncate( temp.find( '\n' ) );
*it = temp;
++nol;
@@ -59,7 +59,7 @@ int Parser::cleanUpCrap( QStringList& diffLines )
return nol;
}
-DiffModelList* Parser::parse( QStringList& diffLines )
+DiffModelList* Parser::parse( TQStringList& diffLines )
{
/* Basically determine the generator then call the parse method */
ParserBase* parser;
@@ -107,14 +107,14 @@ DiffModelList* Parser::parse( QStringList& diffLines )
return modelList;
}
-enum Kompare::Generator Parser::determineGenerator( const QStringList& diffLines )
+enum Kompare::Generator Parser::determineGenerator( const TQStringList& diffLines )
{
// Shit have to duplicate some code with this method and the ParserBase derived classes
- QString cvsDiff ( "Index: " );
- QString perforceDiff( "==== " );
+ TQString cvsDiff ( "Index: " );
+ TQString perforceDiff( "==== " );
- QStringList::ConstIterator it = diffLines.begin();
- QStringList::ConstIterator linesEnd = diffLines.end();
+ TQStringList::ConstIterator it = diffLines.begin();
+ TQStringList::ConstIterator linesEnd = diffLines.end();
while ( it != linesEnd )
{
diff --git a/kompare/libdiff2/parser.h b/kompare/libdiff2/parser.h
index 0ffae23a..b3dd16ee 100644
--- a/kompare/libdiff2/parser.h
+++ b/kompare/libdiff2/parser.h
@@ -34,16 +34,16 @@ public:
~Parser();
public:
- DiffModelList* parse( QStringList& diffLines );
+ DiffModelList* parse( TQStringList& diffLines );
enum Kompare::Generator generator() const { return m_generator; };
enum Kompare::Format format() const { return m_format; };
private:
/** Which program was used to generate the output */
- enum Kompare::Generator determineGenerator( const QStringList& diffLines );
+ enum Kompare::Generator determineGenerator( const TQStringList& diffLines );
- int cleanUpCrap( QStringList& diffLines );
+ int cleanUpCrap( TQStringList& diffLines );
private:
enum Kompare::Generator m_generator;
diff --git a/kompare/libdiff2/parserbase.cpp b/kompare/libdiff2/parserbase.cpp
index 303f7b22..ca19d232 100644
--- a/kompare/libdiff2/parserbase.cpp
+++ b/kompare/libdiff2/parserbase.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
@@ -28,7 +28,7 @@
using namespace Diff2;
-ParserBase::ParserBase( const KompareModelList* list, const QStringList& diff ) :
+ParserBase::ParserBase( const KompareModelList* list, const TQStringList& diff ) :
m_diffLines( diff ),
m_currentModel( 0 ),
m_models( 0 ),
@@ -122,7 +122,7 @@ bool ParserBase::parseContextDiffHeader()
// kdDebug(8101) << "Matched string Header2 = " << m_contextDiffHeader2.cap( 0 ) << endl;
m_currentModel = new DiffModel( m_contextDiffHeader1.cap( 1 ), m_contextDiffHeader2.cap( 1 ) );
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceTimestamp ( m_contextDiffHeader1.cap( 2 ) );
m_currentModel->setSourceRevision ( m_contextDiffHeader1.cap( 4 ) );
m_currentModel->setDestinationTimestamp( m_contextDiffHeader2.cap( 2 ) );
@@ -164,7 +164,7 @@ bool ParserBase::parseNormalDiffHeader()
// kdDebug(8101) << "Matched string Header = " << m_normalDiffHeader.cap( 0 ) << endl;
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceFile ( m_normalDiffHeader.cap( 1 ) );
m_currentModel->setDestinationFile ( m_normalDiffHeader.cap( 2 ) );
@@ -185,7 +185,7 @@ bool ParserBase::parseNormalDiffHeader()
// Set this to the first line again and hope it is a single file diff
m_diffIterator = m_diffLines.begin();
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_singleFileDiff = true;
}
@@ -215,7 +215,7 @@ bool ParserBase::parseUnifiedDiffHeader()
if ( m_diffIterator != m_diffLines.end() && m_unifiedDiffHeader2.exactMatch( *m_diffIterator ) )
{
m_currentModel = new DiffModel( m_unifiedDiffHeader1.cap( 1 ), m_unifiedDiffHeader2.cap( 1 ) );
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceTimestamp( m_unifiedDiffHeader1.cap( 2 ) );
m_currentModel->setSourceRevision( m_unifiedDiffHeader1.cap( 4 ) );
m_currentModel->setDestinationTimestamp( m_unifiedDiffHeader2.cap( 2 ) );
@@ -319,7 +319,7 @@ bool ParserBase::parseContextHunkBody()
// kdDebug(8101) << "ParserBase::parseContextHunkBody()" << endl;
// Storing the src part of the hunk for later use
- QStringList oldLines;
+ TQStringList oldLines;
for( ; m_diffIterator != m_diffLines.end() && m_contextHunkBodyLine.exactMatch( *m_diffIterator ); ++m_diffIterator ) {
// kdDebug(8101) << "Added old line: " << *m_diffIterator << endl;
oldLines.append( *m_diffIterator );
@@ -331,13 +331,13 @@ bool ParserBase::parseContextHunkBody()
++m_diffIterator;
// Storing the dest part of the hunk for later use
- QStringList newLines;
+ TQStringList newLines;
for( ; m_diffIterator != m_diffLines.end() && m_contextHunkBodyLine.exactMatch( *m_diffIterator ); ++m_diffIterator ) {
// kdDebug(8101) << "Added new line: " << *m_diffIterator << endl;
newLines.append( *m_diffIterator );
}
- QString function = m_contextHunkHeader1.cap( 1 );
+ TQString function = m_contextHunkHeader1.cap( 1 );
// kdDebug(8101) << "Captured function: " << function << endl;
int linenoA = m_contextHunkHeader2.cap( 1 ).toInt();
// kdDebug(8101) << "Source line number: " << linenoA << endl;
@@ -348,8 +348,8 @@ bool ParserBase::parseContextHunkBody()
m_currentModel->addHunk( hunk );
- QStringList::Iterator oldIt = oldLines.begin();
- QStringList::Iterator newIt = newLines.begin();
+ TQStringList::Iterator oldIt = oldLines.begin();
+ TQStringList::Iterator newIt = newLines.begin();
Difference* diff;
while( oldIt != oldLines.end() || newIt != newLines.end() )
@@ -396,7 +396,7 @@ bool ParserBase::parseContextHunkBody()
( newIt == newLines.end() || m_contextHunkBodyContext.exactMatch( *newIt ) ) &&
( oldIt != oldLines.end() || newIt != newLines.end() ) )
{
- QString l;
+ TQString l;
if( oldIt != oldLines.end() )
{
l = m_contextHunkBodyContext.cap( 1 );
@@ -456,7 +456,7 @@ bool ParserBase::parseNormalHunkBody()
{
// kdDebug(8101) << "ParserBase::parseNormalHunkBody" << endl;
- QString type = QString::null;
+ TQString type = TQString::null;
int linenoA = 0, linenoB = 0;
@@ -513,13 +513,13 @@ bool ParserBase::parseRCSHunkBody()
return false;
}
-bool ParserBase::matchesUnifiedHunkLine( QString line ) const
+bool ParserBase::matchesUnifiedHunkLine( TQString line ) const
{
- static const QChar context( ' ' );
- static const QChar added ( '+' );
- static const QChar removed( '-' );
+ static const TQChar context( ' ' );
+ static const TQChar added ( '+' );
+ static const TQChar removed( '-' );
- QChar first = line[0];
+ TQChar first = line[0];
return ( first == context || first == added || first == removed );
}
@@ -547,7 +547,7 @@ bool ParserBase::parseUnifiedHunkBody()
return false;
linenoB++;
}
- QString function = m_unifiedHunkHeader.cap( 7 );
+ TQString function = m_unifiedHunkHeader.cap( 7 );
for ( int i = 0; i < 9; i++ )
{
// kdDebug(8101) << "Capture " << i << ": " << m_unifiedHunkHeader.cap( i ) << endl;
@@ -556,11 +556,11 @@ bool ParserBase::parseUnifiedHunkBody()
DiffHunk* hunk = new DiffHunk( linenoA, linenoB, function );
m_currentModel->addHunk( hunk );
- const QStringList::ConstIterator m_diffLinesEnd = m_diffLines.end();
+ const TQStringList::ConstIterator m_diffLinesEnd = m_diffLines.end();
- const QString context = QString( " " );
- const QString added = QString( "+" );
- const QString removed = QString( "-" );
+ const TQString context = TQString( " " );
+ const TQString added = TQString( "+" );
+ const TQString removed = TQString( "-" );
while( m_diffIterator != m_diffLinesEnd && matchesUnifiedHunkLine( *m_diffIterator ) )
{
@@ -571,8 +571,8 @@ bool ParserBase::parseUnifiedHunkBody()
{ // context
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( context ); ++m_diffIterator )
{
- diff->addSourceLine( QString( *m_diffIterator ).remove( 0, 1 ) );
- diff->addDestinationLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addSourceLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addDestinationLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoA++;
linenoB++;
}
@@ -581,12 +581,12 @@ bool ParserBase::parseUnifiedHunkBody()
{ // This is a real difference, not context
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( removed ); ++m_diffIterator )
{
- diff->addSourceLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addSourceLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoA++;
}
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( added ); ++m_diffIterator )
{
- diff->addDestinationLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addDestinationLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoB++;
}
if ( diff->sourceLineCount() == 0 )
diff --git a/kompare/libdiff2/parserbase.h b/kompare/libdiff2/parserbase.h
index 5e08803e..e8d5eec4 100644
--- a/kompare/libdiff2/parserbase.h
+++ b/kompare/libdiff2/parserbase.h
@@ -18,7 +18,7 @@
#ifndef _DIFF2_PARSERBASE_H
#define _DIFF2_PARSERBASE_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include "kompare.h"
#include "difference.h"
@@ -35,7 +35,7 @@ class KompareModelList;
class ParserBase
{
public:
- ParserBase( const KompareModelList* list, const QStringList& diff );
+ ParserBase( const KompareModelList* list, const TQStringList& diff );
virtual ~ParserBase();
public:
@@ -68,7 +68,7 @@ protected:
virtual DiffModelList* parseUnified();
protected: // Helper methods to speed things up
- bool matchesUnifiedHunkLine( QString line ) const;
+ bool matchesUnifiedHunkLine( TQString line ) const;
protected:
/** What is format of the diff */
@@ -76,51 +76,51 @@ protected:
protected:
// Regexps for context parsing
- QRegExp m_contextDiffHeader1;
- QRegExp m_contextDiffHeader2;
+ TQRegExp m_contextDiffHeader1;
+ TQRegExp m_contextDiffHeader2;
- QRegExp m_contextHunkHeader1;
- QRegExp m_contextHunkHeader2;
- QRegExp m_contextHunkHeader3;
+ TQRegExp m_contextHunkHeader1;
+ TQRegExp m_contextHunkHeader2;
+ TQRegExp m_contextHunkHeader3;
- QRegExp m_contextHunkBodyRemoved;
- QRegExp m_contextHunkBodyAdded;
- QRegExp m_contextHunkBodyChanged;
- QRegExp m_contextHunkBodyContext;
- QRegExp m_contextHunkBodyLine; // Added for convenience
+ TQRegExp m_contextHunkBodyRemoved;
+ TQRegExp m_contextHunkBodyAdded;
+ TQRegExp m_contextHunkBodyChanged;
+ TQRegExp m_contextHunkBodyContext;
+ TQRegExp m_contextHunkBodyLine; // Added for convenience
// Regexps for normal parsing
- QRegExp m_normalDiffHeader;
+ TQRegExp m_normalDiffHeader;
- QRegExp m_normalHunkHeaderAdded;
- QRegExp m_normalHunkHeaderRemoved;
- QRegExp m_normalHunkHeaderChanged;
+ TQRegExp m_normalHunkHeaderAdded;
+ TQRegExp m_normalHunkHeaderRemoved;
+ TQRegExp m_normalHunkHeaderChanged;
- QRegExp m_normalHunkBodyRemoved;
- QRegExp m_normalHunkBodyAdded;
- QRegExp m_normalHunkBodyDivider;
+ TQRegExp m_normalHunkBodyRemoved;
+ TQRegExp m_normalHunkBodyAdded;
+ TQRegExp m_normalHunkBodyDivider;
enum Difference::Type m_normalDiffType;
// RegExps for rcs parsing
- QRegExp m_rcsDiffHeader;
+ TQRegExp m_rcsDiffHeader;
// Regexps for unified parsing
- QRegExp m_unifiedDiffHeader1;
- QRegExp m_unifiedDiffHeader2;
+ TQRegExp m_unifiedDiffHeader1;
+ TQRegExp m_unifiedDiffHeader2;
- QRegExp m_unifiedHunkHeader;
+ TQRegExp m_unifiedHunkHeader;
- QRegExp m_unifiedHunkBodyAdded;
- QRegExp m_unifiedHunkBodyRemoved;
- QRegExp m_unifiedHunkBodyContext;
- QRegExp m_unifiedHunkBodyLine; // Added for convenience
+ TQRegExp m_unifiedHunkBodyAdded;
+ TQRegExp m_unifiedHunkBodyRemoved;
+ TQRegExp m_unifiedHunkBodyContext;
+ TQRegExp m_unifiedHunkBodyLine; // Added for convenience
protected:
- const QStringList& m_diffLines;
+ const TQStringList& m_diffLines;
DiffModel* m_currentModel;
DiffModelList* m_models;
- QStringList::ConstIterator m_diffIterator;
+ TQStringList::ConstIterator m_diffIterator;
bool m_singleFileDiff;
diff --git a/kompare/libdiff2/perforceparser.cpp b/kompare/libdiff2/perforceparser.cpp
index 907d88ff..0e0a2aef 100644
--- a/kompare/libdiff2/perforceparser.cpp
+++ b/kompare/libdiff2/perforceparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -23,7 +23,7 @@
using namespace Diff2;
-PerforceParser::PerforceParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+PerforceParser::PerforceParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
m_contextDiffHeader1.setPattern( "==== (.*) - (.*) ====\\n" );
m_contextDiffHeader1.setMinimal( true );
@@ -43,13 +43,13 @@ enum Kompare::Format PerforceParser::determineFormat()
{
kdDebug(8101) << "Determining the format of the Perforce Diff" << endl;
- QRegExp unifiedRE( "^@@" );
- QRegExp contextRE( "^\\*{15}" );
- QRegExp normalRE ( "^\\d+(|,\\d+)[acd]\\d+(|,\\d+)" );
- QRegExp rcsRE ( "^[acd]\\d+ \\d+" );
+ TQRegExp unifiedRE( "^@@" );
+ TQRegExp contextRE( "^\\*{15}" );
+ TQRegExp normalRE ( "^\\d+(|,\\d+)[acd]\\d+(|,\\d+)" );
+ TQRegExp rcsRE ( "^[acd]\\d+ \\d+" );
// Summary is not supported since it gives no useful parsable info
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
@@ -84,10 +84,10 @@ bool PerforceParser::parseContextDiffHeader()
// kdDebug(8101) << "ParserBase::parseContextDiffHeader()" << endl;
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
@@ -128,10 +128,10 @@ bool PerforceParser::parseNormalDiffHeader()
{
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
@@ -179,10 +179,10 @@ bool PerforceParser::parseUnifiedDiffHeader()
{
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
diff --git a/kompare/libdiff2/perforceparser.h b/kompare/libdiff2/perforceparser.h
index 99973167..9db8d5e1 100644
--- a/kompare/libdiff2/perforceparser.h
+++ b/kompare/libdiff2/perforceparser.h
@@ -26,7 +26,7 @@ namespace Diff2
class PerforceParser : public ParserBase
{
public:
- PerforceParser( const KompareModelList* list, const QStringList& diff );
+ PerforceParser( const KompareModelList* list, const TQStringList& diff );
virtual ~PerforceParser();
protected: