mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -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();
|
QStringList lastDatabases = config()->get("LastDatabases", QVariant()).toStringList();
|
||||||
Q_FOREACH (const QString& database, lastDatabases) {
|
Q_FOREACH (const QString& database, lastDatabases) {
|
||||||
QAction* action = m_ui->menuRecentDatabases->addAction(database);
|
QAction* action = m_ui->menuRecentDatabases->addAction(database);
|
||||||
|
action->setData(database);
|
||||||
m_lastDatabasesActions->addAction(action);
|
m_lastDatabasesActions->addAction(action);
|
||||||
}
|
}
|
||||||
m_ui->menuRecentDatabases->addSeparator();
|
m_ui->menuRecentDatabases->addSeparator();
|
||||||
@ -252,7 +253,7 @@ void MainWindow::updateCopyAttributesMenu()
|
|||||||
|
|
||||||
void MainWindow::openRecentDatabase(QAction* action)
|
void MainWindow::openRecentDatabase(QAction* action)
|
||||||
{
|
{
|
||||||
openDatabase(action->text());
|
openDatabase(action->data().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::clearLastDatabases()
|
void MainWindow::clearLastDatabases()
|
||||||
|
Loading…
Reference in New Issue
Block a user