From 39ab59836376466817d60b38c53d895dae515211 Mon Sep 17 00:00:00 2001 From: Igor Kushnir Date: Tue, 28 May 2019 15:10:22 +0300 Subject: [PATCH] Reader: clean unused code up closeEvent is accepted by default, so this commit does not change the application behavior. But Qt documentation recommends not relying on the default value as subclasses may choose to clear it in their constructor. --- YACReader/main_window_viewer.cpp | 4 +--- YACReader/main_window_viewer.h | 2 -- YACReader/viewer.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index f4c627fc..fc8295f6 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -1433,8 +1433,6 @@ void MainWindowViewer::newVersion() void MainWindowViewer::closeEvent(QCloseEvent *event) { - Q_UNUSED(event) - if (isClient) sendComic(); @@ -1446,7 +1444,7 @@ void MainWindowViewer::closeEvent(QCloseEvent *event) } conf.setMaximized(isMaximized()); - emit(closed()); + event->accept(); } void MainWindowViewer::openPreviousComic() diff --git a/YACReader/main_window_viewer.h b/YACReader/main_window_viewer.h index b7e96d06..6d230611 100644 --- a/YACReader/main_window_viewer.h +++ b/YACReader/main_window_viewer.h @@ -174,8 +174,6 @@ private: Qt::WindowFlags previousWindowFlags; QPoint previousPos; QSize previousSize; -signals: - void closed(); protected: void closeEvent(QCloseEvent *event) override; diff --git a/YACReader/viewer.h b/YACReader/viewer.h index 5ea6834b..75bc5dc8 100644 --- a/YACReader/viewer.h +++ b/YACReader/viewer.h @@ -172,7 +172,6 @@ private: public: Viewer(QWidget *parent = nullptr); ~Viewer(); - void toggleFullScreen(); const QPixmap *pixmap(); //Comic * getComic(){return comic;} const BookmarksDialog *getBookmarksDialog() { return bd; }