summaryrefslogtreecommitdiffstats
path: root/src/languages
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
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')
-rw-r--r--src/languages/asmparser.cpp42
-rw-r--r--src/languages/asmparser.h10
-rw-r--r--src/languages/externallanguage.cpp44
-rw-r--r--src/languages/externallanguage.h15
-rw-r--r--src/languages/flowcode.cpp78
-rw-r--r--src/languages/flowcode.h28
-rw-r--r--src/languages/gpasm.cpp14
-rw-r--r--src/languages/gpasm.h6
-rw-r--r--src/languages/gpdasm.cpp36
-rw-r--r--src/languages/gpdasm.h12
-rw-r--r--src/languages/gplib.cpp32
-rw-r--r--src/languages/gplib.h8
-rw-r--r--src/languages/gplink.cpp34
-rw-r--r--src/languages/gplink.h8
-rw-r--r--src/languages/language.cpp42
-rw-r--r--src/languages/language.h66
-rw-r--r--src/languages/languagemanager.cpp26
-rw-r--r--src/languages/languagemanager.h21
-rw-r--r--src/languages/microbe.cpp24
-rw-r--r--src/languages/microbe.h10
-rw-r--r--src/languages/picprogrammer.cpp104
-rw-r--r--src/languages/picprogrammer.h34
-rw-r--r--src/languages/processchain.cpp34
-rw-r--r--src/languages/processchain.h16
-rw-r--r--src/languages/sdcc.cpp16
-rw-r--r--src/languages/sdcc.h8
-rw-r--r--src/languages/sourceline.cpp2
-rw-r--r--src/languages/sourceline.h8
28 files changed, 392 insertions, 386 deletions
diff --git a/src/languages/asmparser.cpp b/src/languages/asmparser.cpp
index eb4b7cd..94b01c0 100644
--- a/src/languages/asmparser.cpp
+++ b/src/languages/asmparser.cpp
@@ -13,10 +13,10 @@
#include "gpsimprocessor.h"
#include <kdebug.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
-AsmParser::AsmParser( const QString &url )
+AsmParser::AsmParser( const TQString &url )
: m_url(url)
{
m_bContainsRadix = false;
@@ -31,40 +31,40 @@ AsmParser::~AsmParser()
bool AsmParser::parse( GpsimDebugger * debugger )
{
- QFile file(m_url);
+ TQFile file(m_url);
if ( !file.open(IO_ReadOnly) )
return false;
- QTextStream stream( &file );
+ TQTextStream stream( &file );
m_type = Absolute;
m_bContainsRadix = false;
- m_picID = QString::null;
+ m_picID = TQString();
- QStringList nonAbsoluteOps = QStringList::split( ",",
+ TQStringList nonAbsoluteOps = TQStringList::split( ",",
"code,.def,.dim,.direct,endw,extern,.file,global,idata,.ident,.line,.type,udata,udata_acs,udata_ovr,udata_shr" );
unsigned inputAtLine = 0;
while ( !stream.atEnd() )
{
- const QString line = stream.readLine().stripWhiteSpace();
+ const TQString line = stream.readLine().stripWhiteSpace();
if ( m_type != Relocatable )
{
- QString col0 = line.section( QRegExp("[; ]"), 0, 0 );
+ TQString col0 = line.section( TQRegExp("[; ]"), 0, 0 );
col0 = col0.stripWhiteSpace();
- if ( nonAbsoluteOps.contains(col0) )
+ if ( nonAbsoluteOps.tqcontains(col0) )
m_type = Relocatable;
}
if ( !m_bContainsRadix )
{
- if ( line.contains( QRegExp("^RADIX[\\s]*") ) || line.contains( QRegExp("^radix[\\s]*") ) )
+ if ( line.tqcontains( TQRegExp("^RADIX[\\s]*") ) || line.tqcontains( TQRegExp("^radix[\\s]*") ) )
m_bContainsRadix = true;
}
if ( m_picID.isEmpty() )
{
// We look for "list p = ", and "list p = picid ", and subtract the positions / lengths away from each other to get the picid text position
- QRegExp fullRegExp("[lL][iI][sS][tT][\\s]+[pP][\\s]*=[\\s]*[\\d\\w]+");
- QRegExp halfRegExp("[lL][iI][sS][tT][\\s]+[pP][\\s]*=[\\s]*");
+ TQRegExp fullRegExp("[lL][iI][sS][tT][\\s]+[pP][\\s]*=[\\s]*[\\d\\w]+");
+ TQRegExp halfRegExp("[lL][iI][sS][tT][\\s]+[pP][\\s]*=[\\s]*");
int startPos = fullRegExp.search(line);
if ( (startPos != -1) && (startPos == halfRegExp.search(line)) )
@@ -81,15 +81,15 @@ bool AsmParser::parse( GpsimDebugger * debugger )
// Assembly file produced (by sdcc) from C, line is in format:
// ;#CSRC\t[file-name] [file-line]
// The filename can contain spaces.
- int fileLineAt = line.findRev(" ");
+ int fileLineAt = line.tqfindRev(" ");
if ( fileLineAt == -1 )
kdWarning() << k_funcinfo << "Syntax error in line \"" << line << "\" while looking for file-line" << endl;
else
{
// 7 = length_of(";#CSRC\t")
- QString fileName = line.mid( 7, fileLineAt-7 );
- QString fileLineString = line.mid( fileLineAt+1, line.length() - fileLineAt - 1 );
+ TQString fileName = line.mid( 7, fileLineAt-7 );
+ TQString fileLineString = line.mid( fileLineAt+1, line.length() - fileLineAt - 1 );
if ( fileName.startsWith("\"") )
{
@@ -111,19 +111,19 @@ bool AsmParser::parse( GpsimDebugger * debugger )
// Assembly file produced by either sdcc or microbe, line is in format:
// \t[".line"/"#MSRC"]\t[file-line]; [file-name]\t[c/microbe source code for that line]
// We're screwed if the file name contains tabs, but hopefully not many do...
- QStringList lineParts = QStringList::split( '\t', line );
+ TQStringList lineParts = TQStringList::split( '\t', line );
if ( lineParts.size() < 2 )
kdWarning() << k_funcinfo << "Line is in wrong format for extracing source line and file: \""<<line<<"\""<<endl;
else
{
- const QString lineAndFile = lineParts[1];
- int lineFileSplit = lineAndFile.find("; ");
+ const TQString lineAndFile = lineParts[1];
+ int lineFileSplit = lineAndFile.tqfind("; ");
if ( lineFileSplit == -1 )
kdDebug() << k_funcinfo << "Could not find file / line split in \""<<lineAndFile<<"\""<<endl;
else
{
- QString fileName = lineAndFile.mid( lineFileSplit + 2 );
- QString fileLineString = lineAndFile.left( lineFileSplit );
+ TQString fileName = lineAndFile.mid( lineFileSplit + 2 );
+ TQString fileLineString = lineAndFile.left( lineFileSplit );
if ( fileName.startsWith("\"") )
{
diff --git a/src/languages/asmparser.h b/src/languages/asmparser.h
index ab21837..e0c1e2c 100644
--- a/src/languages/asmparser.h
+++ b/src/languages/asmparser.h
@@ -11,7 +11,7 @@
#ifndef ASMPARSER_H
#define ASMPARSER_H
-#include <qstring.h>
+#include <tqstring.h>
class GpsimDebugger;
@@ -24,7 +24,7 @@ PIC ID
class AsmParser
{
public:
- AsmParser( const QString &url );
+ AsmParser( const TQString &url );
~AsmParser();
enum Type { Relocatable, Absolute };
@@ -39,7 +39,7 @@ class AsmParser
/**
* Returns the PIC ID
*/
- QString picID() const { return m_picID; }
+ TQString picID() const { return m_picID; }
/**
* Returns whether or not the assembly file contained the "set radix"
* directive
@@ -52,8 +52,8 @@ class AsmParser
Type type() const { return m_type; }
protected:
- const QString m_url;
- QString m_picID;
+ const TQString m_url;
+ TQString m_picID;
bool m_bContainsRadix;
Type m_type;
};
diff --git a/src/languages/externallanguage.cpp b/src/languages/externallanguage.cpp
index 7297e63..233c639 100644
--- a/src/languages/externallanguage.cpp
+++ b/src/languages/externallanguage.cpp
@@ -14,11 +14,11 @@
#include <kdebug.h>
#include <kprocess.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
-ExternalLanguage::ExternalLanguage( ProcessChain *processChain, KTechlab *parent, const QString &name )
- : Language( processChain, parent, name )
+ExternalLanguage::ExternalLanguage( ProcessChain *processChain, KTechlab *tqparent, const TQString &name )
+ : Language( processChain, tqparent, name )
{
m_languageProcess = 0l;
}
@@ -37,7 +37,7 @@ void ExternalLanguage::deleteLanguageProcess()
// I'm not too sure if this combination of killing the process is the best way....
// m_languageProcess->tryTerminate();
-// QTimer::singleShot( 5000, m_languageProcess, SLOT( kill() ) );
+// TQTimer::singleShot( 5000, m_languageProcess, TQT_SLOT( kill() ) );
// delete m_languageProcess;
m_languageProcess->kill();
m_languageProcess->deleteLater();
@@ -48,10 +48,10 @@ void ExternalLanguage::deleteLanguageProcess()
void ExternalLanguage::receivedStdout( KProcess *, char * buffer, int buflen )
{
- QStringList lines = QStringList::split( '\n', QString::fromLocal8Bit( buffer, buflen ), false );
- QStringList::iterator end = lines.end();
+ TQStringList lines = TQStringList::split( '\n', TQString::fromLocal8Bit( buffer, buflen ), false );
+ TQStringList::iterator end = lines.end();
- for ( QStringList::iterator it = lines.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = lines.begin(); it != end; ++it )
{
if ( isError( *it ) )
{
@@ -74,10 +74,10 @@ void ExternalLanguage::receivedStdout( KProcess *, char * buffer, int buflen )
void ExternalLanguage::receivedStderr( KProcess *, char * buffer, int buflen )
{
- QStringList lines = QStringList::split( '\n', QString::fromLocal8Bit( buffer, buflen ), false );
- QStringList::iterator end = lines.end();
+ TQStringList lines = TQStringList::split( '\n', TQString::fromLocal8Bit( buffer, buflen ), false );
+ TQStringList::iterator end = lines.end();
- for ( QStringList::iterator it = lines.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = lines.begin(); it != end; ++it )
{
if ( isStderrOutputFatal( *it ) )
{
@@ -126,32 +126,32 @@ void ExternalLanguage::resetLanguageProcess()
m_languageProcess = new KProcess(this);
- connect( m_languageProcess, SIGNAL(receivedStdout( KProcess*, char*, int )),
- this, SLOT(receivedStdout( KProcess*, char*, int )) );
+ connect( m_languageProcess, TQT_SIGNAL(receivedStdout( KProcess*, char*, int )),
+ this, TQT_SLOT(receivedStdout( KProcess*, char*, int )) );
- connect( m_languageProcess, SIGNAL(receivedStderr( KProcess*, char*, int )),
- this, SLOT(receivedStderr( KProcess*, char*, int )) );
+ connect( m_languageProcess, TQT_SIGNAL(receivedStderr( KProcess*, char*, int )),
+ this, TQT_SLOT(receivedStderr( KProcess*, char*, int )) );
- connect( m_languageProcess, SIGNAL(processExited( KProcess* )),
- this, SLOT(processExited( KProcess* )) );
+ connect( m_languageProcess, TQT_SIGNAL(processExited( KProcess* )),
+ this, TQT_SLOT(processExited( KProcess* )) );
}
void ExternalLanguage::displayProcessCommand()
{
- QStringList quotedArguments;
- QValueList<QCString> arguments = m_languageProcess->args();
+ TQStringList quotedArguments;
+ TQValueList<TQCString> arguments = m_languageProcess->args();
if ( arguments.size() == 1 )
quotedArguments << arguments[0];
else
{
- QValueList<QCString>::const_iterator end = arguments.end();
+ TQValueList<TQCString>::const_iterator end = arguments.end();
- for ( QValueList<QCString>::const_iterator it = arguments.begin(); it != end; ++it )
+ for ( TQValueList<TQCString>::const_iterator it = arguments.begin(); it != end; ++it )
{
- if ( (*it).isEmpty() || (*it).contains( QRegExp("[\\s]") ) )
+ if ( (*it).isEmpty() || (*it).tqcontains( TQRegExp("[\\s]") ) )
quotedArguments << KProcess::quote( *it );
else
quotedArguments << *it;
diff --git a/src/languages/externallanguage.h b/src/languages/externallanguage.h
index 401c2b8..51a34f6 100644
--- a/src/languages/externallanguage.h
+++ b/src/languages/externallanguage.h
@@ -25,8 +25,9 @@ class provides functionality for dealing with external processes.
class ExternalLanguage : public Language
{
Q_OBJECT
+ TQ_OBJECT
public:
- ExternalLanguage( ProcessChain *processChain, KTechlab *parent, const QString &name );
+ ExternalLanguage( ProcessChain *processChain, KTechlab *tqparent, const TQString &name );
~ExternalLanguage();
protected slots:
@@ -44,27 +45,27 @@ protected:
/**
* @returns whether the string outputted to stdout is an error or not
*/
- virtual bool isError( const QString &message ) const = 0;
+ virtual bool isError( const TQString &message ) const = 0;
/**
* @returns whether the string outputted to stderr is fatal (stopped compilation)
*/
- virtual bool isStderrOutputFatal( const QString & message ) const { Q_UNUSED(message); return true; }
+ virtual bool isStderrOutputFatal( const TQString & message ) const { Q_UNUSED(message); return true; }
/**
* @returns whether the string outputted to stdout is a warning or not
*/
- virtual bool isWarning( const QString &message ) const = 0;
+ virtual bool isWarning( const TQString &message ) const = 0;
/**
* Called when the process outputs a (non warning/error) message
*/
- virtual void outputtedMessage( const QString &/*message*/ ) {};
+ virtual void outputtedMessage( const TQString &/*message*/ ) {};
/**
* Called when the process outputs a warning
*/
- virtual void outputtedWarning( const QString &/*message*/ ) {};
+ virtual void outputtedWarning( const TQString &/*message*/ ) {};
/**
* Called when the process outputs an error
*/
- virtual void outputtedError( const QString &/*message*/ ) {};
+ virtual void outputtedError( const TQString &/*message*/ ) {};
/**
* Called when the process exits (called before any signals are emitted,
* etc). If you reinherit this function, you should return whether
diff --git a/src/languages/flowcode.cpp b/src/languages/flowcode.cpp
index d19d17e..9fad28d 100644
--- a/src/languages/flowcode.cpp
+++ b/src/languages/flowcode.cpp
@@ -20,10 +20,10 @@
#include <klocale.h>
// #include <kmessagebox.h>
-#include <qfile.h>
+#include <tqfile.h>
-FlowCode::FlowCode( ProcessChain *processChain, KTechlab *parent )
- : Language( processChain, parent, i18n("FlowCode") )
+FlowCode::FlowCode( ProcessChain *processChain, KTechlab *tqparent )
+ : Language( processChain, tqparent, i18n("FlowCode") )
{
m_successfulMessage = i18n("*** Microbe generation successful ***");
m_failedMessage = i18n("*** Microbe generation failed ***");
@@ -41,11 +41,11 @@ void FlowCode::processInput( ProcessOptions options )
if ( !options.p_flowCodeDocument )
{
- options.p_flowCodeDocument = new FlowCodeDocument( QString::null, 0l );
+ options.p_flowCodeDocument = new FlowCodeDocument( TQString(), 0l );
options.p_flowCodeDocument->openURL( options.inputFiles().first() );
- connect( this, SIGNAL(processSucceeded( Language *)), options.p_flowCodeDocument, SLOT(deleteLater()) );
- connect( this, SIGNAL(processFailed( Language *)), options.p_flowCodeDocument, SLOT(deleteLater()) );
+ connect( this, TQT_SIGNAL(processSucceeded( Language *)), options.p_flowCodeDocument, TQT_SLOT(deleteLater()) );
+ connect( this, TQT_SIGNAL(processFailed( Language *)), options.p_flowCodeDocument, TQT_SLOT(deleteLater()) );
}
if ( !options.p_flowCodeDocument->microSettings() )
@@ -54,7 +54,7 @@ void FlowCode::processInput( ProcessOptions options )
return;
}
- QFile file(options.intermediaryOutput());
+ TQFile file(options.intermediaryOutput());
if ( file.open(IO_WriteOnly | IO_ReadOnly) == false )
{
finish(false);
@@ -68,14 +68,14 @@ void FlowCode::processInput( ProcessOptions options )
return;
}
- const QString code = generateMicrobe( options.p_flowCodeDocument->itemList(), options.p_flowCodeDocument->microSettings() );
+ const TQString code = generateMicrobe( options.p_flowCodeDocument->itemList(), options.p_flowCodeDocument->microSettings() );
if (code.isEmpty())
{
finish(false);
return;
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << code;
file.close();
finish(true);
@@ -88,7 +88,7 @@ void FlowCode::setStartPart( FlowPart *startPart )
}
-void FlowCode::addCode( const QString& code )
+void FlowCode::addCode( const TQString& code )
{
m_code += code;
if ( !m_code.endsWith("\n") ) m_code += '\n';
@@ -96,7 +96,7 @@ void FlowCode::addCode( const QString& code )
bool FlowCode::isValidBranch( FlowPart *flowPart )
{
- return flowPart && (flowPart->level() >= m_curLevel) && !m_stopParts.contains(flowPart);
+ return flowPart && (flowPart->level() >= m_curLevel) && !m_stopParts.tqcontains(flowPart);
}
void FlowCode::addCodeBranch( FlowPart * flowPart )
@@ -107,9 +107,9 @@ void FlowCode::addCodeBranch( FlowPart * flowPart )
if ( !isValidBranch(flowPart) )
return;
- if ( m_addedParts.contains(flowPart) )
+ if ( m_addedParts.tqcontains(flowPart) )
{
- const QString labelName = genLabel(flowPart->id());
+ const TQString labelName = genLabel(flowPart->id());
addCode( "goto "+labelName );
m_gotos.append(labelName);
return;
@@ -120,7 +120,7 @@ void FlowCode::addCodeBranch( FlowPart * flowPart )
int prevLevel = m_curLevel;
m_curLevel = flowPart->level();
- const QString labelName = genLabel(flowPart->id());
+ const TQString labelName = genLabel(flowPart->id());
addCode(labelName+':');
m_labels.append(labelName);
@@ -129,7 +129,7 @@ void FlowCode::addCodeBranch( FlowPart * flowPart )
}
}
-QString FlowCode::genLabel( const QString &id )
+TQString FlowCode::genLabel( const TQString &id )
{
return "__label_"+id;
}
@@ -145,11 +145,11 @@ void FlowCode::removeStopPart( FlowPart *part )
// We only want to remove one instance of the FlowPart, in case it has been
// used as a StopPart for more than one FlowPart
- FlowPartList::iterator it = m_stopParts.find(part);
+ FlowPartList::iterator it = m_stopParts.tqfind(part);
if ( it != m_stopParts.end() ) m_stopParts.remove(it);
}
-QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *settings )
+TQString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *settings )
{
bool foundStart = false;
const ItemList::const_iterator end = itemList.end();
@@ -173,7 +173,7 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
continue;
if ( !startPart->outputPart( nodeMapIt.key() ) )
- outputWarning( i18n("Warning: Floating connection for %1").arg( startPart->id() ) );
+ outputWarning( i18n("Warning: Floating connection for %1").tqarg( startPart->id() ) );
}
FlowContainer * fc = dynamic_cast<FlowContainer*>((Item*)*it);
@@ -199,25 +199,25 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
m_stopParts.clear();
m_gotos.clear();
m_labels.clear();
- m_code = QString::null;
+ m_code = TQString();
// PIC type
{
- const QString codeString = settings->microInfo()->id() + "\n";
+ const TQString codeString = settings->microInfo()->id() + "\n";
addCode(codeString);
}
// Initial variables
{
- QStringList vars = settings->variableNames();
+ TQStringList vars = settings->variableNames();
// If "inited" is true at the end, we comment at the insertion point
bool inited = false;
- const QString codeString = "// Initial variable values:\n";
+ const TQString codeString = "// Initial variable values:\n";
addCode(codeString);
- const QStringList::iterator end = vars.end();
- for ( QStringList::iterator it = vars.begin(); it != end; ++it )
+ const TQStringList::iterator end = vars.end();
+ for ( TQStringList::iterator it = vars.begin(); it != end; ++it )
{
VariableInfo *info = settings->variableInfo(*it);
if ( info /*&& info->initAtStart*/ )
@@ -239,7 +239,7 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
PinMappingMap::const_iterator end = pinMappings.end();
for ( PinMappingMap::const_iterator it = pinMappings.begin(); it != end; ++it )
{
- QString type;
+ TQString type;
switch ( it.data().type() )
{
@@ -259,17 +259,17 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
if ( type.isEmpty() )
continue;
- addCode( QString("%1 %2 %3").arg( type ).arg( it.key() ).arg( it.data().pins().join(" ") ) );
+ addCode( TQString("%1 %2 %3").tqarg( type ).tqarg( it.key() ).tqarg( it.data().pins().join(" ") ) );
}
}
// Initial port settings
{
- QStringList portNames = settings->microInfo()->package()->portNames();
- const QStringList::iterator end = portNames.end();
+ TQStringList portNames = settings->microInfo()->package()->portNames();
+ const TQStringList::iterator end = portNames.end();
// TRIS registers (remember that this is set to ..11111 on all resets)
- for ( QStringList::iterator it = portNames.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = portNames.begin(); it != end; ++it )
{
const int portType = settings->portType(*it);
const int pinCount = settings->microInfo()->package()->pinCount( 0, *it );
@@ -277,17 +277,17 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
// We don't need to reset it if portType == 2^(pinCount-1)
if ( portType != (1<<pinCount)-1 )
{
- QString name = *it;
- name.replace("PORT","TRIS");
- addCode( name+" = "+QString::number(portType) );
+ TQString name = *it;
+ name.tqreplace("PORT","TRIS");
+ addCode( name+" = "+TQString::number(portType) );
}
}
// PORT registers
- for ( QStringList::iterator it = portNames.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = portNames.begin(); it != end; ++it )
{
const int portState = settings->portState(*it);
- addCode( (*it)+" = "+QString::number(portState) );
+ addCode( (*it)+" = "+TQString::number(portState) );
}
}
@@ -316,17 +316,17 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
void FlowCode::tidyCode()
{
// First, get rid of the unused labels
- const QStringList::iterator end = m_labels.end();
- for ( QStringList::iterator it = m_labels.begin(); it != end; ++it )
+ const TQStringList::iterator end = m_labels.end();
+ for ( TQStringList::iterator it = m_labels.begin(); it != end; ++it )
{
- if ( !m_gotos.contains(*it) ) m_code.remove(*it+':');
+ if ( !m_gotos.tqcontains(*it) ) m_code.remove(*it+':');
}
// And now on to handling indentation :-)
if ( !m_code.endsWith("\n") ) m_code.append("\n");
- QString newCode;
+ TQString newCode;
bool multiLineComment = false; // For "/*"..."*/"
bool comment = false; // For "//"
bool asmEmbed = false;
@@ -444,7 +444,7 @@ void FlowCode::tidyCode()
void FlowCode::addSubroutine( FlowPart *part )
{
- if ( !part || m_subroutines.contains(part) || part->parentItem() || !dynamic_cast<FlowContainer*>(part) ) return;
+ if ( !part || m_subroutines.tqcontains(part) || part->tqparentItem() || !dynamic_cast<FlowContainer*>(part) ) return;
m_subroutines.append(part);
}
diff --git a/src/languages/flowcode.h b/src/languages/flowcode.h
index afa17db..77fa5c1 100644
--- a/src/languages/flowcode.h
+++ b/src/languages/flowcode.h
@@ -13,19 +13,19 @@
#include "language.h"
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class CNItem;
class FlowPart;
class Item;
class MicroSettings;
-typedef QValueList<FlowPart*> FlowPartList;
-typedef QValueList<QGuardedPtr<Item> > ItemList;
+typedef TQValueList<FlowPart*> FlowPartList;
+typedef TQValueList<TQGuardedPtr<Item> > ItemList;
/**
"FlowCode" can possibly be considered a misnomer, as the output is actually Microbe.
@@ -39,7 +39,7 @@ basic from the code that they create. The 3 simple steps for usage of this funct
class FlowCode : public Language
{
public:
- FlowCode( ProcessChain *processChain, KTechlab *parent );
+ FlowCode( ProcessChain *processChain, KTechlab *tqparent );
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
@@ -56,7 +56,7 @@ public:
/**
* Adds code at the current insertion point
*/
- void addCode( const QString& code );
+ void addCode( const TQString& code );
/**
* Adds a code branch to the current insertion point. This will stop when the level gets
* below the original starting level (so for insertion of the contents of a for loop,
@@ -77,7 +77,7 @@ public:
* Generates and returns the microbe code
* @param nonVerbal if true then will not inform the user when something goes wrong
*/
- QString generateMicrobe( const ItemList &itemList, MicroSettings *settings );
+ TQString generateMicrobe( const ItemList &itemList, MicroSettings *settings );
/**
* Returns true if the FlowPart is a valid one for adding a branch
*/
@@ -86,7 +86,7 @@ public:
* Generates a nice label name from the string, e.g. genLabel("callsub")
* returns "__label_callsub".
*/
- static QString genLabel( const QString &id );
+ static TQString genLabel( const TQString &id );
protected:
/**
@@ -94,13 +94,13 @@ protected:
*/
void tidyCode();
- QStringList m_gotos; // Gotos used
- QStringList m_labels; // Labels used
+ TQStringList m_gotos; // Gotos used
+ TQStringList m_labels; // Labels used
FlowPartList m_subroutines;
FlowPartList m_addedParts;
FlowPartList m_stopParts;
FlowPart *p_startPart;
- QString m_code;
+ TQString m_code;
int m_curLevel;
};
diff --git a/src/languages/gpasm.cpp b/src/languages/gpasm.cpp
index 447354e..33cb892 100644
--- a/src/languages/gpasm.cpp
+++ b/src/languages/gpasm.cpp
@@ -18,10 +18,10 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-Gpasm::Gpasm( ProcessChain *processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "Gpasm" )
+Gpasm::Gpasm( ProcessChain *processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "Gpasm" )
{
m_successfulMessage = i18n("*** Assembly successful ***");
m_failedMessage = i18n("*** Assembly failed ***");
@@ -124,15 +124,15 @@ void Gpasm::processInput( ProcessOptions options )
}
-bool Gpasm::isError( const QString &message ) const
+bool Gpasm::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool Gpasm::isWarning( const QString &message ) const
+bool Gpasm::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
diff --git a/src/languages/gpasm.h b/src/languages/gpasm.h
index c92a969..f071b8d 100644
--- a/src/languages/gpasm.h
+++ b/src/languages/gpasm.h
@@ -20,15 +20,15 @@
class Gpasm : public ExternalLanguage
{
public:
- Gpasm( ProcessChain *processChain, KTechlab *parent );
+ Gpasm( ProcessChain *processChain, KTechlab *tqparent );
~Gpasm();
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
};
#endif
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;
diff --git a/src/languages/gpdasm.h b/src/languages/gpdasm.h
index 149ed26..8fd977c 100644
--- a/src/languages/gpdasm.h
+++ b/src/languages/gpdasm.h
@@ -20,20 +20,20 @@ Interface to the GNU Pic Disassembler
class Gpdasm : public ExternalLanguage
{
public:
- Gpdasm( ProcessChain *processChain, KTechlab *parent );
+ Gpdasm( ProcessChain *processChain, KTechlab *tqparent );
~Gpdasm();
virtual void processInput( ProcessOptions options );
- virtual MessageInfo extractMessageInfo( const QString &text );
+ virtual MessageInfo extractMessageInfo( const TQString &text );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual void outputtedMessage( const QString &message );
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual void outputtedMessage( const TQString &message );
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
virtual bool processExited( bool successfully );
- QString m_asmOutput; // Outputed by gpdasm
+ TQString m_asmOutput; // Outputed by gpdasm
};
#endif
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 <kmessagebox.h>
#include <kprocess.h>
-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;
diff --git a/src/languages/gplib.h b/src/languages/gplib.h
index 35cb1da..1d3df03 100644
--- a/src/languages/gplib.h
+++ b/src/languages/gplib.h
@@ -19,16 +19,16 @@
class Gplib : public ExternalLanguage
{
public:
- Gplib( ProcessChain *processChain, KTechlab *parent );
+ Gplib( ProcessChain *processChain, KTechlab *tqparent );
~Gplib();
virtual void processInput( ProcessOptions options );
- virtual MessageInfo extractMessageInfo( const QString &text );
+ virtual MessageInfo extractMessageInfo( const TQString &text );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
};
#endif
diff --git a/src/languages/gplink.cpp b/src/languages/gplink.cpp
index 548449a..9b1859c 100644
--- a/src/languages/gplink.cpp
+++ b/src/languages/gplink.cpp
@@ -16,8 +16,8 @@
#include <kmessagebox.h>
#include <kprocess.h>
-Gplink::Gplink( ProcessChain *processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "Gpasm" )
+Gplink::Gplink( ProcessChain *processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "Gpasm" )
{
m_successfulMessage = i18n("*** Linking successful ***");
m_failedMessage = i18n("*** Linking failed ***");
@@ -65,14 +65,14 @@ void Gplink::processInput( ProcessOptions options )
*m_languageProcess << ( options.intermediaryOutput() );
// Input object file
- 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 );
// Other libraries
end = options.m_linkLibraries.end();
- for ( QStringList::const_iterator it = options.m_linkLibraries.begin(); it != end; ++it )
+ for ( TQStringList::const_iterator it = options.m_linkLibraries.begin(); it != end; ++it )
*m_languageProcess << ( *it );
if ( !start() )
@@ -84,39 +84,39 @@ void Gplink::processInput( ProcessOptions options )
}
-bool Gplink::isError( const QString &message ) const
+bool Gplink::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool Gplink::isWarning( const QString &message ) const
+bool Gplink::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
-MessageInfo Gplink::extractMessageInfo( const QString &text )
+MessageInfo Gplink::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;
diff --git a/src/languages/gplink.h b/src/languages/gplink.h
index c60f9f9..47cb1c9 100644
--- a/src/languages/gplink.h
+++ b/src/languages/gplink.h
@@ -20,16 +20,16 @@
class Gplink : public ExternalLanguage
{
public:
- Gplink( ProcessChain *processChain, KTechlab *parent );
+ Gplink( ProcessChain *processChain, KTechlab *tqparent );
~Gplink();
virtual void processInput( ProcessOptions options );
- virtual MessageInfo extractMessageInfo( const QString &text );
+ virtual MessageInfo extractMessageInfo( const TQString &text );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
};
#endif
diff --git a/src/languages/language.cpp b/src/languages/language.cpp
index e7ce759..f98d580 100644
--- a/src/languages/language.cpp
+++ b/src/languages/language.cpp
@@ -22,14 +22,14 @@
#include <kio/netaccess.h>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
//BEGIN class Language
-Language::Language( ProcessChain *processChain, KTechlab *parent, const QString &name )
- : QObject(parent,name)
+Language::Language( ProcessChain *processChain, KTechlab *tqparent, const TQString &name )
+ : TQObject(tqparent,name)
{
- p_ktechlab = parent;
+ p_ktechlab = tqparent;
p_processChain = processChain;
}
@@ -39,19 +39,19 @@ Language::~Language()
}
-void Language::outputMessage( const QString &message )
+void Language::outputMessage( const TQString &message )
{
LanguageManager::self()->slotMessage( message, extractMessageInfo(message) );
}
-void Language::outputWarning( const QString &message )
+void Language::outputWarning( const TQString &message )
{
LanguageManager::self()->slotWarning( message, extractMessageInfo(message) );
}
-void Language::outputError( const QString &message )
+void Language::outputError( const TQString &message )
{
LanguageManager::self()->slotError( message, extractMessageInfo(message) );
m_errorCount++;
@@ -96,26 +96,26 @@ void Language::reset()
}
-MessageInfo Language::extractMessageInfo( const QString &text )
+MessageInfo Language::extractMessageInfo( const TQString &text )
{
if ( !text.startsWith("/") )
return MessageInfo();
- const int index = text.find( ":", 0, false );
+ const int index = text.tqfind( ":", 0, false );
if ( index == -1 )
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;
@@ -177,7 +177,7 @@ ProcessOptions::ProcessOptions( OutputMethodInfo info )
m_picID = info.picID();
b_targetFileSet = false;
- QString target;
+ TQString target;
if ( !KIO::NetAccess::download( info.outputFile(), target, 0l ) )
{
// If the file could not be downloaded, for example does not
@@ -205,10 +205,10 @@ ProcessOptions::ProcessOptions( OutputMethodInfo info )
}
-void ProcessOptions::setTextOutputTarget( TextDocument * target, QObject * receiver, const char * slot )
+void ProcessOptions::setTextOutputTarget( TextDocument * target, TQObject * receiver, const char * slot )
{
m_pTextOutputTarget = target;
- QObject::connect( m_pHelper, SIGNAL(textOutputtedTo( TextDocument* )), receiver, slot );
+ TQObject::connect( m_pHelper, TQT_SIGNAL(textOutputtedTo( TextDocument* )), receiver, slot );
}
@@ -219,7 +219,7 @@ void ProcessOptions::setTextOutputtedTo( TextDocument * outputtedTo )
}
-void ProcessOptions::setTargetFile( const QString &file )
+void ProcessOptions::setTargetFile( const TQString &file )
{
if (b_targetFileSet)
{
@@ -232,9 +232,9 @@ void ProcessOptions::setTargetFile( const QString &file )
}
-ProcessOptions::ProcessPath::MediaType ProcessOptions::guessMediaType( const QString & url )
+ProcessOptions::ProcessPath::MediaType ProcessOptions::guessMediaType( const TQString & url )
{
- QString extension = url.right( url.length() - url.findRev('.') - 1 );
+ TQString extension = url.right( url.length() - url.tqfindRev('.') - 1 );
extension = extension.lower();
if ( extension == "asm" )
diff --git a/src/languages/language.h b/src/languages/language.h
index 68ef187..54fc408 100644
--- a/src/languages/language.h
+++ b/src/languages/language.h
@@ -11,8 +11,8 @@
#ifndef LANGUAGE_H
#define LANGUAGE_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class FlowCodeDocument;
class KTechlab;
@@ -23,9 +23,9 @@ class OutputMethodInfo;
class ProcessChain;
class ProcessOptions;
class TextDocument;
-class QProcess;
+class TQProcess;
-typedef QValueList<ProcessOptions> ProcessOptionsList;
+typedef TQValueList<ProcessOptions> ProcessOptionsList;
class ProcessOptionsSpecial
{
@@ -34,26 +34,27 @@ class ProcessOptionsSpecial
bool b_addToProject;
bool b_forceList;
- QString m_picID;
+ TQString m_picID;
FlowCodeDocument * p_flowCodeDocument;
// Linking
- QString m_hexFormat;
+ TQString m_hexFormat;
bool m_bOutputMapFile;
- QString m_libraryDir;
- QString m_linkerScript;
- QStringList m_linkLibraries;
- QString m_linkOther;
+ TQString m_libraryDir;
+ TQString m_linkerScript;
+ TQStringList m_linkLibraries;
+ TQString m_linkOther;
// Programming
- QString m_port;
- QString m_program;
+ TQString m_port;
+ TQString m_program;
};
-class ProcessOptionsHelper : public QObject
+class ProcessOptionsHelper : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
#define protected public
signals:
#undef protected
@@ -142,21 +143,21 @@ class ProcessOptions : public ProcessOptionsSpecial
* Tries to guess the media type from the url (and possible the contents
* of the file as well).
*/
- static ProcessPath::MediaType guessMediaType( const QString & url );
+ static ProcessPath::MediaType guessMediaType( const TQString & url );
/**
* The *final* target file (not any intermediatary ones)
*/
- QString targetFile() const { return m_targetFile; }
+ TQString targetFile() const { return m_targetFile; }
/**
* This sets the final target file, as well as the initial intermediatary one
*/
- void setTargetFile( const QString &file );
+ void setTargetFile( const TQString &file );
- void setIntermediaryOutput( const QString &file ) { m_intermediaryFile = file; }
- QString intermediaryOutput() const { return m_intermediaryFile; }
+ void setIntermediaryOutput( const TQString &file ) { m_intermediaryFile = file; }
+ TQString intermediaryOutput() const { return m_intermediaryFile; }
- void setInputFiles( const QStringList & files ) { m_inputFiles = files; }
- QStringList inputFiles() const { return m_inputFiles; }
+ void setInputFiles( const TQStringList & files ) { m_inputFiles = files; }
+ TQStringList inputFiles() const { return m_inputFiles; }
void setMethod( Method::type method ) { m_method = method; }
Method::type method() const { return m_method; }
@@ -174,7 +175,7 @@ class ProcessOptions : public ProcessOptionsSpecial
* is not to be confused with setTextOutputtedTo, which is called once
* the processing has finished, and will call-back to the slot given.
*/
- void setTextOutputTarget( TextDocument * target, QObject * receiver, const char * slot );
+ void setTextOutputTarget( TextDocument * target, TQObject * receiver, const char * slot );
/**
* @see setTextOutputTarget
*/
@@ -188,9 +189,9 @@ class ProcessOptions : public ProcessOptionsSpecial
TextDocument * m_pTextOutputTarget;
ProcessOptionsHelper * m_pHelper;
bool b_targetFileSet;
- QStringList m_inputFiles;
- QString m_targetFile;
- QString m_intermediaryFile;
+ TQStringList m_inputFiles;
+ TQString m_targetFile;
+ TQString m_intermediaryFile;
Method::type m_method;
ProcessPath::Path m_processPath;
};
@@ -200,11 +201,12 @@ class ProcessOptions : public ProcessOptionsSpecial
@author Daniel Clarke
@author David Saxton
*/
-class Language : public QObject
+class Language : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- Language( ProcessChain *processChain, KTechlab *parent, const QString &name );
+ Language( ProcessChain *processChain, KTechlab *tqparent, const TQString &name );
~Language();
/**
@@ -239,15 +241,15 @@ class Language : public QObject
* Examines the string for the line number if applicable, and creates a new
* MessageInfo for it.
*/
- virtual MessageInfo extractMessageInfo( const QString &text );
+ virtual MessageInfo extractMessageInfo( const TQString &text );
/**
* Reset the error count
*/
void reset();
- void outputMessage( const QString &message );
- void outputWarning( const QString &message );
- void outputError( const QString &error );
+ void outputMessage( const TQString &message );
+ void outputWarning( const TQString &message );
+ void outputError( const TQString &error );
void finish( bool successful );
int m_errorCount;
@@ -258,11 +260,11 @@ class Language : public QObject
/**
* A message appropriate to the language's success after compilation or similar.
*/
- QString m_successfulMessage;
+ TQString m_successfulMessage;
/**
* A message appropriate to the language's failure after compilation or similar.
*/
- QString m_failedMessage;
+ TQString m_failedMessage;
};
#endif
diff --git a/src/languages/languagemanager.cpp b/src/languages/languagemanager.cpp
index a6dddd8..0a641a9 100644
--- a/src/languages/languagemanager.cpp
+++ b/src/languages/languagemanager.cpp
@@ -25,7 +25,7 @@
#include <kdockwidget.h>
#include <kiconloader.h>
#include <klocale.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <assert.h>
@@ -33,26 +33,26 @@
LanguageManager * LanguageManager::m_pSelf = 0l;
-LanguageManager * LanguageManager::self( KateMDI::ToolView * parent, KTechlab * ktl )
+LanguageManager * LanguageManager::self( KateMDI::ToolView * tqparent, KTechlab * ktl )
{
if (!m_pSelf)
{
- assert(parent);
+ assert(tqparent);
assert(ktl);
- m_pSelf = new LanguageManager( parent, ktl );
+ m_pSelf = new LanguageManager( tqparent, ktl );
}
return m_pSelf;
}
-LanguageManager::LanguageManager( KateMDI::ToolView * parent, KTechlab * ktl )
- : QObject((QObject*)ktl)
+LanguageManager::LanguageManager( KateMDI::ToolView * tqparent, KTechlab * ktl )
+ : TQObject((TQObject*)ktl)
{
p_ktechlab = ktl;
- m_logView = new LogView( parent, "LanguageManager LogView");
+ m_logView = new LogView( tqparent, "LanguageManager LogView");
- QWhatsThis::add( m_logView, i18n("These messages show the output of language-related functionality such as compiling and assembling.<br><br>For error messages, clicking on the line will automatically open up the file at the position of the error.") );
- connect( m_logView, SIGNAL(paraClicked(const QString&, MessageInfo )), this, SLOT(slotParaClicked(const QString&, MessageInfo )) );
+ TQWhatsThis::add( m_logView, i18n("These messages show the output of language-related functionality such as compiling and assembling.<br><br>For error messages, clicking on the line will automatically open up the file at the position of the error.") );
+ connect( m_logView, TQT_SIGNAL(paraClicked(const TQString&, MessageInfo )), this, TQT_SLOT(slotParaClicked(const TQString&, MessageInfo )) );
reset();
}
@@ -86,20 +86,20 @@ ProcessListChain * LanguageManager::compile( ProcessOptionsList pol )
}
-void LanguageManager::slotError( const QString &error, MessageInfo messageInfo )
+void LanguageManager::slotError( const TQString &error, MessageInfo messageInfo )
{
m_logView->addOutput( error, LogView::ot_error, messageInfo );
}
-void LanguageManager::slotWarning( const QString &error, MessageInfo messageInfo )
+void LanguageManager::slotWarning( const TQString &error, MessageInfo messageInfo )
{
m_logView->addOutput( error, LogView::ot_warning, messageInfo );
}
-void LanguageManager::slotMessage( const QString &error, MessageInfo messageInfo )
+void LanguageManager::slotMessage( const TQString &error, MessageInfo messageInfo )
{
m_logView->addOutput( error, LogView::ot_message, messageInfo );
}
-void LanguageManager::slotParaClicked( const QString& message, MessageInfo messageInfo )
+void LanguageManager::slotParaClicked( const TQString& message, MessageInfo messageInfo )
{
Q_UNUSED(message);
DocManager::self()->gotoTextLine( messageInfo.fileURL(), messageInfo.fileLine() );
diff --git a/src/languages/languagemanager.h b/src/languages/languagemanager.h
index c5bda98..2a64e90 100644
--- a/src/languages/languagemanager.h
+++ b/src/languages/languagemanager.h
@@ -11,8 +11,8 @@
#ifndef LANGUAGEMANAGER_H
#define LANGUAGEMANAGER_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include "language.h"
@@ -33,12 +33,13 @@ namespace KateMDI { class ToolView; }
/**
@author David Saxton
*/
-class LanguageManager : public QObject
+class LanguageManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- static LanguageManager * self( KateMDI::ToolView * parent = 0l, KTechlab * ktl = 0l );
- static QString toolViewIdentifier() { return "LanguageManager"; }
+ static LanguageManager * self( KateMDI::ToolView * tqparent = 0l, KTechlab * ktl = 0l );
+ static TQString toolViewIdentifier() { return "LanguageManager"; }
~LanguageManager();
/**
@@ -62,25 +63,25 @@ class LanguageManager : public QObject
/**
* Called when the user clicks on any text in the LogView
*/
- void slotParaClicked( const QString& message, MessageInfo messageInfo );
+ void slotParaClicked( const TQString& message, MessageInfo messageInfo );
/**
* Called by languages to report an error message
* @param error Error message to report
*/
- void slotError( const QString &error, MessageInfo messageInfo );
+ void slotError( const TQString &error, MessageInfo messageInfo );
/**
* Called by languages to report a warning message
* @param warning Warning message to report
*/
- void slotWarning( const QString &warning, MessageInfo messageInfo );
+ void slotWarning( const TQString &warning, MessageInfo messageInfo );
/**
* Called by languages to report a general message
* @param message General message to report
*/
- void slotMessage( const QString &message, MessageInfo messageInfo );
+ void slotMessage( const TQString &message, MessageInfo messageInfo );
protected:
- LanguageManager( KateMDI::ToolView * parent, KTechlab * ktl );
+ LanguageManager( KateMDI::ToolView * tqparent, KTechlab * ktl );
private:
LogView * m_logView;
diff --git a/src/languages/microbe.cpp b/src/languages/microbe.cpp
index 628b3c1..b7c7f8b 100644
--- a/src/languages/microbe.cpp
+++ b/src/languages/microbe.cpp
@@ -19,30 +19,30 @@
#include <kmessagebox.h>
#include <kstandarddirs.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocess.h>
-Microbe::Microbe( ProcessChain *processChain, KTechlab *parent )
- : ExternalLanguage( processChain, parent, "Microbe" )
+Microbe::Microbe( ProcessChain *processChain, KTechlab *tqparent )
+ : ExternalLanguage( processChain, tqparent, "Microbe" )
{
m_failedMessage = i18n("*** Compilation failed ***");
m_successfulMessage = i18n("*** Compilation successful ***");
// Setup error messages list
- QFile file( locate("appdata",i18n("error_messages_en_gb")) );
+ TQFile file( locate("appdata",i18n("error_messages_en_gb")) );
if ( file.open( IO_ReadOnly ) )
{
- QTextStream stream( &file );
- QString line;
+ TQTextStream stream( &file );
+ TQString line;
while ( !stream.atEnd() )
{
line = stream.readLine(); // line of text excluding '\n'
if ( !line.isEmpty() )
{
bool ok;
- const int pos = line.left( line.find("#") ).toInt(&ok);
+ const int pos = line.left( line.tqfind("#") ).toInt(&ok);
if (ok) {
- m_errorMessages[pos] = line.right(line.length()-line.find("#"));
+ m_errorMessages[pos] = line.right(line.length()-line.tqfind("#"));
} else {
kdError() << k_funcinfo << "Error parsing Microbe error-message file"<<endl;
}
@@ -81,14 +81,14 @@ void Microbe::processInput( ProcessOptions options )
}
-bool Microbe::isError( const QString &message ) const
+bool Microbe::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool Microbe::isWarning( const QString &message ) const
+bool Microbe::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
diff --git a/src/languages/microbe.h b/src/languages/microbe.h
index 568db4b..91b4544 100644
--- a/src/languages/microbe.h
+++ b/src/languages/microbe.h
@@ -13,9 +13,9 @@
#include "externallanguage.h"
-#include <qmap.h>
+#include <tqmap.h>
-typedef QMap< int, QString > ErrorMap;
+typedef TQMap< int, TQString > ErrorMap;
/**
@author Daniel Clarke
@@ -24,15 +24,15 @@ typedef QMap< int, QString > ErrorMap;
class Microbe : public ExternalLanguage
{
public:
- Microbe( ProcessChain *processChain, KTechlab *parent );
+ Microbe( ProcessChain *processChain, KTechlab *tqparent );
~Microbe();
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
ErrorMap m_errorMessages;
};
diff --git a/src/languages/picprogrammer.cpp b/src/languages/picprogrammer.cpp
index 6f5e76f..882622e 100644
--- a/src/languages/picprogrammer.cpp
+++ b/src/languages/picprogrammer.cpp
@@ -18,12 +18,12 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qapplication.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqfile.h>
#include <kprocess.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
#include <stdio.h>
@@ -35,12 +35,12 @@ ProgrammerConfig::ProgrammerConfig()
void ProgrammerConfig::reset()
{
- initCommand = QString::null;
- readCommand = QString::null;
- writeCommand = QString::null;
- verifyCommand = QString::null;
- blankCheckCommand = QString::null;
- eraseCommand = QString::null;
+ initCommand = TQString();
+ readCommand = TQString();
+ writeCommand = TQString();
+ verifyCommand = TQString();
+ blankCheckCommand = TQString();
+ eraseCommand = TQString();
}
//END class ProgrammerConfig
@@ -63,7 +63,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_bDoneStaticConfigsInit = true;
ProgrammerConfig config;
- config.description = i18n("Supported programmers: %1").arg("JuPic, PICStart Plus, Warp-13");
+ config.description = i18n("Supported programmers: %1").tqarg("JuPic, PICStart Plus, Warp-13");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "picp %port %device -rp %file";
@@ -75,7 +75,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PICP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Epic Plus");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "odyssey init";
config.readCommand = "odyssey %device read %file";
@@ -87,7 +87,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "Odyssey" ] = config;
- config.description = i18n("Supported programmers: %1").arg("JDM PIC-Programmer 2, PIC-PG2C");
+ config.description = i18n("Supported programmers: %1").tqarg("JDM PIC-Programmer 2, PIC-PG2C");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "picprog --output %file --pic %port";
@@ -98,7 +98,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PICProg" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Epic Plus");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "dump84 --dump-all --output=%file";
@@ -109,7 +109,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "prog84" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Kit 149, Kit 150");
+ config.description = i18n("Supported programmers: %1").tqarg("Kit 149, Kit 150");
config.description += i18n("<br>Interface: USB Port");
config.initCommand = "";
config.readCommand = "pp -d %device -r %file";
@@ -120,7 +120,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Wisp628");
+ config.description = i18n("Supported programmers: %1").tqarg("Wisp628");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "xwisp ID %device PORT %device DUMP";
@@ -132,7 +132,7 @@ void PicProgrammerSettings::initStaticConfigs()
#if 0
- config.description = i18n("Supported programmers: %1").arg("Epic Plus, JDM PIC-Programmer 2, PICCOLO, PICCOLO Grande, Trivial HVP Programmer");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus, JDM PIC-Programmer 2, PICCOLO, PICCOLO Grande, Trivial HVP Programmer");
config.description += i18n("<br>Interface: Serial Port and Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -145,7 +145,7 @@ void PicProgrammerSettings::initStaticConfigs()
config.executable = "";
- config.description = i18n("Supported programmers: %1").arg("Trivial LVP programmer, Trivial HVP Programmer");
+ config.description = i18n("Supported programmers: %1").tqarg("Trivial LVP programmer, Trivial HVP Programmer");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -156,7 +156,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PicPrg2" ] = config;
- config.description = i18n("Supported programmers: %1").arg("El Cheapo");
+ config.description = i18n("Supported programmers: %1").tqarg("El Cheapo");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -167,7 +167,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PP06" ] = config;
- config.description = i18n("Supported programmers: %1").arg("NOPPP");
+ config.description = i18n("Supported programmers: %1").tqarg("NOPPP");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -178,7 +178,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "NOPPP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("SNOPPP");
+ config.description = i18n("Supported programmers: %1").tqarg("SNOPPP");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -193,9 +193,9 @@ void PicProgrammerSettings::initStaticConfigs()
void PicProgrammerSettings::load( KConfig * config )
{
- QStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
- QStringList::iterator ocpEnd = oldCustomProgrammers.end();
- for ( QStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
+ TQStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
+ TQStringList::iterator ocpEnd = oldCustomProgrammers.end();
+ for ( TQStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
{
// The CustomProgrammer_ string we searched for might appear half way through... (don't want)
if ( (*it).startsWith("CustomProgrammer_") )
@@ -210,7 +210,7 @@ void PicProgrammerSettings::load( KConfig * config )
pc.blankCheckCommand = config->readEntry( "BlankCheckCommand" );
pc.eraseCommand = config->readEntry( "EraseCommand" );
- QString name = config->readEntry( "Name" );
+ TQString name = config->readEntry( "Name" );
m_customConfigs[name] = pc;
}
}
@@ -219,9 +219,9 @@ void PicProgrammerSettings::load( KConfig * config )
void PicProgrammerSettings::save( KConfig * config )
{
- QStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
- QStringList::iterator ocpEnd = oldCustomProgrammers.end();
- for ( QStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
+ TQStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
+ TQStringList::iterator ocpEnd = oldCustomProgrammers.end();
+ for ( TQStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
{
// The CustomProgrammer_ string we searched for might appear half way through... (don't want)
if ( (*it).startsWith("CustomProgrammer_") )
@@ -232,7 +232,7 @@ void PicProgrammerSettings::save( KConfig * config )
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
{
- config->setGroup( QString("CustomProgrammer_%1").arg(at++) );
+ config->setGroup( TQString("CustomProgrammer_%1").tqarg(at++) );
config->writeEntry( "Name", it.key() );
config->writeEntry( "InitCommand", it.data().initCommand );
@@ -245,12 +245,12 @@ void PicProgrammerSettings::save( KConfig * config )
}
-ProgrammerConfig PicProgrammerSettings::config( const QString & name )
+ProgrammerConfig PicProgrammerSettings::config( const TQString & name )
{
if ( name.isEmpty() )
return ProgrammerConfig();
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::const_iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -270,7 +270,7 @@ ProgrammerConfig PicProgrammerSettings::config( const QString & name )
}
-void PicProgrammerSettings::removeConfig( const QString & name )
+void PicProgrammerSettings::removeConfig( const TQString & name )
{
if ( isPredefined( name ) )
{
@@ -278,7 +278,7 @@ void PicProgrammerSettings::removeConfig( const QString & name )
return;
}
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -292,7 +292,7 @@ void PicProgrammerSettings::removeConfig( const QString & name )
}
-void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerConfig & config )
+void PicProgrammerSettings::saveConfig( const TQString & name, const ProgrammerConfig & config )
{
if ( isPredefined( name ) )
{
@@ -300,7 +300,7 @@ void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerCo
return;
}
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -316,12 +316,12 @@ void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerCo
}
-QStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
+TQStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
{
if ( !makeLowercase )
return m_customConfigs.keys() + m_staticConfigs.keys();
- QStringList names;
+ TQStringList names;
ProgrammerConfigMap::const_iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -335,9 +335,9 @@ QStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
}
-bool PicProgrammerSettings::isPredefined( const QString & name ) const
+bool PicProgrammerSettings::isPredefined( const TQString & name ) const
{
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::const_iterator end = m_staticConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_staticConfigs.begin(); it != end; ++it )
@@ -353,8 +353,8 @@ bool PicProgrammerSettings::isPredefined( const QString & name ) const
//BEGIN class PicProgrammer
-PicProgrammer::PicProgrammer( ProcessChain *processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "PicProgrammer" )
+PicProgrammer::PicProgrammer( ProcessChain *processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "PicProgrammer" )
{
m_successfulMessage = i18n("*** Programming successful ***");
m_failedMessage = i18n("*** Programming failed ***");
@@ -374,8 +374,8 @@ void PicProgrammer::processInput( ProcessOptions options )
PicProgrammerSettings settings;
settings.load( kapp->config() );
- QString program = options.m_program;
- if ( !settings.configNames( true ).contains( program.lower() ) )
+ TQString program = options.m_program;
+ if ( !settings.configNames( true ).tqcontains( program.lower() ) )
{
kdError() << k_funcinfo << "Invalid program" << endl;
finish( false );
@@ -384,10 +384,10 @@ void PicProgrammer::processInput( ProcessOptions options )
ProgrammerConfig config = settings.config( program );
- QString command = config.writeCommand;
- command.replace( "%port", options.m_port );
- command.replace( "%device", QString( options.m_picID ).remove("P") );
- command.replace( "%file", KProcess::quote( options.inputFiles().first() ) );
+ TQString command = config.writeCommand;
+ command.tqreplace( "%port", options.m_port );
+ command.tqreplace( "%device", TQString( options.m_picID ).remove("P") );
+ command.tqreplace( "%file", KProcess::quote( options.inputFiles().first() ) );
m_languageProcess->setUseShell( true );
*m_languageProcess << command;
@@ -401,15 +401,15 @@ void PicProgrammer::processInput( ProcessOptions options )
}
-bool PicProgrammer::isError( const QString &message ) const
+bool PicProgrammer::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool PicProgrammer::isWarning( const QString &message ) const
+bool PicProgrammer::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
diff --git a/src/languages/picprogrammer.h b/src/languages/picprogrammer.h
index 580cf6b..1c5f406 100644
--- a/src/languages/picprogrammer.h
+++ b/src/languages/picprogrammer.h
@@ -28,18 +28,18 @@ class ProgrammerConfig
*/
void reset();
- QString initCommand;
- QString readCommand;
- QString writeCommand;
- QString verifyCommand;
- QString blankCheckCommand;
- QString eraseCommand;
+ TQString initCommand;
+ TQString readCommand;
+ TQString writeCommand;
+ TQString verifyCommand;
+ TQString blankCheckCommand;
+ TQString eraseCommand;
- QString description;
- QString executable; // The name of the program executable
+ TQString description;
+ TQString executable; // The name of the program executable
};
-typedef QMap< QString, ProgrammerConfig > ProgrammerConfigMap;
+typedef TQMap< TQString, ProgrammerConfig > ProgrammerConfigMap;
@@ -72,26 +72,26 @@ class PicProgrammerSettings
* created. The name is case insensitive (although the full case of the
* name will be stored if a new ProgrammerConfig is created).
*/
- ProgrammerConfig config( const QString & name );
+ ProgrammerConfig config( const TQString & name );
/**
* Removes the config (if it is custom) with the give name.
*/
- void removeConfig( const QString & name );
+ void removeConfig( const TQString & name );
/**
* Sets the ProgrammerConfig with the given name (or creates one if no
* such config exists). The name is case insensitive.
*/
- void saveConfig( const QString & name, const ProgrammerConfig & config );
+ void saveConfig( const TQString & name, const ProgrammerConfig & config );
/**
* @param makeLowercase whether the names should be converted to
* lowercase before returning.
* @return a list of names of the custom and predefined configs.
*/
- QStringList configNames( bool makeLowercase ) const;
+ TQStringList configNames( bool makeLowercase ) const;
/**
* @return whether the given config is predefined.
*/
- bool isPredefined( const QString & name ) const;
+ bool isPredefined( const TQString & name ) const;
protected:
/**
@@ -113,15 +113,15 @@ class PicProgrammerSettings
class PicProgrammer : public ExternalLanguage
{
public:
- PicProgrammer( ProcessChain *processChain, KTechlab *parent );
+ PicProgrammer( ProcessChain *processChain, KTechlab *tqparent );
~PicProgrammer();
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
};
#endif
diff --git a/src/languages/processchain.cpp b/src/languages/processchain.cpp
index e17c6ae..129c74e 100644
--- a/src/languages/processchain.cpp
+++ b/src/languages/processchain.cpp
@@ -31,13 +31,13 @@
#include <kdebug.h>
#include <klocale.h>
#include <ktempfile.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
//BEGIN class ProcessChain
ProcessChain::ProcessChain( ProcessOptions options, KTechlab * ktechlab, const char *name )
- : QObject( (QObject*)ktechlab, name)
+ : TQObject( (TQObject*)ktechlab, name)
{
m_pKTechlab = ktechlab;
m_pFlowCode = 0l;
@@ -50,14 +50,14 @@ ProcessChain::ProcessChain( ProcessOptions options, KTechlab * ktechlab, const c
m_pSDCC = 0l;
m_processOptions = options;
- QString target;
+ TQString target;
if ( ProcessOptions::ProcessPath::to( options.processPath() ) == ProcessOptions::ProcessPath::Pic )
target = options.m_picID;
else
target = options.targetFile();
- LanguageManager::self()->logView()->addOutput( i18n("Building: %1").arg( target ), LogView::ot_important );
- QTimer::singleShot( 0, this, SLOT(compile()) );
+ LanguageManager::self()->logView()->addOutput( i18n("Building: %1").tqarg( target ), LogView::ot_important );
+ TQTimer::singleShot( 0, this, TQT_SLOT(compile()) );
}
@@ -100,7 +100,7 @@ void ProcessChain::compile()
switch ( m_processOptions.processPath() )
{
#define DIRECT_PROCESS( path, processor ) case ProcessOptions::ProcessPath::path: { processor()->processInput(m_processOptions); break; }
-#define INDIRECT_PROCESS( path, processor, extension ) case ProcessOptions::ProcessPath::path: { KTempFile f( QString::null, extension ); f.close(); m_processOptions.setIntermediaryOutput( f.name() ); processor()->processInput(m_processOptions); break; }
+#define INDIRECT_PROCESS( path, processor, extension ) case ProcessOptions::ProcessPath::path: { KTempFile f( TQString(), extension ); f.close(); m_processOptions.setIntermediaryOutput( f.name() ); processor()->processInput(m_processOptions); break; }
INDIRECT_PROCESS( AssemblyAbsolute_PIC, gpasm, ".hex" )
DIRECT_PROCESS( AssemblyAbsolute_Program, gpasm )
@@ -178,8 +178,8 @@ void ProcessChain::slotFinishedCompile(Language *language)
if ( !editor )
break;
- QString text;
- QFile f( options.targetFile() );
+ TQString text;
+ TQFile f( options.targetFile() );
if ( !f.open( IO_ReadOnly ) )
{
editor->deleteLater();
@@ -187,7 +187,7 @@ void ProcessChain::slotFinishedCompile(Language *language)
break;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while ( !stream.atEnd() )
text += stream.readLine()+'\n';
@@ -267,8 +267,8 @@ a * ProcessChain::b( ) \
if ( !c ) \
{ \
c = new a( this, m_pKTechlab ); \
- connect( c, SIGNAL(processSucceeded(Language* )), this, SLOT(slotFinishedCompile(Language* )) ); \
- connect( c, SIGNAL(processFailed(Language* )), this, SIGNAL(failed()) ); \
+ connect( c, TQT_SIGNAL(processSucceeded(Language* )), this, TQT_SLOT(slotFinishedCompile(Language* )) ); \
+ connect( c, TQT_SIGNAL(processFailed(Language* )), this, TQT_SIGNAL(failed()) ); \
} \
return c; \
}
@@ -286,11 +286,11 @@ LanguageFunction( SDCC, sdcc, m_pSDCC )
//BEGIN class ProcessListChain
-ProcessListChain::ProcessListChain( ProcessOptionsList pol, KTechlab * parent, const char * name )
- : QObject( (QObject*)parent, name )
+ProcessListChain::ProcessListChain( ProcessOptionsList pol, KTechlab * tqparent, const char * name )
+ : TQObject( (TQObject*)tqparent, name )
{
m_processOptionsList = pol;
- m_pKTechlab = parent;
+ m_pKTechlab = tqparent;
// Start us off...
slotProcessChainSuccessful();
@@ -311,8 +311,8 @@ void ProcessListChain::slotProcessChainSuccessful()
ProcessChain * pc = LanguageManager::self()->compile(po);
- connect( pc, SIGNAL(successful()), this, SLOT(slotProcessChainSuccessful()) );
- connect( pc, SIGNAL(failed()), this, SLOT(slotProcessChainFailed()) );
+ connect( pc, TQT_SIGNAL(successful()), this, TQT_SLOT(slotProcessChainSuccessful()) );
+ connect( pc, TQT_SIGNAL(failed()), this, TQT_SLOT(slotProcessChainFailed()) );
}
diff --git a/src/languages/processchain.h b/src/languages/processchain.h
index 90b871e..e4a51b4 100644
--- a/src/languages/processchain.h
+++ b/src/languages/processchain.h
@@ -12,8 +12,8 @@
#define PROCESSCHAIN_H
#include "language.h"
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class FlowCode;
class Gpasm;
@@ -26,17 +26,18 @@ class PicProgrammer;
class ProcesOptions;
class SDCC;
-typedef QValueList<ProcessOptions> ProcessOptionsList;
+typedef TQValueList<ProcessOptions> ProcessOptionsList;
/**
@author Daniel Clarke
@author David Saxton
*/
-class ProcessChain : public QObject
+class ProcessChain : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProcessChain( ProcessOptions options, KTechlab *parent, const char *name = 0l );
+ ProcessChain( ProcessOptions options, KTechlab *tqparent, const char *name = 0l );
~ProcessChain();
void setProcessOptions( ProcessOptions options ) { m_processOptions = options; }
@@ -98,12 +99,13 @@ class ProcessChain : public QObject
};
-class ProcessListChain : public QObject
+class ProcessListChain : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProcessListChain( ProcessOptionsList pol, KTechlab *parent, const char *name = 0l );
+ ProcessListChain( ProcessOptionsList pol, KTechlab *tqparent, const char *name = 0l );
signals:
/**
diff --git a/src/languages/sdcc.cpp b/src/languages/sdcc.cpp
index 553e974..881db33 100644
--- a/src/languages/sdcc.cpp
+++ b/src/languages/sdcc.cpp
@@ -20,8 +20,8 @@
#include <kmessagebox.h>
#include <kprocess.h>
-SDCC::SDCC( ProcessChain * processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "SDCC" )
+SDCC::SDCC( ProcessChain * processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "SDCC" )
{
m_successfulMessage = i18n("*** Compilation successful ***");
m_failedMessage = i18n("*** Compilation failed ***");
@@ -40,7 +40,7 @@ void SDCC::processInput( ProcessOptions options )
MicroInfo * info = MicroLibrary::self()->microInfoWithID( options.m_picID );
if (!info)
{
- outputError( i18n("Could not find PIC with ID \"%1\".").arg(options.m_picID) );
+ outputError( i18n("Could not find PIC with ID \"%1\".").tqarg(options.m_picID) );
return;
}
@@ -50,7 +50,7 @@ void SDCC::processInput( ProcessOptions options )
//BEGIN Pass custom sdcc options
-#define ARG(text,option) if ( KTLConfig::text() ) *m_languageProcess << ( QString("--%1").arg(option) );
+#define ARG(text,option) if ( KTLConfig::text() ) *m_languageProcess << ( TQString("--%1").tqarg(option) );
// General
ARG( sDCC_nostdlib, "nostdlib" )
ARG( sDCC_nostdinc, "nostdinc" )
@@ -103,7 +103,7 @@ void SDCC::processInput( ProcessOptions options )
*m_languageProcess << ("--debug"); // Enable debugging symbol output
*m_languageProcess << ("-S"); // Compile only; do not assemble or link
- QString asmSwitch;
+ TQString asmSwitch;
switch ( info->instructionSet()->set() )
{
case AsmInfo::PIC12:
@@ -136,13 +136,13 @@ void SDCC::processInput( ProcessOptions options )
}
-bool SDCC::isError( const QString &message ) const
+bool SDCC::isError( const TQString &message ) const
{
return false;
}
-bool SDCC::isStderrOutputFatal( const QString & message ) const
+bool SDCC::isStderrOutputFatal( const TQString & message ) const
{
if ( message.startsWith("Processor:") )
return false;
@@ -151,7 +151,7 @@ bool SDCC::isStderrOutputFatal( const QString & message ) const
}
-bool SDCC::isWarning( const QString &message ) const
+bool SDCC::isWarning( const TQString &message ) const
{
return false;
}
diff --git a/src/languages/sdcc.h b/src/languages/sdcc.h
index a6de933..b37a5de 100644
--- a/src/languages/sdcc.h
+++ b/src/languages/sdcc.h
@@ -19,16 +19,16 @@
class SDCC : public ExternalLanguage
{
public:
- SDCC( ProcessChain * processChain, KTechlab * parent );
+ SDCC( ProcessChain * processChain, KTechlab * tqparent );
~SDCC();
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString & message ) const;
- virtual bool isWarning( const QString & message ) const;
- virtual bool isStderrOutputFatal( const QString & message ) const;
+ virtual bool isError( const TQString & message ) const;
+ virtual bool isWarning( const TQString & message ) const;
+ virtual bool isStderrOutputFatal( const TQString & message ) const;
};
#endif
diff --git a/src/languages/sourceline.cpp b/src/languages/sourceline.cpp
index 9ca89bb..ad5e03c 100644
--- a/src/languages/sourceline.cpp
+++ b/src/languages/sourceline.cpp
@@ -18,7 +18,7 @@ SourceLine::SourceLine()
}
-SourceLine::SourceLine( const QString & fileName, int line )
+SourceLine::SourceLine( const TQString & fileName, int line )
: m_fileName(fileName),
m_line(line)
{
diff --git a/src/languages/sourceline.h b/src/languages/sourceline.h
index d2e774d..f799141 100644
--- a/src/languages/sourceline.h
+++ b/src/languages/sourceline.h
@@ -11,7 +11,7 @@
#ifndef SOURCELINE_H
#define SOURCELINE_H
-#include <qstring.h>
+#include <tqstring.h>
/**
@author David Saxton
@@ -23,9 +23,9 @@ class SourceLine
* Creates an invalid source line (line is negative).
*/
SourceLine();
- SourceLine( const QString & fileName, int line );
+ SourceLine( const TQString & fileName, int line );
- QString fileName() const { return m_fileName; }
+ TQString fileName() const { return m_fileName; }
int line() const { return m_line; }
bool isValid() const { return m_line >= 0; }
@@ -34,7 +34,7 @@ class SourceLine
bool operator == ( const SourceLine & sourceLine ) const;
protected:
- QString m_fileName;
+ TQString m_fileName;
int m_line;
};