Bug 86941 - $VARIABLE include directories should be in paranthesis
Summary: $VARIABLE include directories should be in paranthesis
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: QMake (show other bugs)
Version: 3.0.3
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Andreas Pakulat
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-10 23:51 UTC by Roland Krause
Modified: 2006-11-22 21:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Krause 2004-08-10 23:51:40 UTC
Version:           3.0.3 (using KDE 3.2.3-6.5.rh90.kde, Red Hat Linux release 9 (Shrike))
Compiler:          gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
OS:                Linux (i686) release 2.4.20-31.9smp

When using the qmake manager and trying to add an include directory that is given through a global shell variable (e.g. $HOME) the line edit autocompletes entries that begin with the $ sign. The problem with this behavior is that, if the user accepts the choice, the variable is added to the Makefile as $HOME but it must be $(HOME). 

The paranthesis must be added. I bet this can be done very quickly.
Comment 1 Andreas Pakulat 2006-11-22 21:16:56 UTC
SVN commit 607017 by apaku:

Really fix replacing Shell variables, we need to add () around not {}

BUG: 86941


 M  +2 -2      scope.cpp  


--- branches/kdevelop/3.4/buildtools/qmake/scope.cpp #607016:607017
@@ -700,8 +700,8 @@
             }else if ( origValues.isEmpty() )
                 origValues.append(" ");
             QString newval = *it;
-            QRegExp re("\\$([^$\\{\\) /]*)( |\\)|/)");
-            newval.replace(re, "${\\1}\\2");
+            QRegExp re("\\$([^$\\(\\)\\{\\} /]*)( |\\)|/)");
+            newval.replace(re, "$(\\1)\\2");
             if( (newval).contains(" ") || (newval).contains("\t") || (newval).contains("\n") )
                 origValues.append( "\""+newval+"\"" );
             else