aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/TextEdit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widgets/TextEdit.cpp')
-rw-r--r--src/ui/widgets/TextEdit.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/widgets/TextEdit.cpp b/src/ui/widgets/TextEdit.cpp
index 59890465..1373c5d9 100644
--- a/src/ui/widgets/TextEdit.cpp
+++ b/src/ui/widgets/TextEdit.cpp
@@ -33,8 +33,8 @@
#include <vector>
#include "core/GpgModel.h"
-#include "core/function/CacheManager.h"
#include "core/function/GlobalSettingStation.h"
+#include "ui/UISignalStation.h"
#include "ui/struct/CacheObject.h"
namespace GpgFrontend::UI {
@@ -120,8 +120,7 @@ void TextEdit::SlotNewFileTab() {
void TextEdit::SlotOpenFile(const QString& path) {
QFile file(path);
- GF_UI_LOG_DEBUG("main window editor is opening file at path: {}",
- path.toStdString());
+ GF_UI_LOG_DEBUG("main window editor is opening file at path: {}", path);
auto result = file.open(QIODevice::ReadOnly | QIODevice::Text);
if (result) {
auto* page = new PlainTextEditorPage(path);
@@ -511,7 +510,7 @@ QHash<int, QString> TextEdit::UnsavedDocuments() const {
if (ep != nullptr && ep->ReadDone() &&
ep->GetTextPage()->document()->isModified()) {
QString doc_name = tab_widget_->tabText(i);
- GF_UI_LOG_DEBUG("unsaved: {}", doc_name.toStdString());
+ GF_UI_LOG_DEBUG("unsaved: {}", doc_name);
// remove * before name of modified doc
doc_name.remove(0, 2);
@@ -601,6 +600,9 @@ void TextEdit::slot_file_page_path_changed(const QString& path) const {
m_path = t_path;
}
tab_widget_->setTabText(index, m_path);
+
+ emit UISignalStation::GetInstance()->SignalMainWindowlUpdateBasicalOperaMenu(
+ 0);
}
void TextEdit::slot_save_status_to_cache_for_revovery() {