Skip to content

Commit e4e95c8

Browse files
committed
ProjectManagerPlugin: clear modifications from editors (107)
When refactoring the running executable proces, this code got forgotten. closes #107
1 parent 9ea3120 commit e4e95c8

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/plugins/ProjectManager/ProjectManagerPlg.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,16 +888,16 @@ void ProjectManagerPlugin::do_runExecutable(const ExecutableInfo *info) {
888888
}
889889

890890
void ProjectManagerPlugin::do_runTask(const TaskInfo *task) {
891-
auto kit = getCurrentKit();
892-
auto project = getCurrentConfig();
893891
auto platform = PLATFORM_CURRENT;
894892

895893
if (!task->commands.contains(platform) || task->commands.value(platform).isEmpty()) {
896894
qWarning() << "do_runTask: No valid commands for platform" << platform;
897895
return;
898896
}
899897

898+
auto kit = getCurrentKit();
900899
auto commands = task->commands.value(platform);
900+
auto project = getCurrentConfig();
901901
auto taskCommand = project->expand(commands.join(" && "));
902902
auto workingDirectory = project->expand(task->runDirectory);
903903
auto buildDirectory = project->expand(project->buildDir);
@@ -962,6 +962,14 @@ void ProjectManagerPlugin::runTask_clicked() {
962962
return;
963963
}
964964
}
965+
auto manager = getManager();
966+
auto count = manager->visibleTabs();
967+
for (auto i = size_t(0); i < count; i++) {
968+
auto client = manager->getMdiClient(i);
969+
if (auto editor = dynamic_cast<qmdiEditor *>(client)) {
970+
editor->removeMetaData();
971+
}
972+
}
965973
this->projectIssues->clearAllIssues();
966974
do_runTask(&buildConfig->tasksInfo[selectedTaskIndex]);
967975
}

0 commit comments

Comments
 (0)