diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp
index 906278c92b..31fe34eef2 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp
@@ -54,6 +54,7 @@ DatabaseSettingsWidgetBrowser::DatabaseSettingsWidgetBrowser(QWidget* parent)
connect(m_ui->removeSharedEncryptionKeys, SIGNAL(clicked()), this, SLOT(removeSharedEncryptionKeys()));
connect(m_ui->removeSharedEncryptionKeys, SIGNAL(clicked()), this, SLOT(updateSharedKeyList()));
connect(m_ui->removeStoredPermissions, SIGNAL(clicked()), this, SLOT(removeStoredPermissions()));
+ connect(m_ui->refreshDatabaseID, SIGNAL(clicked()), this, SLOT(refreshDatabaseID()));
}
DatabaseSettingsWidgetBrowser::~DatabaseSettingsWidgetBrowser()
@@ -256,6 +257,22 @@ void DatabaseSettingsWidgetBrowser::convertAttributesToCustomData()
m_browserService.convertAttributesToCustomData(m_db);
}
+void DatabaseSettingsWidgetBrowser::refreshDatabaseID()
+{
+ if (MessageBox::Yes
+ != MessageBox::question(this,
+ tr("Refresh database ID"),
+ tr("Do you really want refresh the database ID?\n"
+ "This is only necessary if your database is a copy of another and the "
+ "browser extension cannot connect."),
+ MessageBox::Yes | MessageBox::Cancel,
+ MessageBox::Cancel)) {
+ return;
+ }
+
+ m_db->rootGroup()->setUuid(QUuid::createUuid());
+}
+
// Updates the shared key list after the list is cleared
void DatabaseSettingsWidgetBrowser::updateSharedKeyList()
{
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h
index d9d9885ca5..c3cc0b1223 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h
@@ -63,6 +63,7 @@ private slots:
void removeSharedEncryptionKeys();
void removeStoredPermissions();
void convertAttributesToCustomData();
+ void refreshDatabaseID();
private:
void updateModel();
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.ui b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.ui
index 34553f97d1..4fcf091e10 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.ui
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.ui
@@ -6,8 +6,8 @@
0
0
- 453
- 374
+ 669
+ 395
@@ -50,53 +50,58 @@
KeePassXC-Browser settings
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- Disconnect all browsers
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Forget all site-specific settings on entries
-
-
-
-
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Move KeePassHTTP attributes to KeePassXC-Browser custom data
+
+
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- Move KeePassHTTP attributes to KeePassXC-Browser custom data
-
-
-
-
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Refresh database root group ID
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Disconnect all browsers
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Forget all site-specific settings on entries
+
+
@@ -106,10 +111,10 @@
Stored keys
-
+
-
-
+
-