From d6331f1b56eb6dca7a1950658b2932f208015da0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:50:38 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kompare/libdiff2/difference.h | 2 +- kompare/libdiff2/diffhunk.cpp | 12 ++++++------ kompare/libdiff2/diffmodel.cpp | 8 ++++---- kompare/libdiff2/komparemodellist.cpp | 14 +++++++------- kompare/libdiff2/kompareprocess.cpp | 2 +- kompare/libdiff2/levenshteintable.cpp | 4 ++-- kompare/libdiff2/perforceparser.cpp | 18 +++++++++--------- 7 files changed, 30 insertions(+), 30 deletions(-) (limited to 'kompare/libdiff2') diff --git a/kompare/libdiff2/difference.h b/kompare/libdiff2/difference.h index 4e440222..87b8f556 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( m_string.tqunicode() ); + unsigned short const* str = reinterpret_cast( m_string.unicode() ); const unsigned int len = m_string.length(); m_hash = 1315423911; diff --git a/kompare/libdiff2/diffhunk.cpp b/kompare/libdiff2/diffhunk.cpp index efa7e12d..3b48d796 100644 --- a/kompare/libdiff2/diffhunk.cpp +++ b/kompare/libdiff2/diffhunk.cpp @@ -97,16 +97,16 @@ TQString DiffHunk::recreateHunk() const } // recreate header - hunk += TQString::tqfromLatin1( "@@ -%1,%3 +%2,%4 @@" ) - .tqarg( m_sourceLine ) - .tqarg( m_destinationLine ) - .tqarg( slc ) - .tqarg( dlc ); + hunk += TQString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" ) + .arg( m_sourceLine ) + .arg( m_destinationLine ) + .arg( slc ) + .arg( dlc ); if ( !m_function.isEmpty() ) hunk += " " + m_function; - hunk += TQString::tqfromLatin1( "\n" ); + hunk += TQString::fromLatin1( "\n" ); hunk += differences; diff --git a/kompare/libdiff2/diffmodel.cpp b/kompare/libdiff2/diffmodel.cpp index cd348dfc..1b3822b0 100644 --- a/kompare/libdiff2/diffmodel.cpp +++ b/kompare/libdiff2/diffmodel.cpp @@ -152,13 +152,13 @@ TQString DiffModel::recreateDiff() const TQString diff; // recreate header - TQString tab = TQString::tqfromLatin1( "\t" ); - TQString nl = TQString::tqfromLatin1( "\n" ); - diff += TQString::tqfromLatin1( "--- %1\t%2" ).tqarg( m_source ).tqarg( 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 += TQString::tqfromLatin1( "+++ %1\t%2" ).tqarg( m_destination ).tqarg( m_destinationTimestamp ); + diff += TQString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp ); if ( !m_destinationRevision.isEmpty() ) diff += tab + m_destinationRevision; diff += nl; diff --git a/kompare/libdiff2/komparemodellist.cpp b/kompare/libdiff2/komparemodellist.cpp index 89912eac..fc27fb56 100644 --- a/kompare/libdiff2/komparemodellist.cpp +++ b/kompare/libdiff2/komparemodellist.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -235,7 +235,7 @@ bool KompareModelList::openFileAndDiff( const TQString& file, const TQString& di if ( parseDiffOutput( readFile( diff ) ) != 0 ) { - emit error( i18n( "No models or no differences, this file: %1, is not a valid diff file." ).tqarg( diff ) ); + emit error( i18n( "No models or no differences, this file: %1, is not a valid diff file." ).arg( 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( "There were problems applying the diff %1 to the file %2." ).tqarg( diff ).tqarg( file ) ); + emit( i18n( "There were problems applying the diff %1 to the file %2." ).arg( diff ).arg( file ) ); return false; } @@ -259,7 +259,7 @@ bool KompareModelList::openDirAndDiff( const TQString& dir, const TQString& diff if ( parseDiffOutput( readFile( diff ) ) != 0 ) { - emit error( i18n( "No models or no differences, this file: %1, is not a valid diff file." ).tqarg( diff ) ); + emit error( i18n( "No models or no differences, this file: %1, is not a valid diff file." ).arg( 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( "There were problems applying the diff %1 to the folder %2." ).tqarg( diff ).tqarg( dir ) ); + emit error( i18n( "There were problems applying the diff %1 to the folder %2." ).arg( diff ).arg( dir ) ); return false; } @@ -347,7 +347,7 @@ bool KompareModelList::saveDestination( DiffModel* model ) temp->close(); if( temp->status() != 0 ) { - emit error( i18n( "Could not write to the temporary file %1, deleting it." ).tqarg( temp->name() ) ); + emit error( i18n( "Could not write to the temporary file %1, deleting it." ).arg( temp->name() ) ); temp->unlink(); delete temp; return false; @@ -380,7 +380,7 @@ bool KompareModelList::saveDestination( DiffModel* model ) if ( !result ) { - emit error( i18n( "Could not upload the temporary file to the destination location %1. The temporary file is still available under: %2. You can manually copy it to the right place." ).tqarg( m_destination ).tqarg( temp->name() ) ); + emit error( i18n( "Could not upload the temporary file to the destination location %1. The temporary file is still available under: %2. You can manually copy it to the right place." ).arg( m_destination ).arg( temp->name() ) ); } else { diff --git a/kompare/libdiff2/kompareprocess.cpp b/kompare/libdiff2/kompareprocess.cpp index db165ae5..df1c5b14 100644 --- a/kompare/libdiff2/kompareprocess.cpp +++ b/kompare/libdiff2/kompareprocess.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/kompare/libdiff2/levenshteintable.cpp b/kompare/libdiff2/levenshteintable.cpp index c031ee61..7e4ddbbe 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.tqunicode(); - const TQChar* dq = d.tqunicode(); + const TQChar* sq = s.unicode(); + const TQChar* dq = d.unicode(); if ( m == 1 ) return --n; diff --git a/kompare/libdiff2/perforceparser.cpp b/kompare/libdiff2/perforceparser.cpp index b0d54157..0e0a2aef 100644 --- a/kompare/libdiff2/perforceparser.cpp +++ b/kompare/libdiff2/perforceparser.cpp @@ -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.tqcapturedTexts() << endl; - kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << 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.tqcapturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << m_contextDiffHeader1.capturedTexts() << 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.tqcapturedTexts() << endl; - kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << 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.tqcapturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << m_normalDiffHeader.capturedTexts() << 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.tqcapturedTexts() << endl; -// kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl; +// kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl; +// kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << 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.tqcapturedTexts() << endl; +// kdDebug(8101) << "Captured texts = " << m_unifiedDiffHeader1.capturedTexts() << endl; } } -- cgit v1.2.3