mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-28 21:06:59 -08:00
1 parent
ba3baf3595
commit
f0985ff9d9
5 files changed
+22
No files matched your search
@@ -397,12 +397,18 @@ void MainWindow::databaseTabChanged(int tabIndex)
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
openDatabases.clear();
|
||||
connect(m_ui->tabWidget, SIGNAL(databaseWithFileClosed(QString)), this, SLOT(rememberOpenDatabases(QString)));
|
||||
if (!m_ui->tabWidget->closeAllDatabases()) {
|
||||
event->ignore();
|
||||
}
|
||||
else {
|
||||
event->accept();
|
||||
}
|
||||
disconnect(m_ui->tabWidget, SIGNAL(databaseWithFileClosed(QString)), this, SLOT(rememberOpenDatabases(QString)));
|
||||
if (config()->get("OpenPreviousDatabasesOnStartup").toBool()) {
|
||||
config()->set("OpenDatabasesOnExit", openDatabases);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::showEntryContextMenu(const QPoint& globalPos)
|
||||
@@ -429,3 +435,8 @@ void MainWindow::setShortcut(QAction* action, QKeySequence::StandardKey standard
|
||||
action->setShortcut(QKeySequence(fallback));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::rememberOpenDatabases(QString filePath)
|
||||
{
|
||||
openDatabases.append(filePath);
|
||||
}
|
||||
Reference in new issue
Block a user