aboutsummaryrefslogtreecommitdiff
path: root/devel/kdevelop/files/patch-post-3.5.8-kdevelop-qmake-scope
diff options
context:
space:
mode:
authorMichael Nottebrock <lofi@FreeBSD.org>2007-10-29 23:48:18 +0000
committerMichael Nottebrock <lofi@FreeBSD.org>2007-10-29 23:48:18 +0000
commitc13a5bcfcd39a60b06331e0e456f81187f336764 (patch)
tree24d87d150c14833a85f8fac72b8a8e53d186d7c8 /devel/kdevelop/files/patch-post-3.5.8-kdevelop-qmake-scope
parent16387cc66d68e7df0f3953c17282a1ba85fc5eb5 (diff)
downloadports-c13a5bcfcd39a60b06331e0e456f81187f336764.tar.gz
ports-c13a5bcfcd39a60b06331e0e456f81187f336764.zip
Notes
Diffstat (limited to 'devel/kdevelop/files/patch-post-3.5.8-kdevelop-qmake-scope')
-rw-r--r--devel/kdevelop/files/patch-post-3.5.8-kdevelop-qmake-scope81
1 files changed, 81 insertions, 0 deletions
diff --git a/devel/kdevelop/files/patch-post-3.5.8-kdevelop-qmake-scope b/devel/kdevelop/files/patch-post-3.5.8-kdevelop-qmake-scope
new file mode 100644
index 000000000000..6869b6b2f44b
--- /dev/null
+++ b/devel/kdevelop/files/patch-post-3.5.8-kdevelop-qmake-scope
@@ -0,0 +1,81 @@
+--- buildtools/qmake/scope.cpp 2007/10/07 14:39:48 722530
++++ buildtools/qmake/scope.cpp 2007/10/11 19:48:00 724231
+@@ -325,13 +325,13 @@
+ return result;
+ }
+
+-void Scope::calcValuesFromStatements( const QString& variable, QStringList& result, bool checkIncParent, QMake::AST* stopHere, bool fetchFromParent ) const
++void Scope::calcValuesFromStatements( const QString& variable, QStringList& result, bool checkIncParent, QMake::AST* stopHere, bool fetchFromParent, bool setDefault ) const
+ {
+ if( !m_root )
+ return;
+
+ /* For variables that we don't know and which are not QT/CONFIG find the default value */
+- if( m_defaultopts
++ if( setDefault && m_defaultopts
+ && m_defaultopts->variables().findIndex(variable) != -1
+ && ( variable == "TEMPLATE" || variable == "QT" || KnownVariables.findIndex(variable) == -1 || variable == "CONFIG" ) )
+ {
+@@ -379,6 +379,42 @@
+ }
+ }
+ }
++ }else if( ast->nodeType() == QMake::AST::IncludeAST )
++ {
++ QMake::IncludeAST* iast = static_cast<QMake::IncludeAST*>(ast);
++ QValueList<unsigned int> l = m_scopes.keys();
++ for( unsigned int i = 0; i < l.count(); ++i )
++ {
++ int num = l[ i ];
++ if( m_scopes.contains( num ) )
++ {
++ Scope* s = m_scopes[num];
++ if( s && s->scopeType() == IncludeScope && s->m_incast == iast )
++ {
++ s->calcValuesFromStatements( variable, result, false, 0, false, false );
++ }
++ }
++ }
++
++ }else if( ast->nodeType() == QMake::AST::ProjectAST )
++ {
++ QMake::ProjectAST* past = static_cast<QMake::ProjectAST*>(ast);
++ if( past->isFunctionScope() || past->isScope() )
++ {
++ QValueList<unsigned int> l = m_scopes.keys();
++ for( unsigned int i = 0; i < l.count(); ++i )
++ {
++ int num = l[ i ];
++ if( m_scopes.contains( num ) )
++ {
++ Scope* s = m_scopes[num];
++ if( s && s->m_root == past && s->m_root->scopedID == past->scopedID )
++ {
++ s->calcValuesFromStatements( variable, result, false, 0, false, false );
++ }
++ }
++ }
++ }
+ }
+ }
+
+--- buildtools/qmake/scope.h 2007/10/07 14:39:48 722530
++++ buildtools/qmake/scope.h 2007/10/11 19:48:00 724231
+@@ -217,7 +217,7 @@
+ // 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 ) const;
++ void calcValuesFromStatements( const QString& variable, QStringList& result, bool, QMake::AST* stopHere = 0, bool fetchFromParent = true, bool setDefault = true ) const;
+
+ // Check wether the two operators are compatible
+ static bool isCompatible( const QString& op1, const QString& op2);
+@@ -255,8 +255,6 @@
+
+ QString replaceWs(QString);
+
+- // All different subscopes of this scope, the key is the "position" at which the scope starts
+- QMap<QString, Scope*> m_subProjects;
+
+ // The "position" inside the parent scope that this scope starts at
+ unsigned int m_num;