forked from qt-creator/qt-creator
QmlJS: Clean up qmljsmodelmanagerinterface.{h|cpp}
Avoid foreach, fix linter warnings, simplify types, apply coding style. Change-Id: I7cec65e775ee14ce60e1e57077e917285d58c152 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -104,7 +104,8 @@ static void setupProjectInfoQmlBundles(ModelManagerInterface::ProjectInfo &proje
|
||||
ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject(
|
||||
Project *project) const
|
||||
{
|
||||
ModelManagerInterface::ProjectInfo projectInfo(project);
|
||||
ModelManagerInterface::ProjectInfo projectInfo;
|
||||
projectInfo.project = project;
|
||||
projectInfo.qmlDumpEnvironment = Utils::Environment::systemEnvironment();
|
||||
Target *activeTarget = nullptr;
|
||||
if (project) {
|
||||
@@ -263,13 +264,15 @@ void ModelManager::updateDefaultProjectInfo()
|
||||
{
|
||||
// needs to be performed in the ui thread
|
||||
Project *currentProject = SessionManager::startupProject();
|
||||
ProjectInfo newDefaultProjectInfo = projectInfo(currentProject,
|
||||
defaultProjectInfoForProject(currentProject));
|
||||
setDefaultProject(projectInfo(currentProject,newDefaultProjectInfo), currentProject);
|
||||
setDefaultProject(containsProject(currentProject)
|
||||
? projectInfo(currentProject)
|
||||
: defaultProjectInfoForProject(currentProject),
|
||||
currentProject);
|
||||
}
|
||||
|
||||
|
||||
void ModelManager::addTaskInternal(QFuture<void> result, const QString &msg, const char *taskId) const
|
||||
void ModelManager::addTaskInternal(const QFuture<void> &result, const QString &msg,
|
||||
const char *taskId) const
|
||||
{
|
||||
ProgressManager::addTask(result, msg, taskId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user