- fix: header file wrongly opened when there are compiler errors
This commit is contained in:
parent
73d578b7e4
commit
721f01f6cb
|
@ -84,7 +84,7 @@ bool FileCompiler::prepareForRebuild()
|
||||||
QString exeName = getCompiledExecutableName(mFilename);
|
QString exeName = getCompiledExecutableName(mFilename);
|
||||||
QFile file(exeName);
|
QFile file(exeName);
|
||||||
|
|
||||||
if (!file.remove()) {
|
if (file.exists() && !file.remove()) {
|
||||||
QFileInfo info(exeName);
|
QFileInfo info(exeName);
|
||||||
throw CompileError(tr("Can't delete the old executable file \"%1\".\n").arg(info.absoluteFilePath()));
|
throw CompileError(tr("Can't delete the old executable file \"%1\".\n").arg(info.absoluteFilePath()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1497,9 +1497,12 @@ void MainWindow::onCompileFinished()
|
||||||
for (int i=0;i<ui->tableIssues->count();i++) {
|
for (int i=0;i<ui->tableIssues->count();i++) {
|
||||||
PCompileIssue issue = ui->tableIssues->issue(i);
|
PCompileIssue issue = ui->tableIssues->issue(i);
|
||||||
if (issue->type == CompileIssueType::Error) {
|
if (issue->type == CompileIssueType::Error) {
|
||||||
|
if (e && e->filename() != issue->filename)
|
||||||
|
continue;
|
||||||
ui->tableIssues->selectRow(i);
|
ui->tableIssues->selectRow(i);
|
||||||
QModelIndex index =ui->tableIssues->model()->index(i,0);
|
QModelIndex index =ui->tableIssues->model()->index(i,0);
|
||||||
emit ui->tableIssues->doubleClicked(index);
|
emit ui->tableIssues->doubleClicked(index);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1507,6 +1510,8 @@ void MainWindow::onCompileFinished()
|
||||||
for (int i=0;i<ui->tableIssues->count();i++) {
|
for (int i=0;i<ui->tableIssues->count();i++) {
|
||||||
PCompileIssue issue = ui->tableIssues->issue(i);
|
PCompileIssue issue = ui->tableIssues->issue(i);
|
||||||
if (issue->type == CompileIssueType::Warning) {
|
if (issue->type == CompileIssueType::Warning) {
|
||||||
|
if (e && e->filename() != issue->filename)
|
||||||
|
continue;
|
||||||
ui->tableIssues->selectRow(i);
|
ui->tableIssues->selectRow(i);
|
||||||
QModelIndex index =ui->tableIssues->model()->index(i,0);
|
QModelIndex index =ui->tableIssues->model()->index(i,0);
|
||||||
emit ui->tableIssues->doubleClicked(index);
|
emit ui->tableIssues->doubleClicked(index);
|
||||||
|
|
Loading…
Reference in New Issue