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:
committed by
Felix Geyer
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()
|
||||
|
||||
Reference in New Issue
Block a user