summaryrefslogtreecommitdiffstats
path: root/lib/cppparser/macro.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cppparser/macro.h')
-rw-r--r--lib/cppparser/macro.h78
1 files changed, 39 insertions, 39 deletions
diff --git a/lib/cppparser/macro.h b/lib/cppparser/macro.h
index 03e76984..e8fe0b9c 100644
--- a/lib/cppparser/macro.h
+++ b/lib/cppparser/macro.h
@@ -15,14 +15,14 @@
#ifndef MACRO_H
#define MACRO_H
-#include <qpair.h>
-#include <qvaluestack.h>
-#include <qstringlist.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qmap.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqpair.h>
+#include <tqvaluestack.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqmap.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#include <map>
#include <set>
#include <hashedstring.h>
@@ -50,12 +50,12 @@ class Problem {
Problem( const Problem& source )
: m_text( source.m_text ), m_line( source.m_line ),
m_column( source.m_column ), m_level( source.m_level ), m_file( source.m_file ) {}
- Problem( const QString& text, int line, int column, int level = Level_Error )
+ Problem( const TQString& text, int line, int column, int level = Level_Error )
: m_text( text ), m_line( line ), m_column( column ), m_level( level ) {}
Problem( const Problem& source, bool /*threadSafeClone*/ )
- : m_text( QString::fromUtf8( source.m_text.utf8().data() ) ), m_line( source.m_line ),
- m_column( source.m_column ), m_level( source.m_level ), m_file( QString::fromUtf8( source.m_file.utf8().data() ) ) {}
+ : m_text( TQString::fromUtf8( source.m_text.utf8().data() ) ), m_line( source.m_line ),
+ m_column( source.m_column ), m_level( source.m_level ), m_file( TQString::fromUtf8( source.m_file.utf8().data() ) ) {}
Problem& operator = ( const Problem& source ) {
m_text = source.m_text;
@@ -66,7 +66,7 @@ class Problem {
return ( *this );
}
- void setFileName( const QString& fileName ) {
+ void setFileName( const TQString& fileName ) {
m_file = fileName;
}
@@ -75,12 +75,12 @@ class Problem {
}
/** Get the filename in which the problem was encountered */
- QString fileName() const {
+ TQString fileName() const {
return m_file;
}
/** Get the text for the problem */
- QString text() const {
+ TQString text() const {
return m_text;
}
/** Get the line number of the problem */
@@ -103,11 +103,11 @@ class Problem {
}
private:
- QString m_text;
+ TQString m_text;
int m_line;
int m_column;
int m_level;
- QString m_file;
+ TQString m_file;
};
@@ -117,11 +117,11 @@ class Problem {
*/
class Macro {
public:
- typedef QString Argument;
+ typedef TQString Argument;
public:
Macro( bool hasArguments = false ) : m_idHashValid( false ), m_valueHashValid( false ), m_line( 0 ), m_column( 0 ), m_hasArguments( hasArguments ), m_isUndefMacro( false ) {}
- Macro( const QString &n, const QString &b ) : m_idHashValid( false ), m_valueHashValid( false ), m_name( n ), m_line( 0 ), m_column( 0 ), m_body( b ), m_hasArguments( false ), m_isUndefMacro( false ) {}
+ Macro( const TQString &n, const TQString &b ) : m_idHashValid( false ), m_valueHashValid( false ), m_name( n ), m_line( 0 ), m_column( 0 ), m_body( b ), m_hasArguments( false ), m_isUndefMacro( false ) {}
//Sorts the macros by their hash-value, then by their name.
struct NameArgCompare {
@@ -173,8 +173,8 @@ class Macro {
return false;
} else {
if( lhs.m_argumentList.count() != rhs.m_argumentList.count() ) return false;
- /*QStringList::const_iterator it2 = rhs.m_argumentList.begin();
- for( QStringList::const_iterator it = lhs.m_argumentList.begin(); it != lhs.m_argumentList.end(); ) {
+ /*TQStringList::const_iterator it2 = rhs.m_argumentList.begin();
+ for( TQStringList::const_iterator it = lhs.m_argumentList.begin(); it != lhs.m_argumentList.end(); ) {
if( *it != *it2 ) return false;
++it;
@@ -227,7 +227,7 @@ class Macro {
m_argumentList == source.m_argumentList && m_isUndefMacro == source.m_isUndefMacro;
}
- void read( QDataStream& stream ) {
+ void read( TQDataStream& stream ) {
Q_INT8 i;
stream >> i; m_idHashValid = i;
stream >> i; m_valueHashValid = i;
@@ -243,7 +243,7 @@ class Macro {
stream >> m_argumentList;
}
- void write( QDataStream& stream ) const {
+ void write( TQDataStream& stream ) const {
Q_INT8 i;
i = m_idHashValid; stream << i;
i = m_valueHashValid; stream << i;
@@ -260,21 +260,21 @@ class Macro {
}
/** Get the name for this macro */
- QString name() const {
+ TQString name() const {
return m_name;
}
/** Set the name for this macro */
- void setName( const QString& name ) {
+ void setName( const TQString& name ) {
m_name = name;
invalidateHash();
}
/** Get the file name that contains this macro */
- QString fileName() const {
+ TQString fileName() const {
return m_fileName;
}
/** Set the file name that contains this macro */
- void setFileName( const QString& fileName ) {
+ void setFileName( const TQString& fileName ) {
m_fileName = fileName;
invalidateHash();
}
@@ -298,11 +298,11 @@ class Macro {
}
/** Get the body of the macro */
- QString body() const {
+ TQString body() const {
return m_body;
}
/** Set the body of the macro */
- void setBody( const QString& body ) {
+ void setBody( const TQString& body ) {
m_body = body;
invalidateHash();
}
@@ -326,7 +326,7 @@ class Macro {
invalidateHash();
}
/** Get a list of arguments passed to this macro */
- QValueList<Argument> argumentList() const {
+ TQValueList<Argument> argumentList() const {
return m_argumentList;
}
@@ -341,7 +341,7 @@ class Macro {
m_argumentList << argument;
}
/** Add a list of arguments to this macro */
- void addArgumentList( const QValueList<Argument>& arguments ) {
+ void addArgumentList( const TQValueList<Argument>& arguments ) {
m_argumentList += arguments;
invalidateHash();
}
@@ -370,7 +370,7 @@ class Macro {
m_valueHash = 27 * ( HashedString::hashString( m_body ) + (m_isUndefMacro ? 1 : 0 ) );
- for( QValueList<Argument>::const_iterator it = m_argumentList.begin(); it != m_argumentList.end(); ++it ) {
+ for( TQValueList<Argument>::const_iterator it = m_argumentList.begin(); it != m_argumentList.end(); ++it ) {
a *= 19;
m_valueHash += a * HashedString::hashString( *it );
}
@@ -383,13 +383,13 @@ class Macro {
mutable size_t m_idHash; //Hash that represents the ids of all macros
mutable size_t m_valueHash; //Hash that represents the values of all macros
- QString m_name;
- QString m_fileName;
+ TQString m_name;
+ TQString m_fileName;
int m_line;
int m_column;
- QString m_body;
+ TQString m_body;
bool m_hasArguments;
- QStringList m_argumentList; //While identification, only the count plays a role, not the values.
+ TQStringList m_argumentList; //While identification, only the count plays a role, not the values.
bool m_isUndefMacro;
friend class NameCompare;
friend class NameArgEqual;
@@ -404,7 +404,7 @@ class MacroSet {
void addMacro( const Macro& macro );
- void read( QDataStream& stream ) {
+ void read( TQDataStream& stream ) {
//stream >> m_idHashValid >> m_idHash >> m_valueHashValid >> m_valueHash;
m_idHashValid = false;
m_valueHashValid = false;
@@ -418,7 +418,7 @@ class MacroSet {
}
}
- void write( QDataStream& stream ) const {
+ void write( TQDataStream& stream ) const {
//stream << m_idHashValid << m_idHash << m_valueHashValid << m_valueHash;
stream << int( m_usedMacros.size() );
for( Macros::const_iterator it = m_usedMacros.begin(); it != m_usedMacros.end(); ++it ) {
@@ -426,9 +426,9 @@ class MacroSet {
}
}
- bool hasMacro( const QString& name ) const;
+ bool hasMacro( const TQString& name ) const;
bool hasMacro( const HashedString& name ) const;
- Macro macro( const QString& name ) const;
+ Macro macro( const TQString& name ) const;
size_t idHash() const;
size_t valueHash() const;