mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Minimize-On-Startup: call configuredMinimizeWindow() function of MainWindow to hide it after database is unlocked
This commit is contained in:
parent
3cf1a16398
commit
9484af5329
@ -21,6 +21,7 @@
|
||||
#include "core/Config.h"
|
||||
#include "core/Database.h"
|
||||
#include "core/FilePath.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/FileDialog.h"
|
||||
#include "gui/MessageBox.h"
|
||||
#include "format/KeePass2Reader.h"
|
||||
@ -117,6 +118,12 @@ 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")
|
||||
|
Loading…
Reference in New Issue
Block a user