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 --- microbe/expression.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'microbe/expression.h') diff --git a/microbe/expression.h b/microbe/expression.h index 9607f16..1e34bb8 100644 --- a/microbe/expression.h +++ b/microbe/expression.h @@ -23,7 +23,7 @@ #include "microbe.h" -#include +#include class PIC14; class BTreeNode; @@ -69,13 +69,13 @@ class Expression * is generated from the expression string; then that tree is traversed * to generate the assembly. */ - void compileExpression( const QString & expression); - void compileConditional( const QString & expression, Code * ifCode, Code * elseCode ); + void compileExpression( const TQString & expression); + void compileConditional( const TQString & expression, Code * ifCode, Code * elseCode ); /** * Returns a *number* rather than evaluating code, and sets isConstant to true * if it the expression evaluated to a constant. */ - QString processConstant( const QString & expr, bool * isConsant ); + TQString processConstant( const TQString & expr, bool * isConsant ); private: PIC14 *m_pic; @@ -86,20 +86,20 @@ class Expression bool isUnaryOp(Operation op); - void expressionValue( QString expression, BTreeBase *tree, BTreeNode *node ); + void expressionValue( TQString expression, BTreeBase *tree, BTreeNode *node ); void doOp( Operation op, BTreeNode *left, BTreeNode *right ); void doUnaryOp( Operation op, BTreeNode *node ); /** * Parses an expression, and generates a tree structure from it. */ - void buildTree( const QString & expression, BTreeBase *tree, BTreeNode *node, int level ); + void buildTree( const TQString & expression, BTreeBase *tree, BTreeNode *node, int level ); - static int findSkipBrackets( const QString & expr, char ch, int startPos = 0); - static int findSkipBrackets( const QString & expr, QString phrase, int startPos = 0); + static int findSkipBrackets( const TQString & expr, char ch, int startPos = 0); + static int findSkipBrackets( const TQString & expr, TQString phrase, int startPos = 0); - QString stripBrackets( QString expression ); + TQString stripBrackets( TQString expression ); - void mistake( Microbe::MistakeType type, const QString & context = 0 ); + void mistake( Microbe::MistakeType type, const TQString & context = 0 ); SourceLine m_sourceLine; @@ -113,8 +113,8 @@ class Expression * 2 = expression that needs evaluating * (maybe not, see enum). */ - ExprType expressionType( const QString & expression ); - static bool isLiteral( const QString &text ); + ExprType expressionType( const TQString & expression ); + static bool isLiteral( const TQString &text ); /** * Normally, only allow numbers upto 255; but for some uses where the * number is not going to be placed in a PIC register (such as when -- cgit v1.2.1