Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
a429d7a5
Commit
a429d7a5
authored
Mar 11, 2009
by
Oswald Buddenhagen
Browse files
blow away the -$VAR hack again, now that things Just Work (TM)
parent
1ed3298a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/shared/proparser/profileevaluator.cpp
View file @
a429d7a5
...
...
@@ -781,18 +781,9 @@ bool ProFileEvaluator::Private::visitProValue(ProValue *value)
case
ProVariable
::
RemoveOperator
:
// -=
if
(
!
m_cumulative
)
{
if
(
!
m_skipLevel
)
{
// the insertUnique is a hack for the moment to fix the
// CONFIG -= app_bundle problem on Mac (add it to a variable -CONFIG as was done before)
if
(
removeEach
(
&
m_tempValuemap
,
varName
,
v
)
==
0
)
insertUnique
(
&
m_tempValuemap
,
QString
(
"-%1"
).
arg
(
varName
),
v
);
if
(
removeEach
(
&
m_tempFilevaluemap
[
currentProFile
()],
varName
,
v
)
==
0
)
insertUnique
(
&
m_tempFilevaluemap
[
currentProFile
()],
QString
(
"-%1"
).
arg
(
varName
),
v
);
removeEach
(
&
m_tempValuemap
,
varName
,
v
);
removeEach
(
&
m_tempFilevaluemap
[
currentProFile
()],
varName
,
v
);
}
}
else
if
(
!
m_skipLevel
)
{
// the insertUnique is a hack for the moment to fix the
// CONFIG -= app_bundle problem on Mac (add it to a variable -CONFIG as was done before)
insertUnique
(
&
m_tempValuemap
,
QString
(
"-%1"
).
arg
(
varName
),
v
);
insertUnique
(
&
m_tempFilevaluemap
[
currentProFile
()],
QString
(
"-%1"
).
arg
(
varName
),
v
);
}
else
{
// We are stingy with our values, too.
}
...
...
src/shared/proparser/proparserutils.h
View file @
a429d7a5
...
...
@@ -136,14 +136,12 @@ static void insertUnique(QHash<QString, QStringList> *map,
sl
.
append
(
str
);
}
static
int
removeEach
(
QHash
<
QString
,
QStringList
>
*
map
,
static
void
removeEach
(
QHash
<
QString
,
QStringList
>
*
map
,
const
QString
&
key
,
const
QStringList
&
value
)
{
int
count
=
0
;
QStringList
&
sl
=
(
*
map
)[
key
];
foreach
(
const
QString
&
str
,
value
)
count
+=
sl
.
removeAll
(
str
);
return
count
;
sl
.
removeAll
(
str
);
}
/*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment