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
528999d5
Commit
528999d5
authored
Oct 26, 2010
by
Christian Kamm
Browse files
qmldump: Ensure path and environment are taken from the same Qt version.
Fixes
f1fb0bdd
. Reviewed-by: Kai Koehne
parent
f1fb0bdd
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmlprojectmanager/qmlproject.cpp
View file @
528999d5
...
...
@@ -131,16 +131,7 @@ void QmlProject::refresh(RefreshOptions options)
QmlJS
::
ModelManagerInterface
::
ProjectInfo
pinfo
(
this
);
pinfo
.
sourceFiles
=
files
();
pinfo
.
importPaths
=
importPaths
();
pinfo
.
qmlDumpPath
=
Qt4ProjectManager
::
QmlDumpTool
::
qmlDumpPath
(
this
);
if
(
activeTarget
())
{
if
(
const
QmlProjectRunConfiguration
*
runConfig
=
qobject_cast
<
QmlProjectRunConfiguration
*>
(
activeTarget
()
->
activeRunConfiguration
()))
{
if
(
runConfig
->
qtVersion
())
{
pinfo
.
qmlDumpEnvironment
=
runConfig
->
qtVersion
()
->
qmlToolsEnvironment
();
}
}
}
Qt4ProjectManager
::
QmlDumpTool
::
pathAndEnvironment
(
this
,
&
pinfo
.
qmlDumpPath
,
&
pinfo
.
qmlDumpEnvironment
);
m_modelManager
->
updateProjectInfo
(
pinfo
);
}
...
...
src/plugins/qt4projectmanager/qmldumptool.cpp
View file @
528999d5
...
...
@@ -272,7 +272,7 @@ QStringList QmlDumpTool::installDirectories(const QString &qtInstallData)
return
directories
;
}
QString
QmlDumpTool
::
qmlDumpPath
(
ProjectExplorer
::
Project
*
project
)
void
QmlDumpTool
::
pathAndEnvironment
(
ProjectExplorer
::
Project
*
project
,
QString
*
dumperPath
,
Utils
::
Environment
*
env
)
{
QString
path
;
...
...
@@ -292,7 +292,7 @@ QString QmlDumpTool::qmlDumpPath(ProjectExplorer::Project *project)
Core
::
ICore
::
instance
()
->
progressManager
()
->
addTask
(
task
,
taskName
,
QLatin1String
(
"Qt4ProjectManager::BuildHelpers"
));
}
return
path
;
return
;
}
if
(
!
path
.
isEmpty
())
{
...
...
@@ -306,7 +306,10 @@ QString QmlDumpTool::qmlDumpPath(ProjectExplorer::Project *project)
}
}
return
path
;
if
(
!
path
.
isEmpty
()
&&
version
&&
dumperPath
&&
env
)
{
*
dumperPath
=
path
;
*
env
=
version
->
qmlToolsEnvironment
();
}
}
}
// namespace Qt4ProjectManager
...
...
src/plugins/qt4projectmanager/qmldumptool.h
View file @
528999d5
...
...
@@ -61,7 +61,7 @@ public:
// Copy the source files to a target location and return the chosen target location.
static
QString
copy
(
const
QString
&
qtInstallData
,
QString
*
errorMessage
);
static
QString
qmlDumpPath
(
ProjectExplorer
::
Project
*
project
);
static
void
pathAndEnvironment
(
ProjectExplorer
::
Project
*
project
,
QString
*
path
,
Utils
::
Environment
*
env
);
private:
static
QStringList
installDirectories
(
const
QString
&
qtInstallData
);
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
528999d5
...
...
@@ -597,10 +597,9 @@ void Qt4Project::updateQmlJSCodeModel()
const
QString
qtVersionImportPath
=
qtVersion
->
versionInfo
().
value
(
"QT_INSTALL_IMPORTS"
);
if
(
!
qtVersionImportPath
.
isEmpty
())
projectInfo
.
importPaths
+=
qtVersionImportPath
;
projectInfo
.
qmlDumpEnvironment
=
qtVersion
->
qmlToolsEnvironment
();
projectInfo
.
qmlDumpPath
=
QmlDumpTool
::
qmlDumpPath
(
this
);
}
}
QmlDumpTool
::
pathAndEnvironment
(
this
,
&
projectInfo
.
qmlDumpPath
,
&
projectInfo
.
qmlDumpEnvironment
);
projectInfo
.
importPaths
.
removeDuplicates
();
modelManager
->
updateProjectInfo
(
projectInfo
);
...
...
Write
Preview
Markdown
is supported
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