diff options
Diffstat (limited to 'kompare/libdiff2/parserbase.cpp')
-rw-r--r-- | kompare/libdiff2/parserbase.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
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 ) |