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
Marco Bubke
flatpak-qt-creator
Commits
404186a9
Commit
404186a9
authored
Oct 13, 2010
by
Christian Kamm
Browse files
QmlProject: Tell the code model about the target Qt's import path.
Task-number: QTCREATORBUG-2639 Reviewed-by: Thomas Hartmann
parent
6f41ebaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmlprojectmanager/qmlproject.cpp
View file @
404186a9
...
...
@@ -38,6 +38,7 @@
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/filewatcher.h>
#include <qt4projectmanager/qmldumptool.h>
#include <qt4projectmanager/qtversionmanager.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <QTextStream>
...
...
@@ -171,6 +172,21 @@ QStringList QmlProject::importPaths() const
QStringList
importPaths
;
if
(
m_projectItem
)
importPaths
=
m_projectItem
.
data
()
->
importPaths
();
// add the default import path for the target Qt version
if
(
activeTarget
())
{
const
QmlProjectRunConfiguration
*
runConfig
=
qobject_cast
<
QmlProjectRunConfiguration
*>
(
activeTarget
()
->
activeRunConfiguration
());
if
(
runConfig
)
{
const
Qt4ProjectManager
::
QtVersion
*
qtVersion
=
runConfig
->
qtVersion
();
if
(
qtVersion
&&
qtVersion
->
isValid
())
{
const
QString
qtVersionImportPath
=
qtVersion
->
versionInfo
().
value
(
"QT_INSTALL_IMPORTS"
);
if
(
!
qtVersionImportPath
.
isEmpty
())
importPaths
+=
qtVersionImportPath
;
}
}
}
return
importPaths
;
}
...
...
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