Skip to content
GitLab
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
7cdb15e7
Commit
7cdb15e7
authored
Feb 05, 2010
by
Oswald Buddenhagen
Browse files
try hard to ensure that feature paths are absolute
parent
76872c6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/proparser/profileevaluator.cpp
View file @
7cdb15e7
...
...
@@ -1077,17 +1077,19 @@ ProItem::ProItemReturn ProFileEvaluator::Private::visitProFile(ProFile *pro)
}
}
if
(
!
qmake_cache
.
isEmpty
())
{
qmake_cache
=
QDir
::
clean
Path
(
qmake_cache
);
qmake_cache
=
resolve
Path
(
qmake_cache
);
QHash
<
QString
,
QStringList
>
cache_valuemap
;
if
(
evaluateFileInto
(
qmake_cache
,
&
cache_valuemap
,
0
))
{
m_option
->
cachefile
=
qmake_cache
;
if
(
m_option
->
qmakespec
.
isEmpty
())
{
const
QStringList
&
vals
=
cache_valuemap
.
value
(
QLatin1String
(
"QMAKESPEC"
));
if
(
!
vals
.
isEmpty
())
m_option
->
qmakespec
=
vals
.
first
();
}
}
else
{
qmake_cache
.
clear
();
}
}
m_option
->
cachefile
=
qmake_cache
;
QStringList
mkspec_roots
=
qmakeMkspecPaths
();
...
...
@@ -1273,16 +1275,13 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() const
QByteArray
mkspec_path
=
qgetenv
(
"QMAKEFEATURES"
);
if
(
!
mkspec_path
.
isEmpty
())
foreach
(
const
QString
&
f
,
QString
::
fromLocal8Bit
(
mkspec_path
).
split
(
m_option
->
dirlist_sep
))
feature_roots
+=
QDir
::
clean
Path
(
f
);
feature_roots
+=
resolve
Path
(
f
);
feature_roots
+=
propertyValue
(
QLatin1String
(
"QMAKEFEATURES"
),
false
).
split
(
m_option
->
dirlist_sep
,
QString
::
SkipEmptyParts
);
if
(
!
m_option
->
cachefile
.
isEmpty
())
{
QString
path
;
int
last_slash
=
m_option
->
cachefile
.
lastIndexOf
((
ushort
)
'/'
);
if
(
last_slash
!=
-
1
)
path
=
m_option
->
cachefile
.
left
(
last_slash
);
QString
path
=
m_option
->
cachefile
.
left
(
m_option
->
cachefile
.
lastIndexOf
((
ushort
)
'/'
));
foreach
(
const
QString
&
concat_it
,
concat
)
feature_roots
<<
(
path
+
concat_it
);
}
...
...
@@ -1291,16 +1290,17 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() const
if
(
!
qmakepath
.
isNull
())
{
const
QStringList
lst
=
QString
::
fromLocal8Bit
(
qmakepath
).
split
(
m_option
->
dirlist_sep
);
foreach
(
const
QString
&
item
,
lst
)
{
QString
citem
=
QDir
::
clean
Path
(
item
);
QString
citem
=
resolve
Path
(
item
);
foreach
(
const
QString
&
concat_it
,
concat
)
feature_roots
<<
(
citem
+
mkspecs_concat
+
concat_it
);
}
}
if
(
!
m_option
->
qmakespec
.
isEmpty
())
{
feature_roots
<<
(
m_option
->
qmakespec
+
features_concat
);
QString
qmakespec
=
resolvePath
(
m_option
->
qmakespec
);
feature_roots
<<
(
qmakespec
+
features_concat
);
QDir
specdir
(
m_option
->
qmakespec
);
QDir
specdir
(
qmakespec
);
while
(
!
specdir
.
isRoot
())
{
if
(
!
specdir
.
cdUp
()
||
specdir
.
isRoot
())
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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