fix: syntax check issues for new file not correctly parsed

This commit is contained in:
Roy Qu 2022-10-26 08:12:00 +08:00
parent b4fbcbddb0
commit 3cbd323f97
1 changed files with 6 additions and 3 deletions

View File

@ -97,7 +97,7 @@ QString Compiler::getFileNameFromOutputLine(QString &line) {
line=line.trimmed();
if (temp.compare("<stdin>", Qt::CaseInsensitive)==0 ) {
temp = mFilename;
break;
return temp;
}
QFileInfo fileInfo(temp);
@ -113,8 +113,11 @@ QString Compiler::getFileNameFromOutputLine(QString &line) {
break;
}
}
if (!mDirectory.isEmpty()) {
QFileInfo info(temp);
return info.isRelative()?absolutePath(mDirectory,temp):cleanPath(temp);
}
return temp;
}
int Compiler::getLineNumberFromOutputLine(QString &line)