- fix: Can't debug project when project is saved after it's compiled.

This commit is contained in:
Roy Qu 2023-03-01 18:46:43 +08:00
parent 68dea2c86a
commit c637ca3e4b
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@ Red Panda C++ Version 2.16
- fix: Project files that not in the project folder is not correctly handled in makefile.
- enhancement: Improve support for function pointer typedefs.
- fix: Can't debug project when project is saved after it's compiled.
Red Panda C++ Version 2.15

View File

@ -2051,7 +2051,7 @@ void MainWindow::runExecutable(RunType runType)
QStringList binDirs = mProject->binDirs();
QFileInfo execInfo(mProject->executable());
QDateTime execModTime = execInfo.lastModified();
if (execInfo.exists() && mProject->modifiedSince(execModTime)) {
if (execInfo.exists() && mProject->unitsModifiedSince(execModTime)) {
//mProject->saveAll();
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
mCompileSuccessionTask->type = CompileSuccessionTaskType::RunNormal;
@ -2166,14 +2166,14 @@ void MainWindow::debug()
{
QFileInfo execInfo(mProject->executable());
QDateTime execModTime = execInfo.lastModified();
if (execInfo.exists() && mProject->modifiedSince(execModTime)) {
if (execInfo.exists() && mProject->unitsModifiedSince(execModTime)) {
//mProject->saveAll();
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
mCompileSuccessionTask->execName=mProject->executable();
mCompileSuccessionTask->isExecutable=true;
mCompileSuccessionTask->binDirs=binDirs;
compile();
compile(true);
return;
}
}