From 8992084a9a8d6a0839c086d4dc5be0bd5ea96a02 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 2 Apr 2021 11:15:04 +0200 Subject: [PATCH] Gui: [skip ci] remove MainWindow::showMainWindow() & timer --- src/Gui/MainWindow.cpp | 21 ++++----------------- src/Gui/MainWindow.h | 4 ---- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 603cbc8f83..73956a16f3 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -172,7 +172,6 @@ struct MainWindowP QTimer* actionTimer; QTimer* statusTimer; QTimer* activityTimer; - QTimer* visibleTimer; QMdiArea* mdiArea; QPointer activeView; QSignalMapper* windowMapper; @@ -342,12 +341,6 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f) QClipboard *clipbd = QApplication::clipboard(); connect(clipbd, SIGNAL(dataChanged()), this, SLOT(updateEditorActions())); - // show main window timer - d->visibleTimer = new QTimer(this); - d->visibleTimer->setObjectName(QString::fromLatin1("visibleTimer")); - connect(d->visibleTimer, SIGNAL(timeout()),this, SLOT(showMainWindow())); - d->visibleTimer->setSingleShot(true); - d->windowMapper = new QSignalMapper(this); // connection between workspace, window menu and tab bar @@ -1190,22 +1183,16 @@ void MainWindow::closeEvent (QCloseEvent * e) } } -void MainWindow::showEvent(QShowEvent * /*e*/) +void MainWindow::showEvent(QShowEvent* e) { - // needed for logging std::clog << "Show main window" << std::endl; - d->visibleTimer->start(15000); + QMainWindow::showEvent(e); } -void MainWindow::hideEvent(QHideEvent * /*e*/) +void MainWindow::hideEvent(QHideEvent* e) { - // needed for logging std::clog << "Hide main window" << std::endl; - d->visibleTimer->stop(); -} - -void MainWindow::showMainWindow() -{ + QMainWindow::hideEvent(e); } void MainWindow::processMessages(const QList & msg) diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h index b4c94df325..17d0eb2b94 100644 --- a/src/Gui/MainWindow.h +++ b/src/Gui/MainWindow.h @@ -297,10 +297,6 @@ private Q_SLOTS: * This method gets frequently activated and test the commands if they are still active. */ void _updateActions(); - /** - * \internal - */ - void showMainWindow(); /** * \internal */