From 009fa10af30f3f08e7a3ee986c937f82ce00e38a Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 27 Jun 2021 02:32:15 +0800 Subject: Develop File Opera Functions --- src/ui/widgets/EditorPage.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ui/widgets/EditorPage.cpp') diff --git a/src/ui/widgets/EditorPage.cpp b/src/ui/widgets/EditorPage.cpp index cb4ca5ef..8a51b721 100644 --- a/src/ui/widgets/EditorPage.cpp +++ b/src/ui/widgets/EditorPage.cpp @@ -27,7 +27,7 @@ #include EditorPage::EditorPage(QString filePath, QWidget *parent) : QWidget(parent), - fullFilePath(std::move(filePath)) { + fullFilePath(std::move(filePath)) { // Set the Textedit properties textPage = new QTextEdit(); textPage->setAcceptRichText(false); @@ -42,7 +42,7 @@ EditorPage::EditorPage(QString filePath, QWidget *parent) : QWidget(parent), setAttribute(Qt::WA_DeleteOnClose); textPage->setFocus(); - //connect(textPage, SIGNAL(textChanged()), this, SLOT(formatGpgHeader())); + connect(textPage, SIGNAL(textChanged()), this, SLOT(formatGpgHeader())); } const QString &EditorPage::getFilePath() const { @@ -64,11 +64,11 @@ void EditorPage::showNotificationWidget(QWidget *widget, const char *className) void EditorPage::closeNoteByClass(const char *className) { QList widgets = findChildren(); - foreach(QWidget *widget, widgets) { - if (widget->property(className) == true) { - widget->close(); - } + for (QWidget *widget: widgets) { + if (widget->property(className) == true) { + widget->close(); } + } } void EditorPage::slotFormatGpgHeader() { -- cgit v1.2.3