[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kdevelop/3.4/buildtools/qmake
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2006-11-03 16:00:40
Message-ID: 1162569640.942804.25481.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 601554 by apaku:

Fix a bug where SUBDIRS would end up without any spaces (which could happen for other \
variables as well)


 M  +11 -8     projectconfigurationdlg.cpp  
 M  +1 -1      scope.cpp  
 M  +1 -1      scope.h  


--- branches/kdevelop/3.4/buildtools/qmake/projectconfigurationdlg.cpp #601553:601554
@@ -511,16 +511,19 @@
             lvItem = lvItem->itemBelow();
         }
 
-        if ( myProjectItem->scope->isVariableReset( "SUBDIRS" ) )
+        if( values != myProjectItem->scope->variableValues("SUBDIRS") )
         {
-            myProjectItem->scope->removeVariable( "SUBDIRS", "=" );
-            myProjectItem->scope->setEqualOp( "SUBDIRS", values );
+            if ( myProjectItem->scope->isVariableReset( "SUBDIRS" ) )
+            {
+                myProjectItem->scope->removeVariable( "SUBDIRS", "=" );
+                myProjectItem->scope->setEqualOp( "SUBDIRS", values );
+            }
+            else
+            {
+                myProjectItem->scope->removeVariable( "SUBDIRS", "+=" );
+                myProjectItem->scope->setPlusOp( "SUBDIRS", values );
+            }
         }
-        else
-        {
-            myProjectItem->scope->removeVariable( "SUBDIRS", "+=" );
-            myProjectItem->scope->setPlusOp( "SUBDIRS", values );
-        }
     }
 
     // intermediate locations
--- branches/kdevelop/3.4/buildtools/qmake/scope.cpp #601553:601554
@@ -778,7 +778,7 @@
         QMake::AssignmentAST * ast = new QMake::AssignmentAST();
         ast->scopedID = variable;
         ast->op = op;
-        ast->values = values;
+        updateValues( ast->values, values );
         if( scopeType() == ProjectScope )
             ast->setDepth( m_root->depth() );
         else
--- branches/kdevelop/3.4/buildtools/qmake/scope.h #601553:601554
@@ -194,7 +194,7 @@
      * 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, QString indent ); +    void updateValues( QStringList& origValues, const \
QStringList& newValues, bool remove = false, QString indent = "  " );  
     /*
      * Finds an existing variable, returns the end() of the statemenst if it is not \
found


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic