mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Allow selecting any open database in unlock dialog
* Closes #2322 * Show locked databases in tabbed interface in unlock dialog for browser and auto-type workflows. * Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked behind the open dialog.
This commit is contained in:
committed by
Jonathan White
parent
37d29b5e8c
commit
53dcafaa58
@@ -21,7 +21,9 @@
|
||||
#include "core/Global.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QList>
|
||||
#include <QPointer>
|
||||
#include <QTabBar>
|
||||
|
||||
class Database;
|
||||
class DatabaseWidget;
|
||||
@@ -41,11 +43,12 @@ public:
|
||||
};
|
||||
|
||||
explicit DatabaseOpenDialog(QWidget* parent = nullptr);
|
||||
void setFilePath(const QString& filePath);
|
||||
void setTargetDatabaseWidget(DatabaseWidget* dbWidget);
|
||||
void setTarget(DatabaseWidget* dbWidget, const QString& filePath);
|
||||
void addDatabaseTab(DatabaseWidget* dbWidget);
|
||||
void setActiveDatabaseTab(DatabaseWidget* dbWidget);
|
||||
void setIntent(Intent intent);
|
||||
Intent intent() const;
|
||||
QSharedPointer<Database> database();
|
||||
QSharedPointer<Database> database() const;
|
||||
void clearForms();
|
||||
|
||||
signals:
|
||||
@@ -53,11 +56,16 @@ signals:
|
||||
|
||||
public slots:
|
||||
void complete(bool accepted);
|
||||
void tabChanged(int index);
|
||||
|
||||
private:
|
||||
void selectTabOffset(int offset);
|
||||
|
||||
QPointer<DatabaseOpenWidget> m_view;
|
||||
QPointer<QTabBar> m_tabBar;
|
||||
QSharedPointer<Database> m_db;
|
||||
QPointer<DatabaseWidget> m_dbWidget;
|
||||
QList<QPointer<DatabaseWidget>> m_tabDbWidgets;
|
||||
QPointer<DatabaseWidget> m_currentDbWidget;
|
||||
Intent m_intent = Intent::None;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user