Fix minimize at startup and decouple various tray and minimization options (#109)

* Hide window on startup when configured to start minimized, fixes #105
* Decouple different systray and minimization options, fixes #64
* Commit missing changes in main.cpp to minimize at startup

* Remove obsolete code
This commit is contained in:
Janek Bevendorff 2016-11-24 00:15:51 +01:00 committed by Jonathan White
parent 02d2ac904d
commit 19a960856c
7 changed files with 22 additions and 60 deletions

View file

@ -113,12 +113,6 @@ void DatabaseOpenWidget::openDatabase()
if (m_db) {
Q_EMIT editFinished(true);
// this is a c++11 equivalent foreach construct
// if c++11 is not available another iteration loop style is needed!
for (auto widget : qApp->topLevelWidgets()) {
if(widget->inherits("QMainWindow"))
static_cast<MainWindow*>(widget)->configuredMinimizeWindow();
}
}
else {
MessageBox::warning(this, tr("Error"), tr("Unable to open the database.").append("\n")