Gui: [skip ci] remove MainWindow::showMainWindow() & timer

This commit is contained in:
wmayer
2021-04-02 11:15:04 +02:00
parent 50c7ee36bf
commit e7c91d68af
2 changed files with 4 additions and 21 deletions

View File

@@ -172,7 +172,6 @@ struct MainWindowP
QTimer* actionTimer;
QTimer* statusTimer;
QTimer* activityTimer;
QTimer* visibleTimer;
QMdiArea* mdiArea;
QPointer<MDIView> 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<QByteArray> & msg)

View File

@@ -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
*/