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
9891267a
Commit
9891267a
authored
Nov 02, 2009
by
dt
Browse files
This ordering for include directories is more correct
Though likely to be still wrong.
parent
c5427147
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt4project.cpp
View file @
9891267a
...
...
@@ -546,6 +546,8 @@ void Qt4Project::updateCodeModel()
if
(
debug
)
qDebug
()
<<
"Qt4Project::updateCodeModel()"
;
// TODO figure out the correct ordering of #include directories
CppTools
::
CppModelManagerInterface
*
modelmanager
=
ExtensionSystem
::
PluginManager
::
instance
()
->
getObject
<
CppTools
::
CppModelManagerInterface
>
();
...
...
@@ -580,7 +582,7 @@ void Qt4Project::updateCodeModel()
const
QString
newQtIncludePath
=
versionInfo
.
value
(
QLatin1String
(
"QT_INSTALL_HEADERS"
));
const
QString
newQtLibsPath
=
versionInfo
.
value
(
QLatin1String
(
"QT_INSTALL_LIBS"
));
predefinedIncludePaths
.
a
ppend
(
newQtIncludePath
);
predefinedIncludePaths
.
p
re
pend
(
newQtIncludePath
);
QDir
dir
(
newQtIncludePath
);
foreach
(
QFileInfo
info
,
dir
.
entryInfoList
(
QDir
::
Dirs
))
{
const
QString
path
=
info
.
fileName
();
...
...
@@ -588,7 +590,7 @@ void Qt4Project::updateCodeModel()
if
(
path
==
QLatin1String
(
"Qt"
))
continue
;
// skip $QT_INSTALL_HEADERS/Qt. There's no need to include it.
else
if
(
path
.
startsWith
(
QLatin1String
(
"Qt"
))
||
path
==
QLatin1String
(
"phonon"
))
predefinedIncludePaths
.
a
ppend
(
info
.
absoluteFilePath
());
predefinedIncludePaths
.
p
re
pend
(
info
.
absoluteFilePath
());
}
FindQt4ProFiles
findQt4ProFiles
;
...
...
@@ -598,13 +600,13 @@ void Qt4Project::updateCodeModel()
QStringList
allFrameworkPaths
=
predefinedFrameworkPaths
;
#ifdef Q_OS_MAC
allFrameworkPaths
.
a
ppend
(
newQtLibsPath
);
allFrameworkPaths
.
p
re
pend
(
newQtLibsPath
);
// put QtXXX.framework/Headers directories in include path since that qmake's behavior
QDir
frameworkDir
(
newQtLibsPath
);
foreach
(
QFileInfo
info
,
frameworkDir
.
entryInfoList
(
QDir
::
Dirs
))
{
if
(
!
info
.
fileName
().
startsWith
(
QLatin1String
(
"Qt"
)))
continue
;
allIncludePaths
.
a
ppend
(
info
.
absoluteFilePath
()
+
"/Headers"
);
allIncludePaths
.
p
re
pend
(
info
.
absoluteFilePath
()
+
"/Headers"
);
}
#endif
...
...
@@ -641,9 +643,9 @@ void Qt4Project::updateCodeModel()
const
QStringList
proIncludePaths
=
pro
->
variableValue
(
IncludePathVar
);
foreach
(
const
QString
&
includePath
,
proIncludePaths
)
{
if
(
!
allIncludePaths
.
contains
(
includePath
))
allIncludePaths
.
a
ppend
(
includePath
);
allIncludePaths
.
p
re
pend
(
includePath
);
if
(
!
info
.
includes
.
contains
(
includePath
))
info
.
includes
.
a
ppend
(
includePath
);
info
.
includes
.
p
re
pend
(
includePath
);
}
{
// Pkg Config support
...
...
@@ -655,13 +657,13 @@ void Qt4Project::updateCodeModel()
process
.
waitForFinished
();
QString
result
=
process
.
readAllStandardOutput
();
foreach
(
const
QString
&
part
,
result
.
trimmed
().
split
(
' '
,
QString
::
SkipEmptyParts
))
{
info
.
includes
.
a
ppend
(
part
.
mid
(
2
));
// Chop off "-I"
info
.
includes
.
p
re
pend
(
part
.
mid
(
2
));
// Chop off "-I"
}
}
}
// Add mkspec directory
info
.
includes
.
a
ppend
(
qtVersion
(
activeBuildConfiguration
())
->
mkspecPath
());
info
.
includes
.
p
re
pend
(
qtVersion
(
activeBuildConfiguration
())
->
mkspecPath
());
info
.
frameworkPaths
=
allFrameworkPaths
;
...
...
@@ -675,7 +677,7 @@ void Qt4Project::updateCodeModel()
}
// Add mkspec directory
allIncludePaths
.
a
ppend
(
qtVersion
(
activeBuildConfiguration
())
->
mkspecPath
());
allIncludePaths
.
p
re
pend
(
qtVersion
(
activeBuildConfiguration
())
->
mkspecPath
());
// Dump things out
// This is debugging output...
...
...
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