summaryrefslogtreecommitdiffstats
path: root/languages/cpp/simpletype.h
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/simpletype.h')
-rw-r--r--languages/cpp/simpletype.h110
1 files changed, 55 insertions, 55 deletions
diff --git a/languages/cpp/simpletype.h b/languages/cpp/simpletype.h
index 3e6f82d3..19fb22cc 100644
--- a/languages/cpp/simpletype.h
+++ b/languages/cpp/simpletype.h
@@ -23,14 +23,14 @@
#include "completiondebug.h"
#include "typedesc.h"
#include "declarationinfo.h"
-#include <qpair.h>
+#include <tqpair.h>
#include "cpp_tags.h"
#include "codemodel.h"
#define NOBACKTRACE
-extern QString globalCurrentFile;
+extern TQString globalCurrentFile;
using namespace CompletionDebug;
using namespace BitHelpers;
@@ -58,10 +58,10 @@ class BuiltinTypes {
///This should be used for checking whether a type is builtin
static bool isBuiltin( const TypeDesc& desc );
///If it is a builtin type this returns a short description of the type
- static QString comment( const TypeDesc& desc );
+ static TQString comment( const TypeDesc& desc );
BuiltinTypes();
private:
- static QMap<QString, QString> m_types;
+ static TQMap<TQString, TQString> m_types;
};
@@ -82,16 +82,16 @@ class SimpleType {
*this = rhs;
}
- SimpleType( const QStringList& scope, const HashedStringSet& files, Repository rep = RepoUndefined ) : m_resolved( false ) {
+ SimpleType( const TQStringList& scope, const HashedStringSet& files, Repository rep = RepoUndefined ) : m_resolved( false ) {
init( scope, files, rep );
}
- SimpleType( const QString& text,const HashedStringSet& files, Repository rep = RepoUndefined ) : m_resolved( false ) {
+ SimpleType( const TQString& text,const HashedStringSet& files, Repository rep = RepoUndefined ) : m_resolved( false ) {
init( splitType( text ), files, rep );
};
SimpleType( Repository rep = RepoUndefined ) : m_resolved( false ) {
- init( QStringList(), HashedStringSet(), rep );
+ init( TQStringList(), HashedStringSet(), rep );
};
SimpleType( SimpleTypeImpl* ip ) : m_type( TypePointer( ip ) ), m_resolved( true ) {}
@@ -132,14 +132,14 @@ class SimpleType {
void makePrivate();
- operator QString() const {
+ operator TQString() const {
return str();
}
///lazily returns the scope
- const QStringList& scope() const;
+ const TQStringList& scope() const;
- const QString str() const;
+ const TQString str() const;
///valid() does not check whether the type was found in some model,
///it just checks whether this theoretically represents a type.
@@ -168,7 +168,7 @@ class SimpleType {
private:
- void init( const QStringList& scope, const HashedStringSet& files, Repository rep );
+ void init( const TQStringList& scope, const HashedStringSet& files, Repository rep );
void resolve( Repository rep = RepoUndefined ) const ;
@@ -201,7 +201,7 @@ class SimpleType {
class SimpleTypeConfiguration {
bool m_invalid;
public:
- SimpleTypeConfiguration( QString currentFileName = "" ) : m_invalid( false ) {
+ SimpleTypeConfiguration( TQString currentFileName = "" ) : m_invalid( false ) {
globalCurrentFile = currentFileName;
dbgState.clearCounter();
}
@@ -231,7 +231,7 @@ class SimpleTypeImpl : public KShared {
public:
typedef KSharedPtr<SimpleTypeImpl> TypePointer;
- SimpleTypeImpl( const QStringList& scope ) : m_resolutionCount( 0 ), m_resolutionFlags( NoFlag ), m_scope( scope ) {
+ SimpleTypeImpl( const TQStringList& scope ) : m_resolutionCount( 0 ), m_resolutionFlags( NoFlag ), m_scope( scope ) {
setScope( m_scope );
checkTemplateParams();
reg();
@@ -250,14 +250,14 @@ class SimpleTypeImpl : public KShared {
};
///Returns the template-specialization-string for classes
- virtual QString specialization() const {
- return QString::null;
+ virtual TQString specialization() const {
+ return TQString::null;
}
class TemplateParamInfo {
public:
struct TemplateParam {
- QString name;
+ TQString name;
TypeDesc def;
TypeDesc value;
int number;
@@ -267,7 +267,7 @@ class SimpleTypeImpl : public KShared {
TemplateParamInfo( ) {}
- bool getParam( TemplateParam& target, QString name ) const;
+ bool getParam( TemplateParam& target, TQString name ) const;
bool getParam( TemplateParam& target, int number ) const;
@@ -278,8 +278,8 @@ class SimpleTypeImpl : public KShared {
int count() const;
private:
- QMap<int, TemplateParam> m_paramsByNumber;
- QMap<QString, TemplateParam> m_paramsByName;
+ TQMap<int, TemplateParam> m_paramsByNumber;
+ TQMap<TQString, TemplateParam> m_paramsByName;
};
int resolutionCount() {
@@ -317,7 +317,7 @@ class SimpleTypeImpl : public KShared {
return false;
};
- virtual QString comment() const {
+ virtual TQString comment() const {
return "";
};
@@ -334,7 +334,7 @@ class SimpleTypeImpl : public KShared {
}
///@todo remove this and use getTemplateParamInfo instead
- virtual const LocateResult findTemplateParam( const QString& /*name*/ ) {
+ virtual const LocateResult findTemplateParam( const TQString& /*name*/ ) {
return LocateResult();
}
@@ -386,10 +386,10 @@ class SimpleTypeImpl : public KShared {
m_resolutionCount = val;
}
#ifndef NOBACKTRACE
- QString create_bt;
+ TQString create_bt;
#endif
- inline QString createInfo() const {
+ inline TQString createInfo() const {
#ifndef NOBACKTRACE
return "\n" + create_bt + "\n";
#endif
@@ -424,15 +424,15 @@ class SimpleTypeImpl : public KShared {
///when the object pointed to changes
virtual void invalidatePrimaryCache( bool onlyNegative = false ) {}
- static QString operatorToString( Operator op );
+ static TQString operatorToString( Operator op );
public:
/*
- operator QString() const {
+ operator TQString() const {
return str();
}
- inline operator QStringList() const {
+ inline operator TQStringList() const {
return m_scope;
}*/
@@ -458,22 +458,22 @@ class SimpleTypeImpl : public KShared {
///returns the scope(including own name) as string
- QString str() const {
+ TQString str() const {
if ( m_scope.isEmpty() )
return "";
return m_scope.join( "::" );
}
///returns the scope(including own name) as string-list
- inline const QStringList& scope() const {
+ inline const TQStringList& scope() const {
return m_scope;
}
///Returns the scope including template-specialization
- QStringList specializedScope() const {
- QStringList ts = m_scope;
+ TQStringList specializedScope() const {
+ TQStringList ts = m_scope;
if( !ts.isEmpty() ) {
- QString s = ts.back() + specialization();
+ TQString s = ts.back() + specialization();
ts.pop_back();
ts.push_back( s );
}
@@ -554,7 +554,7 @@ class SimpleTypeImpl : public KShared {
memberType = NotFound;
}
- QString memberTypeToString() {
+ TQString memberTypeToString() {
switch ( memberType ) {
case Namespace:
return "namespace";
@@ -599,7 +599,7 @@ class SimpleTypeImpl : public KShared {
return memberType != NotFound;
}
- QString name;
+ TQString name;
LocateResult type;
///This member is only filles for variables, typedefs and template-params!
@@ -651,17 +651,17 @@ class SimpleTypeImpl : public KShared {
public:
- LocateResult getFunctionReturnType( QString functionName, QValueList<LocateResult> params = QValueList<LocateResult>() );
+ LocateResult getFunctionReturnType( TQString functionName, TQValueList<LocateResult> params = TQValueList<LocateResult>() );
///Tries to apply the operator and returns the new type. If it fails, it returns an invalid type.
- virtual LocateResult applyOperator( Operator op , QValueList<LocateResult> params = QValueList<LocateResult>() );
+ virtual LocateResult applyOperator( Operator op , TQValueList<LocateResult> params = TQValueList<LocateResult>() );
/** In case of a class, returns all base-types */
- virtual QValueList<LocateResult> getBases();
+ virtual TQValueList<LocateResult> getBases();
- virtual QStringList getBaseStrings() {
- return QStringList();
+ virtual TQStringList getBaseStrings() {
+ return TQStringList();
};
///This pair contains the found type, and additionally the member-information that helped finding the type
@@ -708,8 +708,8 @@ class SimpleTypeImpl : public KShared {
};
///Should return all specializations of a specific class-name
- virtual QValueList<TypePointer> findSpecializations( const QString& name ) {
- return QValueList<TypePointer>();
+ virtual TQValueList<TypePointer> findSpecializations( const TQString& name ) {
+ return TQValueList<TypePointer>();
}
/**TypeDescs and SimpleTypeImpls usually have a cross-reference, which creates a circular dependency so that they are never freed using KShared. This function breaks the loop, and also breaks all other possible dependency-loops. After this function was called, the type still contains its private information, but can not not be used to resolve anything anymore. This function is called automatically while the destruction of SimpleTypeConfiguration */
@@ -727,37 +727,37 @@ class SimpleTypeImpl : public KShared {
TypeDesc& descForEdit();
///short version
- QString fullType() const {
+ TQString fullType() const {
return m_desc.fullName();
}
///Similar to fullTypeResolved, except that it also shows addition information about template-params
- QString describeWithParams() ;
+ TQString describeWithParams() ;
///returns all information that is available constantly
- QString describe() const {
- QString description = m_desc.fullName() + " (" + m_scope.join( "::" ) + ")" + createInfo();
+ TQString describe() const {
+ TQString description = m_desc.fullName() + " (" + m_scope.join( "::" ) + ")" + createInfo();
return description;
}
///this completely evaluates everything
- QString fullTypeResolved( int depth = 0 );
+ TQString fullTypeResolved( int depth = 0 );
///this completely evaluates everything
- QString fullTypeResolvedWithScope( int depth = 0 );
+ TQString fullTypeResolvedWithScope( int depth = 0 );
- QString fullTypeUnresolvedWithScope();
+ TQString fullTypeUnresolvedWithScope();
- virtual QValueList<TypePointer> getMemberClasses( const TypeDesc& name ) {
- return QValueList<TypePointer>();
+ virtual TQValueList<TypePointer> getMemberClasses( const TypeDesc& name ) {
+ return TQValueList<TypePointer>();
}
///Returns the include-file-set used for resolving this type
IncludeFiles getFindIncludeFiles();
private:
- QStringList m_scope;
+ TQStringList m_scope;
TypePointer m_parent;
IncludeFiles m_findIncludeFiles; //Set of include-files used for finding this object
@@ -771,7 +771,7 @@ class SimpleTypeImpl : public KShared {
/** Tries to extract template-parameters from the scope, resets the params-list */
virtual void checkTemplateParams ();
- void setScope( const QStringList& scope );
+ void setScope( const TQStringList& scope );
///Searches the item IN the bases
TypeOfResult searchBases ( const TypeDesc& name );
@@ -786,10 +786,10 @@ class SimpleTypeImpl : public KShared {
class TypeTrace {
- QValueList<QPair< SimpleTypeImpl::MemberInfo, TypeDesc> > m_trace;
+ TQValueList<QPair< SimpleTypeImpl::MemberInfo, TypeDesc> > m_trace;
public:
- QValueList<QPair< SimpleTypeImpl::MemberInfo, TypeDesc> >& trace() {
+ TQValueList<QPair< SimpleTypeImpl::MemberInfo, TypeDesc> >& trace() {
return m_trace;
};
@@ -799,9 +799,9 @@ class TypeTrace {
void prepend( const TypeTrace& trace, int indent = 0 ) {
/* if( indent != 0 ) {
- QString ind;
+ TQString ind;
for( int a = 0; a < indent; a++ ) ind += " ";
- for( QValueList<QPair< SimpleTypeImpl::MemberInfo, TypeDesc> >::const_iterator it = trace.m_trace.end(); it != trace.m_trace.begin(); ) {
+ for( TQValueList<QPair< SimpleTypeImpl::MemberInfo, TypeDesc> >::const_iterator it = trace.m_trace.end(); it != trace.m_trace.begin(); ) {
--it;
QPair<SimpleTypeImpl::MemberInfo, TypeDesc> item = *it;
item.second.prependDecoration( ind );