summaryrefslogtreecommitdiffstats
path: root/src/languages/gpdasm.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/languages/gpdasm.cpp
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
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
Diffstat (limited to 'src/languages/gpdasm.cpp')
-rw-r--r--src/languages/gpdasm.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/languages/gpdasm.cpp b/src/languages/gpdasm.cpp
index 8c255d3..ea98221 100644
--- a/src/languages/gpdasm.cpp
+++ b/src/languages/gpdasm.cpp
@@ -16,11 +16,11 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
-Gpdasm::Gpdasm( ProcessChain *processChain, KTechlab *parent )
- : ExternalLanguage( processChain, parent, "Gpdasm" )
+Gpdasm::Gpdasm( ProcessChain *processChain, KTechlab *tqparent )
+ : ExternalLanguage( processChain, tqparent, "Gpdasm" )
{
m_successfulMessage = i18n("*** Disassembly successful ***");
m_failedMessage = i18n("*** Disassembly failed ***");
@@ -53,7 +53,7 @@ void Gpdasm::processInput( ProcessOptions options )
}
-void Gpdasm::outputtedMessage( const QString &message )
+void Gpdasm::outputtedMessage( const TQString &message )
{
m_asmOutput += message + "\n";
}
@@ -64,49 +64,49 @@ bool Gpdasm::processExited( bool successfully )
if (!successfully)
return false;
- QFile file(m_processOptions.intermediaryOutput());
+ TQFile file(m_processOptions.intermediaryOutput());
if ( file.open(IO_WriteOnly) == false )
return false;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << m_asmOutput;
file.close();
return true;
}
-bool Gpdasm::isError( const QString &message ) const
+bool Gpdasm::isError( const TQString &message ) const
{
- return (message.find( "error", -1, false ) != -1);
+ return (message.tqfind( "error", -1, false ) != -1);
}
-bool Gpdasm::isWarning( const QString &message ) const
+bool Gpdasm::isWarning( const TQString &message ) const
{
- return (message.find( "warning", -1, false ) != -1);
+ return (message.tqfind( "warning", -1, false ) != -1);
}
-MessageInfo Gpdasm::extractMessageInfo( const QString &text )
+MessageInfo Gpdasm::extractMessageInfo( const TQString &text )
{
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;