From 87a016680e3677da3993f333561e79eb0cead7d5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 29 Jun 2011 16:05:55 +0000 Subject: TQt4 port ktechlab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/languages/gplib.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/languages/gplib.cpp') diff --git a/src/languages/gplib.cpp b/src/languages/gplib.cpp index db4a32b..46e6a76 100644 --- a/src/languages/gplib.cpp +++ b/src/languages/gplib.cpp @@ -16,8 +16,8 @@ #include #include -Gplib::Gplib( ProcessChain *processChain, KTechlab * parent ) - : ExternalLanguage( processChain, parent, "Gpasm" ) +Gplib::Gplib( ProcessChain *processChain, KTechlab * tqparent ) + : ExternalLanguage( processChain, tqparent, "Gpasm" ) { m_successfulMessage = i18n("*** Archiving successful ***"); m_failedMessage = i18n("*** Archiving failed ***"); @@ -39,9 +39,9 @@ void Gplib::processInput( ProcessOptions options ) *m_languageProcess << ( options.intermediaryOutput() ); - const QStringList inputFiles = options.inputFiles(); - QStringList::const_iterator end = inputFiles.end(); - for ( QStringList::const_iterator it = inputFiles.begin(); it != end; ++it ) + const TQStringList inputFiles = options.inputFiles(); + TQStringList::const_iterator end = inputFiles.end(); + for ( TQStringList::const_iterator it = inputFiles.begin(); it != end; ++it ) *m_languageProcess << ( *it ); if ( !start() ) @@ -53,39 +53,39 @@ void Gplib::processInput( ProcessOptions options ) } -bool Gplib::isError( const QString &message ) const +bool Gplib::isError( const TQString &message ) const { - return message.contains( "Error", false ); + return message.tqcontains( "Error", false ); } -bool Gplib::isWarning( const QString &message ) const +bool Gplib::isWarning( const TQString &message ) const { - return message.contains( "Warning", false ); + return message.tqcontains( "Warning", false ); } -MessageInfo Gplib::extractMessageInfo( const QString &text ) +MessageInfo Gplib::extractMessageInfo( const TQString &text ) { #if 0 if ( text.length()<5 || !text.startsWith("/") ) return MessageInfo(); - const int index = text.find( ".asm", 0, false )+4; + const int index = text.tqfind( ".asm", 0, false )+4; if ( index == -1+4 ) return MessageInfo(); - const QString fileName = text.left(index); + const TQString fileName = text.left(index); // Extra line number - const QString message = text.right(text.length()-index); - const int linePos = message.find( QRegExp(":[\\d]+") ); + const TQString message = text.right(text.length()-index); + const int linePos = message.tqfind( TQRegExp(":[\\d]+") ); int line = -1; if ( linePos != -1 ) { - const int linePosEnd = message.find( ':', linePos+1 ); + const int linePosEnd = message.tqfind( ':', linePos+1 ); if ( linePosEnd != -1 ) { - const QString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace(); + const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace(); bool ok; line = number.toInt(&ok)-1; if (!ok) line = -1; -- cgit v1.2.1