diff --git a/NEWS.md b/NEWS.md index 9233d603..389df751 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,6 +15,7 @@ Red Panda C++ Version 2.12 - fix: File is parsed before editor is fully created. - enhancement: New GAS File in the File Menu - change: rename "New File" to "New C/C++ File" + - change: The default disassemble style of CPU Dialog is "AT&T" now. Red Panda C++ Version 2.11 diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 4dc2c895..13da75e9 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -2044,7 +2044,7 @@ void MainWindow::runExecutable(RunType runType) QStringList binDirs = mProject->binDirs(); QFileInfo execInfo(mProject->executable()); QDateTime execModTime = execInfo.lastModified(); - if (execInfo.exists() && mProject->unitsModifiedSince(execModTime) && + if (execInfo.exists() && mProject->modifiedSince(execModTime) && QMessageBox::question( this, tr("Rebuild Project"), @@ -2153,24 +2153,10 @@ void MainWindow::debug() } return; } - if (mProject->modified() && - QMessageBox::question( - this, - tr("Rebuild Project"), - tr("Project has been modified, do you want to rebuild it?") - ) == QMessageBox::Yes) { - mCompileSuccessionTask=std::make_shared(); - mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug; - mCompileSuccessionTask->execName = mProject->executable(); - mCompileSuccessionTask->isExecutable = true; - mCompileSuccessionTask->binDirs = binDirs; - compile(); - return; - } { QFileInfo execInfo(mProject->executable()); QDateTime execModTime = execInfo.lastModified(); - if (execInfo.exists() && mProject->unitsModifiedSince(execModTime) && + if (execInfo.exists() && mProject->modifiedSince(execModTime) && QMessageBox::question( this, tr("Rebuild Project"), diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index 7ae3e3d2..5f52f0fc 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -188,7 +188,17 @@ bool Project::modified() const // return true; // } // } -// return false; + // return false; +} + +bool Project::modifiedSince(const QDateTime &time) +{ + if (modified()) + return true; + if (unitsModifiedSince(time)) + return true; + QFileInfo info(filename()); + return (info.lastModified()>time); } void Project::open() diff --git a/RedPandaIDE/project.h b/RedPandaIDE/project.h index 579de37f..c3571978 100644 --- a/RedPandaIDE/project.h +++ b/RedPandaIDE/project.h @@ -216,6 +216,7 @@ public: QString makeFileName(); bool unitsModifiedSince(const QDateTime& time); bool modified() const; + bool modifiedSince(const QDateTime& time); void setFileName(QString value); void setModified(bool value); diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 7ea9a806..7deafbe9 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -3983,7 +3983,7 @@ void Settings::Debugger::doLoad() #endif mOnlyShowMono = boolValue("only_show_mono",true); mFontSize = intValue("font_size",14); - mUseIntelStyle = boolValue("use_intel_style",true); + mUseIntelStyle = boolValue("use_intel_style",false); mBlendMode = boolValue("blend_mode",true); mSkipSystemLibraries = boolValue("skip_system_lib",true); mSkipProjectLibraries = boolValue("skip_project_lib",true);