mirror of
https://git.freebsd.org/ports.git
synced 2025-07-08 04:49:17 -04:00
81 lines
3.5 KiB
Text
81 lines
3.5 KiB
Text
--- 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;
|