summaryrefslogtreecommitdiffstats
path: root/buildtools/qmake/scope.h
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/qmake/scope.h')
-rw-r--r--buildtools/qmake/scope.h128
1 files changed, 64 insertions, 64 deletions
diff --git a/buildtools/qmake/scope.h b/buildtools/qmake/scope.h
index e8f40eb9..5cc609ce 100644
--- a/buildtools/qmake/scope.h
+++ b/buildtools/qmake/scope.h
@@ -12,9 +12,9 @@
#ifndef _SCOPE_H_
#define _SCOPE_H_
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
#include <set>
#include "qmakeast.h"
@@ -38,68 +38,68 @@ public:
IncludeScope,
InvalidScope
};
- static const QStringList KnownVariables;
- static const QStringList KnownConfigValues;
+ static const TQStringList KnownVariables;
+ static const TQStringList KnownConfigValues;
- Scope( const QMap<QString, QString>& env, const QString &filename, TrollProjectPart* part );
+ Scope( const TQMap<TQString, TQString>& env, const TQString &filename, TrollProjectPart* part );
~Scope();
void saveToFile() const;
// Changing variable values
- void addToPlusOp( const QString& variable, const QStringList& values );
- void removeFromPlusOp( const QString& variable, const QStringList& values );
- void addToMinusOp( const QString& variable, const QStringList& values );
- void removeFromMinusOp( const QString& variable, const QStringList& values );
- void addToEqualOp( const QString& variable, const QStringList& values );
- void removeFromEqualOp( const QString& variable, const QStringList& values );
- void setPlusOp( const QString& variable, const QStringList& values );
- void setEqualOp( const QString& variable, const QStringList& values );
- void setMinusOp( const QString& variable, const QStringList& values );
+ void addToPlusOp( const TQString& variable, const TQStringList& values );
+ void removeFromPlusOp( const TQString& variable, const TQStringList& values );
+ void addToMinusOp( const TQString& variable, const TQStringList& values );
+ void removeFromMinusOp( const TQString& variable, const TQStringList& values );
+ void addToEqualOp( const TQString& variable, const TQStringList& values );
+ void removeFromEqualOp( const TQString& variable, const TQStringList& values );
+ void setPlusOp( const TQString& variable, const TQStringList& values );
+ void setEqualOp( const TQString& variable, const TQStringList& values );
+ void setMinusOp( const TQString& variable, const TQStringList& values );
// Checks wether a line like VAR = exists in this subscope
- bool isVariableReset( const QString& var );
+ bool isVariableReset( const TQString& var );
// Fetch the valuelist for the variable op combination inside this scope
- QStringList variableValuesForOp( const QString& variable, const QString& op ) const;
+ TQStringList variableValuesForOp( const TQString& variable, const TQString& op ) const;
// Fetch the variable values by running over the statements and adding/removing/setting
// as the encountered op's say, begin with the parent projects variableValues list
- QStringList variableValues( const QString& variable, bool checkIncParent = true, bool fetchFromParent = true, bool evaluateSubScopes = false );
+ TQStringList variableValues( const TQString& variable, bool checkIncParent = true, bool fetchFromParent = true, bool evaluateSubScopes = false );
// Remove a variable+Op combination from the scope, if existant
- void removeVariable( const QString& var, const QString& op );
+ void removeVariable( const TQString& var, const TQString& op );
// Getting to know what type of scope this is
ScopeType scopeType() const;
// This returns the function+args, the scopename or the pro/pri file
// depending on the type of scope
- QString scopeName() const;
+ TQString scopeName() const;
// Returns the projectName for this scope, this is equal to the last part of the projectDir()
- QString projectName() const;
+ TQString projectName() const;
// Returns just the filename of this project's .pro file
- QString fileName() const;
+ TQString fileName() const;
// Returns the absolute path of the dir containing the .pro file
- QString projectDir() const;
+ TQString projectDir() const;
// get the parent Scope
Scope* parent() const { return m_parent; }
// Fetching sub-scopes
- const QValueList<Scope*> scopesInOrder() const { return m_scopes.values(); }
+ const TQValueList<Scope*> scopesInOrder() const { return m_scopes.values(); }
// Working on SubScopes
/*
* creates a new function scope at the end of this (Sub-)AST and returns the Scope wrapping it
*/
- Scope* createFunctionScope( const QString& funcName, const QString& args );
+ Scope* createFunctionScope( const TQString& funcName, const TQString& args );
/*
* creates a new simple scope at the end of this (Sub-)AST and returns the Scope wrapping it
*/
- Scope* createSimpleScope( const QString& scopename );
+ Scope* createSimpleScope( const TQString& scopename );
/*
* creates a new function scope at the end of this (Sub-)AST
@@ -107,14 +107,14 @@ public:
* It returns the Scope wrapping the include-AST, the function scope AST
* can be accessed easily using the parent() method.
*/
- Scope* createIncludeScope( const QString& includeFile, bool negate = false );
+ Scope* createIncludeScope( const TQString& includeFile, bool negate = false );
/*
* creates a new subproject in dir (create's dir if necessary)
* If this scope is not a project scope the subproject will be added to this
* Scope only, i.e. it is not seen in the project-files list of subdirs
*/
- Scope* createSubProject( const QString& dir );
+ Scope* createSubProject( const TQString& dir );
/* delete the given function scope */
bool deleteFunctionScope( unsigned int );
@@ -129,38 +129,38 @@ public:
bool isQt4Project() const ;
/* Provide a Map of Custom variables */
- const QMap<unsigned int, QMap<QString, QString> > customVariables() const;
+ const TQMap<unsigned int, TQMap<TQString, TQString> > customVariables() const;
- unsigned int addCustomVariable( const QString& var, const QString& op, const QString& values );
+ unsigned int addCustomVariable( const TQString& var, const TQString& op, const TQString& values );
/* Removes the variable with the given id if it exists */
void removeCustomVariable( unsigned int );
/* Update the values of the variable/operation combo var+op to values */
- void updateCustomVariable( unsigned int, const QString&, const QString& , const QString& );
+ void updateCustomVariable( unsigned int, const TQString&, const TQString& , const TQString& );
- // Checks wether a QStringList contains any values that are not whitespace or \\n
- static bool listIsEmpty( const QStringList& values );
+ // Checks wether a TQStringList contains any values that are not whitespace or \\n
+ static bool listIsEmpty( const TQStringList& values );
/* returns wether this is an enabled subproject or a disabled one */
bool isEnabled() { return m_isEnabled; }
- QStringList cleanStringList(const QStringList& list) const;
+ TQStringList cleanStringList(const TQStringList& list) const;
/* Reload a project scope */
void reloadProject();
/* creates a new disabled Scope child and add SUBDIRS -= dir to this scope */
- Scope* disableSubproject( const QString& );
+ Scope* disableSubproject( const TQString& );
/* return the "position" of this scope in the list of scopes */
unsigned int getNum() { return m_num; }
- QStringList allFiles( const QString& );
+ TQStringList allFiles( const TQString& );
- QString resolveVariables( const QString& ) const;
+ TQString resolveVariables( const TQString& ) const;
- QString findCustomVarForPath( const QString& );
+ TQString findCustomVarForPath( const TQString& );
#ifdef DEBUG
void printTree();
@@ -183,77 +183,77 @@ private:
* if op is -= removes values from any occurence of = and +=
* if op is = removes values frmo any occurence of -=
*/
- void updateVariable( const QString& variable, const QString& op, const QStringList& values, bool removeFromOp );
+ void updateVariable( const TQString& variable, const TQString& op, const TQStringList& values, bool removeFromOp );
/*
* Helper Function to change the origValues list with the values from newValues
* depending on the state of "remove" either adds or removes all entries from newValues
* to origValues if they didn't exist there yet
*/
- void updateValues( QStringList& origValues, const QStringList& newValues, bool remove = false, QString indent = " " );
+ void updateValues( TQStringList& origValues, const TQStringList& newValues, bool remove = false, TQString indent = " " );
/*
* Finds an existing variable, returns the end() of the statemenst if it is not found
*/
- QValueList<QMake::AST*>::iterator findExistingVariable( const QString& variable );
+ TQValueList<QMake::AST*>::iterator findExistingVariable( const TQString& variable );
// Private constructors for easier subscope creation
/*
* just initializes the lists from the scope
*/
- Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, QMake::ProjectAST* root, QMakeDefaultOpts*, TrollProjectPart* part );
+ Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, QMake::ProjectAST* root, QMakeDefaultOpts*, TrollProjectPart* part );
/*
* reads the given filename and parses it. If it doesn't exist creates an empty
* ProjectAST with the given filename
*/
- Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, const QString& filename, TrollProjectPart* part, bool isEnabled = true );
+ Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, const TQString& filename, TrollProjectPart* part, bool isEnabled = true );
/*
* Creates a scope for an include statement, parses the file and initializes the Scope
* Create an empty ProjectAST if the file cannot be found or parsed.
*/
- Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, QMake::IncludeAST* incast, const QString& path, const QString& incfile, QMakeDefaultOpts*, TrollProjectPart* part );
+ Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, QMake::IncludeAST* incast, const TQString& path, const TQString& incfile, QMakeDefaultOpts*, TrollProjectPart* part );
// runs through the statements until stopHere is found (or the end is reached, if stopHere is 0),
// using the given list as startvalue
// Changes the list using the +=, -=, = operations accordingly
- void calcValuesFromStatements( const QString& variable, QStringList& result, bool, QMake::AST* stopHere = 0, bool fetchFromParent = true, bool setDefault = true, bool evaluateSubScopes = false ) const;
+ void calcValuesFromStatements( const TQString& variable, TQStringList& result, bool, QMake::AST* stopHere = 0, bool fetchFromParent = true, bool setDefault = true, bool evaluateSubScopes = false ) const;
// Check wether the two operators are compatible
- static bool isCompatible( const QString& op1, const QString& op2);
+ static bool isCompatible( const TQString& op1, const TQString& op2);
// Check wether the 2 lists are equal, regardless of element order.
- static bool listsEqual(const QStringList& , const QStringList& );
+ static bool listsEqual(const TQStringList& , const TQStringList& );
// Load and Save project files, these only work on ProjectScope's
- bool loadFromFile( const QString& filename );
+ bool loadFromFile( const TQString& filename );
- QString funcScopeKey( QMake::ProjectAST* funcast ) const { return funcast->scopedID + "(" + funcast->args + ")"; }
+ TQString funcScopeKey( QMake::ProjectAST* funcast ) const { return funcast->scopedID + "(" + funcast->args + ")"; }
unsigned int getNextScopeNum() { if( m_scopes.isEmpty() ) return 0; else return (m_scopes.keys().last()+1); }
- QStringList lookupVariable( const QString& var );
+ TQStringList lookupVariable( const TQString& var );
- QStringList resolveVariables( const QStringList&, QMake::AST* = 0 ) const;
- QStringList variableValues( const QString& variable, QMake::AST*, bool fetchFromParent = true ) const;
- QString resolveVariables( const QString& , QMake::AST* ) const;
+ TQStringList resolveVariables( const TQStringList&, QMake::AST* = 0 ) const;
+ TQStringList variableValues( const TQString& variable, QMake::AST*, bool fetchFromParent = true ) const;
+ TQString resolveVariables( const TQString& , QMake::AST* ) const;
// This function determines the currently used String for fileending, it can be \n, \r or \r\n
- QString getLineEndingString() const;
- bool isComment( const QString& ) const;
- bool containsContinue( const QString& ) const;
- void allFiles( const QString&, std::set<QString>& );
+ TQString getLineEndingString() const;
+ bool isComment( const TQString& ) const;
+ bool containsContinue( const TQString& ) const;
+ void allFiles( const TQString&, std::set<TQString>& );
void loadDefaultOpts();
QMake::ProjectAST* m_root;
QMake::IncludeAST* m_incast;
- QMap<unsigned int, QMake::AssignmentAST*> m_customVariables;
- QMap<unsigned int, Scope*> m_scopes;
+ TQMap<unsigned int, QMake::AssignmentAST*> m_customVariables;
+ TQMap<unsigned int, Scope*> m_scopes;
Scope* m_parent;
unsigned int m_maxCustomVarNum;
- QString replaceWs(QString);
+ TQString replaceWs(TQString);
// The "position" inside the parent scope that this scope starts at
@@ -261,8 +261,8 @@ private:
bool m_isEnabled;
TrollProjectPart* m_part;
QMakeDefaultOpts* m_defaultopts;
- QMap<QString, QStringList> m_varCache;
- QMap<QString,QString> m_environment;
+ TQMap<TQString, TQStringList> m_varCache;
+ TQMap<TQString,TQString> m_environment;
#ifdef DEBUG
class PrintAST : QMake::ASTVisitor
@@ -291,10 +291,10 @@ private:
virtual void processInclude( QMake::IncludeAST* a);
- QString replaceWs(QString);
+ TQString replaceWs(TQString);
private:
- QString getIndent();
+ TQString getIndent();
int indent;
};