From 356db1349fa760b5d687214a14b0b16ab7780e9e Mon Sep 17 00:00:00 2001 From: "royqh1979@gmail.com" Date: Mon, 27 Sep 2021 13:01:01 +0800 Subject: [PATCH] work save --- NEWS.md | 1 + RedPandaIDE/mainwindow.cpp | 18 +++++++++++++++--- RedPandaIDE/mainwindow.h | 2 ++ RedPandaIDE/project.cpp | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index c424e91b..da276eb5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,5 @@ Version 0.2 + - fix : header file completion stop work when input '.' - change: continue to run / debug if there are compiling warnings (but no errors) - enhancement: class browser syntax colors and icons - enhancement: function tips diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 706431c4..c30f113a 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -1445,6 +1445,16 @@ void MainWindow::scanActiveProject(bool parse) }; } +void MainWindow::saveLastOpens() +{ + +} + +void MainWindow::loadLastOpens() +{ + +} + void MainWindow::buildContextMenus() { @@ -2230,14 +2240,16 @@ void MainWindow::closeEvent(QCloseEvent *event) { settings.setLeftPanelOpenned(mLeftPanelOpenned); settings.save(); + if (mProject) { + closeProject(false); + } + if (!mEditorList->closeAll(false)) { event->ignore(); return ; } - if (mProject) { - closeProject(false); - } + mCompilerManager->stopCompile(); mCompilerManager->stopRun(); diff --git a/RedPandaIDE/mainwindow.h b/RedPandaIDE/mainwindow.h index eac9c651..6f3cd66d 100644 --- a/RedPandaIDE/mainwindow.h +++ b/RedPandaIDE/mainwindow.h @@ -154,6 +154,8 @@ private: QWidget* parent, QKeySequence shortcut=QKeySequence()); void scanActiveProject(bool parse=false); + void saveLastOpens(); + void loadLastOpens(); private slots: void onAutoSaveTimeout(); diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index 0cb6183b..a5af8a93 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -1187,7 +1187,7 @@ void Project::doAutoOpen() // 2: // LoadLayout; // Open previous selection // end; - + loadLayout(); } bool Project::fileAlreadyExists(const QString &s)