aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/TextEdit.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2024-05-11 17:18:36 +0000
committerGitHub <[email protected]>2024-05-11 17:18:36 +0000
commitf909f2c4c35b187eb165ec5545e35d54c6d92bf3 (patch)
tree428fe9e63ecae6bb93be6f20cd2b1ee9b29ffd8d /src/ui/widgets/TextEdit.cpp
parentMerge pull request #145 from jermanuts/jermanuts-wizard-links-update (diff)
parentfix: remove qt5compat and redirect dll output path of modules (diff)
downloadGpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.tar.gz
GpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.zip
Merge pull request #148 from saturneric/develop
Develop 2.1.3.1
Diffstat (limited to 'src/ui/widgets/TextEdit.cpp')
-rw-r--r--src/ui/widgets/TextEdit.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/widgets/TextEdit.cpp b/src/ui/widgets/TextEdit.cpp
index 1373c5d9..a0dba5f5 100644
--- a/src/ui/widgets/TextEdit.cpp
+++ b/src/ui/widgets/TextEdit.cpp
@@ -34,8 +34,8 @@
#include "core/GpgModel.h"
#include "core/function/GlobalSettingStation.h"
+#include "core/model/CacheObject.h"
#include "ui/UISignalStation.h"
-#include "ui/struct/CacheObject.h"
namespace GpgFrontend::UI {
@@ -261,7 +261,7 @@ void TextEdit::slot_remove_tab(int index) {
*
* If it returns false, the close event should be aborted.
*/
-bool TextEdit::maybe_save_current_tab(bool askToSave) {
+auto TextEdit::maybe_save_current_tab(bool askToSave) -> bool {
PlainTextEditorPage* page = SlotCurPageTextEdit();
// if this page is no textedit, there should be nothing to save
if (page == nullptr) {
@@ -304,8 +304,8 @@ bool TextEdit::maybe_save_current_tab(bool askToSave) {
}
auto TextEdit::MaybeSaveAnyTab() -> bool {
- // get a list of all unsaved documents and their tabids
- QHash<int, QString> unsaved_docs = this->UnsavedDocuments();
+ // get a list of all unsaved documents and their tab ids
+ QHash<int, QString> const unsaved_docs = this->UnsavedDocuments();
/*
* no unsaved documents, so app can be closed
@@ -318,7 +318,7 @@ auto TextEdit::MaybeSaveAnyTab() -> bool {
* and show normal unsaved doc dialog
*/
if (unsaved_docs.size() == 1) {
- int modified_tab = unsaved_docs.keys().at(0);
+ int const modified_tab = unsaved_docs.keys().at(0);
tab_widget_->setCurrentIndex(modified_tab);
return maybe_save_current_tab(true);
}