mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-03-16 03:16:05 -04:00
Fix the open recent database menu.
With at least Qt 5.5 the action text is automatically modified from /home/ben/db.kdbx to /&home/ben/db.kdbx So add the path of the database to the action using setData Signed-off-by: Benjamin Robin <dev@benjarobin.fr>
This commit is contained in:
parent
7fa0eddc5f
commit
d84af2def0
@ -222,6 +222,7 @@ void MainWindow::updateLastDatabasesMenu()
|
||||
QStringList lastDatabases = config()->get("LastDatabases", QVariant()).toStringList();
|
||||
Q_FOREACH (const QString& database, lastDatabases) {
|
||||
QAction* action = m_ui->menuRecentDatabases->addAction(database);
|
||||
action->setData(database);
|
||||
m_lastDatabasesActions->addAction(action);
|
||||
}
|
||||
m_ui->menuRecentDatabases->addSeparator();
|
||||
@ -252,7 +253,7 @@ void MainWindow::updateCopyAttributesMenu()
|
||||
|
||||
void MainWindow::openRecentDatabase(QAction* action)
|
||||
{
|
||||
openDatabase(action->text());
|
||||
openDatabase(action->data().toString());
|
||||
}
|
||||
|
||||
void MainWindow::clearLastDatabases()
|
||||
|
Loading…
x
Reference in New Issue
Block a user