From 4e688a9136794f795ca6c7a46353f881a2669ee6 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 17 May 2024 16:51:34 +0800 Subject: [PATCH] - fix: Shouldn't warn "xxx.s is modifed" when "Generate assembly" is reran. - fix: Shouldn't warn "Makefile is modifed" when "View Makefile" is reran. --- NEWS.md | 2 ++ RedPandaIDE/mainwindow.cpp | 10 ++++++++-- packages/msys/build-mingw.sh | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index eb1d7815..92392793 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ Red Panda C++ Version 3.1 - fix: Can't correctly select in column mode. - fix: Can't correctly parse template parameters that contains "->", like "std::queuevoid>>"; + - fix: Shouldn't warn "xxx.s is modifed" when "Generate assembly" is reran. + - fix: Shouldn't warn "Makefile is modifed" when "View Makefile" is reran. Red Panda C++ Version 3.0 diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 7bcb53b1..92aa1090 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -2298,9 +2298,11 @@ bool MainWindow::compile(bool rebuild, CppCompileType compileType) mCompileSuccessionTask->isExecutable = true; } if (!mCompileSuccessionTask->isExecutable) { - Editor *editor = mEditorList->getOpenedEditorByFilename(mCompileSuccessionTask->execName); - if (editor) + QString targetFileName = QFileInfo(mCompileSuccessionTask->execName).absoluteFilePath(); + Editor *editor = mEditorList->getOpenedEditorByFilename(targetFileName); + if (editor) { mEditorList->closeEditor(editor,false,true); + } } } stretchMessagesPanel(true); @@ -7333,6 +7335,10 @@ void MainWindow::on_actionView_Makefile_triggered() { if (!mProject) return; + Editor *editor = mEditorList->getOpenedEditorByFilename(mProject->makeFileName()); + if (editor) { + mEditorList->closeEditor(editor, false, true); + } prepareProjectForCompile(); mCompilerManager->buildProjectMakefile(mProject); openFile(mProject->makeFileName()); diff --git a/packages/msys/build-mingw.sh b/packages/msys/build-mingw.sh index 4a862f97..d3d5cc4d 100644 --- a/packages/msys/build-mingw.sh +++ b/packages/msys/build-mingw.sh @@ -2,6 +2,8 @@ set -euxo pipefail +ASTYLE_VERSION_TAG="3.4.15" + function fn_print_help() { echo " Usage: packages/msys/build-mingw.sh [-m|--msystem ] [-c|--clean] [-nd|--no-deps] [-t|--target-dir ] @@ -140,7 +142,6 @@ while [[ $# -gt 0 ]]; do esac done -ASTYLE_VERSION_TAG="3.4.14" BUILD_DIR="${TEMP}/redpanda-mingw-${MSYSTEM}-build" ASTYLE_BUILD_DIR="${BUILD_DIR}/astyle" PACKAGE_DIR="${TEMP}/redpanda-mingw-${MSYSTEM}-pkg"