diff --git a/share/translations/keepassxc_en.ts b/share/translations/keepassxc_en.ts
index 31117b206..a2cc594a5 100644
--- a/share/translations/keepassxc_en.ts
+++ b/share/translations/keepassxc_en.ts
@@ -1599,14 +1599,6 @@ To prevent this error from appearing, you must go to "Database Settings / S
<p>In addition to a password, you can use a secret file to enhance the security of your database. This file can be generated in your database's security settings.</p><p>This is <strong>not</strong> your *.kdbx database file!</p>
-
- Click to add a key file.
-
-
-
- <a href="#" style="text-decoration: underline">I have a key file</a>
-
- Use hardware key [Serial: %1]
@@ -1639,6 +1631,14 @@ Are you sure you want to continue with this file?.
Refresh Hardware Keys
+
+ Click to add a key file.
+
+
+
+ <a href="#" style="text-decoration: underline">I have a key file</a>
+
+ DatabaseSettingWidgetMetaData
@@ -1673,6 +1673,14 @@ Are you sure you want to continue with this file?.
Maintenance
+
+ KeeShare
+
+
+
+ Secret Service Integration
+
+ Remote Sync
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 472568629..a7b2c052b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -115,6 +115,7 @@ set(keepassx_SOURCES
gui/ApplicationSettingsWidget.cpp
gui/Icons.cpp
gui/SearchWidget.cpp
+ gui/SettingsWidget.cpp
gui/SortFilterHideProxyModel.cpp
gui/SquareSvgWidget.cpp
gui/ShortcutSettingsPage.cpp
@@ -167,7 +168,6 @@ set(keepassx_SOURCES
gui/osutils/OSUtilsBase.cpp
gui/osutils/ScreenLockListener.cpp
gui/osutils/ScreenLockListenerPrivate.cpp
- gui/settings/SettingsWidget.cpp
gui/widgets/ElidedLabel.cpp
gui/widgets/KPToolBar.cpp
gui/widgets/PopupHelpWidget.cpp
diff --git a/src/fdosecrets/CMakeLists.txt b/src/fdosecrets/CMakeLists.txt
index ecdac8dc6..7489debef 100644
--- a/src/fdosecrets/CMakeLists.txt
+++ b/src/fdosecrets/CMakeLists.txt
@@ -9,7 +9,6 @@ if(WITH_XC_FDOSECRETS)
widgets/RowButtonHelper.cpp
# per database settings page
- DatabaseSettingsPageFdoSecrets.cpp
widgets/DatabaseSettingsWidgetFdoSecrets.cpp
# prompt dialog
diff --git a/src/fdosecrets/DatabaseSettingsPageFdoSecrets.cpp b/src/fdosecrets/DatabaseSettingsPageFdoSecrets.cpp
deleted file mode 100644
index 60528a798..000000000
--- a/src/fdosecrets/DatabaseSettingsPageFdoSecrets.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2019 Aetf
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 or (at your option)
- * version 3 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "DatabaseSettingsPageFdoSecrets.h"
-
-#include "fdosecrets/widgets/DatabaseSettingsWidgetFdoSecrets.h"
-
-#include "gui/Icons.h"
-
-QString DatabaseSettingsPageFdoSecrets::name()
-{
- return QObject::tr("Secret Service Integration");
-}
-
-QIcon DatabaseSettingsPageFdoSecrets::icon()
-{
- return icons()->icon(QStringLiteral("freedesktop"));
-}
-
-QWidget* DatabaseSettingsPageFdoSecrets::createWidget()
-{
- return new DatabaseSettingsWidgetFdoSecrets;
-}
-
-void DatabaseSettingsPageFdoSecrets::loadSettings(QWidget* widget, QSharedPointer db)
-{
- auto settingsWidget = qobject_cast(widget);
- settingsWidget->loadSettings(db);
-}
-
-void DatabaseSettingsPageFdoSecrets::saveSettings(QWidget* widget)
-{
- auto settingsWidget = qobject_cast(widget);
- settingsWidget->saveSettings();
-}
diff --git a/src/fdosecrets/DatabaseSettingsPageFdoSecrets.h b/src/fdosecrets/DatabaseSettingsPageFdoSecrets.h
deleted file mode 100644
index c54f5a276..000000000
--- a/src/fdosecrets/DatabaseSettingsPageFdoSecrets.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2019 Aetf
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 or (at your option)
- * version 3 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef KEEPASSXC_DATABASESETTINGSPAGEFDOSECRETS_H
-#define KEEPASSXC_DATABASESETTINGSPAGEFDOSECRETS_H
-
-#include "gui/dbsettings/DatabaseSettingsDialog.h"
-
-class DatabaseSettingsPageFdoSecrets : public IDatabaseSettingsPage
-{
- Q_DISABLE_COPY(DatabaseSettingsPageFdoSecrets)
-public:
- DatabaseSettingsPageFdoSecrets() = default;
-
- QString name() override;
- QIcon icon() override;
- QWidget* createWidget() override;
- void loadSettings(QWidget* widget, QSharedPointer db) override;
- void saveSettings(QWidget* widget) override;
-};
-
-#endif // KEEPASSXC_DATABASESETTINGSPAGEFDOSECRETS_H
diff --git a/src/gui/ApplicationSettingsWidget.cpp b/src/gui/ApplicationSettingsWidget.cpp
index 81be47ff6..8eab3032c 100644
--- a/src/gui/ApplicationSettingsWidget.cpp
+++ b/src/gui/ApplicationSettingsWidget.cpp
@@ -34,6 +34,9 @@
#include "FileDialog.h"
#include "MessageBox.h"
+#ifdef WITH_XC_BROWSER
+#include "browser/BrowserSettingsPage.h"
+#endif
class ApplicationSettingsWidget::ExtraPage
{
@@ -97,6 +100,9 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent)
m_generalUi->setupUi(m_generalWidget);
addPage(tr("General"), icons()->icon("preferences-other"), m_generalWidget);
addPage(tr("Security"), icons()->icon("security-high"), m_secWidget);
+#ifdef WITH_XC_BROWSER
+ addSettingsPage(new BrowserSettingsPage());
+#endif
if (!autoType()->isAvailable()) {
m_generalUi->generalSettingsTabWidget->removeTab(1);
diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp
index 7a7bec10b..57ea6f4fb 100644
--- a/src/gui/MainWindow.cpp
+++ b/src/gui/MainWindow.cpp
@@ -72,7 +72,6 @@
#ifdef WITH_XC_BROWSER
#include "browser/BrowserService.h"
-#include "browser/BrowserSettingsPage.h"
#endif
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && !defined(QT_NO_DBUS)
@@ -222,7 +221,6 @@ MainWindow::MainWindow()
m_ui->settingsWidget->addSettingsPage(new ShortcutSettingsPage());
#ifdef WITH_XC_BROWSER
- m_ui->settingsWidget->addSettingsPage(new BrowserSettingsPage());
connect(
browserService(), &BrowserService::requestUnlock, m_ui->tabWidget, &DatabaseTabWidget::performBrowserUnlock);
#endif
diff --git a/src/gui/settings/SettingsWidget.cpp b/src/gui/SettingsWidget.cpp
similarity index 88%
rename from src/gui/settings/SettingsWidget.cpp
rename to src/gui/SettingsWidget.cpp
index 7b8d04519..fac3362c6 100644
--- a/src/gui/settings/SettingsWidget.cpp
+++ b/src/gui/SettingsWidget.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@ SettingsWidget::SettingsWidget(QWidget* parent)
{
}
-SettingsWidget::~SettingsWidget() = default;
-
void SettingsWidget::discard()
{
}
diff --git a/src/gui/settings/SettingsWidget.h b/src/gui/SettingsWidget.h
similarity index 91%
rename from src/gui/settings/SettingsWidget.h
rename to src/gui/SettingsWidget.h
index 90d8161df..cdbcf9cbc 100644
--- a/src/gui/settings/SettingsWidget.h
+++ b/src/gui/SettingsWidget.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,8 +31,7 @@ class SettingsWidget : public QWidget
public:
explicit SettingsWidget(QWidget* parent = nullptr);
- Q_DISABLE_COPY(SettingsWidget);
- ~SettingsWidget() override;
+ ~SettingsWidget() override = default;
public slots:
/**
@@ -50,7 +49,7 @@ public slots:
*
* @return true on success, false on failure
*/
- virtual bool save() = 0;
+ virtual bool saveSettings() = 0;
/**
* Discard settings.
@@ -62,6 +61,8 @@ signals:
private:
bool m_advancedMode = false;
+
+ Q_DISABLE_COPY(SettingsWidget);
};
#endif // KEEPASSXC_SETTINGSWIDGET_H
diff --git a/src/gui/dbsettings/DatabaseSettingsDialog.cpp b/src/gui/dbsettings/DatabaseSettingsDialog.cpp
index 4a325ca42..f309e56bd 100644
--- a/src/gui/dbsettings/DatabaseSettingsDialog.cpp
+++ b/src/gui/dbsettings/DatabaseSettingsDialog.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
* Copyright (C) 2012 Felix Geyer
*
* This program is free software: you can redistribute it and/or modify
@@ -17,8 +17,6 @@
*/
#include "DatabaseSettingsDialog.h"
-#include "ui_DatabaseSettingsDialog.h"
-
#include "DatabaseSettingsWidgetDatabaseKey.h"
#include "DatabaseSettingsWidgetEncryption.h"
#include "DatabaseSettingsWidgetGeneral.h"
@@ -28,10 +26,10 @@
#include "../remote/DatabaseSettingsWidgetRemote.h"
#include "DatabaseSettingsWidgetMaintenance.h"
#ifdef WITH_XC_KEESHARE
-#include "keeshare/DatabaseSettingsPageKeeShare.h"
+#include "keeshare/DatabaseSettingsWidgetKeeShare.h"
#endif
#ifdef WITH_XC_FDOSECRETS
-#include "fdosecrets/DatabaseSettingsPageFdoSecrets.h"
+#include "fdosecrets/widgets/DatabaseSettingsWidgetFdoSecrets.h"
#endif
#include "core/Database.h"
@@ -40,50 +38,29 @@
#include
-class DatabaseSettingsDialog::ExtraPage
-{
-public:
- ExtraPage(IDatabaseSettingsPage* page, QWidget* widget)
- : settingsPage(page)
- , widget(widget)
- {
- }
- void loadSettings(QSharedPointer db) const
- {
- settingsPage->loadSettings(widget, db);
- }
- void saveSettings() const
- {
- settingsPage->saveSettings(widget);
- }
-
-private:
- QSharedPointer settingsPage;
- QWidget* widget;
-};
-
DatabaseSettingsDialog::DatabaseSettingsDialog(QWidget* parent)
- : DialogyWidget(parent)
- , m_ui(new Ui::DatabaseSettingsDialog())
+ : EditWidget(parent)
, m_generalWidget(new DatabaseSettingsWidgetGeneral(this))
, m_securityTabWidget(new QTabWidget(this))
, m_databaseKeyWidget(new DatabaseSettingsWidgetDatabaseKey(this))
, m_encryptionWidget(new DatabaseSettingsWidgetEncryption(this))
#ifdef WITH_XC_BROWSER
, m_browserWidget(new DatabaseSettingsWidgetBrowser(this))
+#endif
+#ifdef WITH_XC_KEESHARE
+ , m_keeShareWidget(new DatabaseSettingsWidgetKeeShare(this))
+#endif
+#ifdef WITH_XC_FDOSECRETS
+ , m_fdoSecretsWidget(new DatabaseSettingsWidgetFdoSecrets(this))
#endif
, m_maintenanceWidget(new DatabaseSettingsWidgetMaintenance(this))
, m_remoteWidget(new DatabaseSettingsWidgetRemote(this))
{
- m_ui->setupUi(this);
+ connect(this, SIGNAL(accepted()), SLOT(save()));
+ connect(this, SIGNAL(rejected()), SLOT(reject()));
- connect(m_ui->buttonBox, SIGNAL(accepted()), SLOT(save()));
- connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(reject()));
-
- m_ui->categoryList->addCategory(tr("General"), icons()->icon("preferences-other"));
- m_ui->stackedWidget->addWidget(m_generalWidget);
- m_ui->categoryList->addCategory(tr("Security"), icons()->icon("security-high"));
- m_ui->stackedWidget->addWidget(m_securityTabWidget);
+ addPage(tr("General"), icons()->icon("preferences-other"), m_generalWidget);
+ addPage(tr("Security"), icons()->icon("security-high"), m_securityTabWidget);
auto* scrollArea = new QScrollArea(parent);
scrollArea->setFrameShape(QFrame::NoFrame);
@@ -93,106 +70,99 @@ DatabaseSettingsDialog::DatabaseSettingsDialog(QWidget* parent)
scrollArea->setWidgetResizable(true);
scrollArea->setWidget(m_databaseKeyWidget);
+ m_securityTabWidget->setObjectName("securityTabWidget");
m_securityTabWidget->addTab(scrollArea, tr("Database Credentials"));
m_securityTabWidget->addTab(m_encryptionWidget, tr("Encryption Settings"));
+
m_securityTabWidget->setCurrentIndex(0);
- m_ui->categoryList->addCategory(tr("Remote Sync"), icons()->icon("remote-sync"));
- m_ui->stackedWidget->addWidget(m_remoteWidget);
+ addPage(tr("Remote Sync"), icons()->icon("remote-sync"), m_remoteWidget);
#ifdef WITH_XC_BROWSER
- m_ui->categoryList->addCategory(tr("Browser Integration"), icons()->icon("internet-web-browser"));
- m_ui->stackedWidget->addWidget(m_browserWidget);
+ addPage(tr("Browser Integration"), icons()->icon("internet-web-browser"), m_browserWidget);
#endif
#ifdef WITH_XC_KEESHARE
- addSettingsPage(new DatabaseSettingsPageKeeShare());
+ addPage(tr("KeeShare"), icons()->icon("preferences-system-network-sharing"), m_keeShareWidget);
#endif
#ifdef WITH_XC_FDOSECRETS
- addSettingsPage(new DatabaseSettingsPageFdoSecrets());
+ addPage(tr("Secret Service Integration"), icons()->icon(QStringLiteral("freedesktop")), m_fdoSecretsWidget);
#endif
- m_ui->categoryList->addCategory(tr("Maintenance"), icons()->icon("hammer-wrench"));
- m_ui->stackedWidget->addWidget(m_maintenanceWidget);
+ addPage(tr("Maintenance"), icons()->icon("hammer-wrench"), m_maintenanceWidget);
- m_ui->stackedWidget->setCurrentIndex(0);
- connect(m_ui->categoryList, SIGNAL(categoryChanged(int)), m_ui->stackedWidget, SLOT(setCurrentIndex(int)));
+ setCurrentPage(0);
}
DatabaseSettingsDialog::~DatabaseSettingsDialog() = default;
void DatabaseSettingsDialog::load(const QSharedPointer& db)
{
- m_ui->categoryList->setCurrentCategory(0);
- m_generalWidget->load(db);
- m_databaseKeyWidget->load(db);
- m_encryptionWidget->load(db);
+ m_generalWidget->loadSettings(db);
+ m_databaseKeyWidget->loadSettings(db);
+ m_encryptionWidget->loadSettings(db);
+ m_remoteWidget->loadSettings(db);
#ifdef WITH_XC_BROWSER
- m_browserWidget->load(db);
+ m_browserWidget->loadSettings(db);
#endif
- m_maintenanceWidget->load(db);
- m_remoteWidget->load(db);
- for (const ExtraPage& page : asConst(m_extraPages)) {
- page.loadSettings(db);
- }
- m_db = db;
-}
+#ifdef WITH_XC_KEESHARE
+ m_keeShareWidget->loadSettings(db);
+#endif
+#ifdef WITH_XC_FDOSECRETS
+ m_fdoSecretsWidget->loadSettings(db);
+#endif
+ m_maintenanceWidget->loadSettings(db);
-void DatabaseSettingsDialog::addSettingsPage(IDatabaseSettingsPage* page)
-{
- const int category = m_ui->categoryList->currentCategory();
- QWidget* widget = page->createWidget();
- widget->setParent(this);
- m_extraPages.append(ExtraPage(page, widget));
- m_ui->stackedWidget->addWidget(widget);
- m_ui->categoryList->addCategory(page->name(), page->icon());
- m_ui->categoryList->setCurrentCategory(category);
+ m_db = db;
}
/**
* Show page and tab with database database key settings.
*/
-void DatabaseSettingsDialog::showDatabaseKeySettings()
+void DatabaseSettingsDialog::showDatabaseKeySettings(int index)
{
- m_ui->categoryList->setCurrentCategory(1);
- m_securityTabWidget->setCurrentIndex(0);
+ setCurrentPage(1);
+ m_securityTabWidget->setCurrentIndex(index);
}
void DatabaseSettingsDialog::showRemoteSettings()
{
- m_ui->categoryList->setCurrentCategory(2);
+ setCurrentPage(2);
}
void DatabaseSettingsDialog::save()
{
- if (!m_generalWidget->save()) {
- m_ui->categoryList->setCurrentCategory(0);
+ if (!m_generalWidget->saveSettings()) {
+ setCurrentPage(0);
return;
}
- if (!m_databaseKeyWidget->save()) {
- m_ui->categoryList->setCurrentCategory(1);
+ if (!m_databaseKeyWidget->saveSettings()) {
+ setCurrentPage(1);
m_securityTabWidget->setCurrentIndex(0);
return;
}
- if (!m_encryptionWidget->save()) {
- m_ui->categoryList->setCurrentCategory(1);
+ if (!m_encryptionWidget->saveSettings()) {
+ setCurrentPage(1);
m_securityTabWidget->setCurrentIndex(1);
return;
}
- if (!m_remoteWidget->save()) {
- m_ui->categoryList->setCurrentCategory(2);
+ if (!m_remoteWidget->saveSettings()) {
+ setCurrentPage(2);
return;
}
// Browser settings don't have anything to save
- for (const ExtraPage& extraPage : asConst(m_extraPages)) {
- extraPage.saveSettings();
- }
+#ifdef WITH_XC_KEESHARE
+ m_keeShareWidget->saveSettings();
+#endif
+#ifdef WITH_XC_FDOSECRETS
+ m_fdoSecretsWidget->saveSettings();
+#endif
emit editFinished(true);
}
diff --git a/src/gui/dbsettings/DatabaseSettingsDialog.h b/src/gui/dbsettings/DatabaseSettingsDialog.h
index a7772f329..83bc56abe 100644
--- a/src/gui/dbsettings/DatabaseSettingsDialog.h
+++ b/src/gui/dbsettings/DatabaseSettingsDialog.h
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2023 KeePassXC Team
* Copyright (C) 2012 Felix Geyer
*
* This program is free software: you can redistribute it and/or modify
@@ -15,11 +16,11 @@
* along with this program. If not, see .
*/
-#ifndef KEEPASSX_DATABASESETTINGSWIDGET_H
-#define KEEPASSX_DATABASESETTINGSWIDGET_H
+#ifndef KEEPASSXC_DATABASESETTINGSDIALOG_H
+#define KEEPASSXC_DATABASESETTINGSDIALOG_H
#include "config-keepassx.h"
-#include "gui/DialogyWidget.h"
+#include "gui/EditWidget.h"
#include
@@ -30,27 +31,17 @@ class DatabaseSettingsWidgetDatabaseKey;
#ifdef WITH_XC_BROWSER
class DatabaseSettingsWidgetBrowser;
#endif
+#ifdef WITH_XC_KEESHARE
+class DatabaseSettingsWidgetKeeShare;
+#endif
+#ifdef WITH_XC_FDOSECRETS
+class DatabaseSettingsWidgetFdoSecrets;
+#endif
class DatabaseSettingsWidgetMaintenance;
class DatabaseSettingsWidgetRemote;
class QTabWidget;
-namespace Ui
-{
- class DatabaseSettingsDialog;
-}
-
-class IDatabaseSettingsPage
-{
-public:
- virtual ~IDatabaseSettingsPage() = default;
- virtual QString name() = 0;
- virtual QIcon icon() = 0;
- virtual QWidget* createWidget() = 0;
- virtual void loadSettings(QWidget* widget, QSharedPointer db) = 0;
- virtual void saveSettings(QWidget* widget) = 0;
-};
-
-class DatabaseSettingsDialog : public DialogyWidget
+class DatabaseSettingsDialog : public EditWidget
{
Q_OBJECT
@@ -60,8 +51,7 @@ public:
Q_DISABLE_COPY(DatabaseSettingsDialog);
void load(const QSharedPointer& db);
- void addSettingsPage(IDatabaseSettingsPage* page);
- void showDatabaseKeySettings();
+ void showDatabaseKeySettings(int index = 0);
void showRemoteSettings();
signals:
@@ -72,26 +62,22 @@ private slots:
void reject();
private:
- enum Page
- {
- General = 0,
- Security = 1
- };
-
QSharedPointer m_db;
- const QScopedPointer m_ui;
QPointer m_generalWidget;
QPointer m_securityTabWidget;
QPointer m_databaseKeyWidget;
QPointer m_encryptionWidget;
#ifdef WITH_XC_BROWSER
QPointer m_browserWidget;
+#endif
+#ifdef WITH_XC_KEESHARE
+ QPointer m_keeShareWidget;
+#endif
+#ifdef WITH_XC_FDOSECRETS
+ QPointer m_fdoSecretsWidget;
#endif
QPointer m_maintenanceWidget;
QPointer m_remoteWidget;
-
- class ExtraPage;
- QList m_extraPages;
};
-#endif // KEEPASSX_DATABASESETTINGSWIDGET_H
+#endif // KEEPASSXC_DATABASESETTINGSDIALOG_H
diff --git a/src/gui/dbsettings/DatabaseSettingsDialog.ui b/src/gui/dbsettings/DatabaseSettingsDialog.ui
deleted file mode 100644
index 16d46646d..000000000
--- a/src/gui/dbsettings/DatabaseSettingsDialog.ui
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- DatabaseSettingsDialog
-
-
-
-
-
-
-
-
-
-
- -1
-
-
-
-
-
-
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
-
-
-
-
-
-
-
- CategoryListWidget
- QWidget
- gui/CategoryListWidget.h
- 1
-
-
-
-
-
diff --git a/src/gui/dbsettings/DatabaseSettingsWidget.cpp b/src/gui/dbsettings/DatabaseSettingsWidget.cpp
index 5c300f868..99d6fff11 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidget.cpp
+++ b/src/gui/dbsettings/DatabaseSettingsWidget.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ DatabaseSettingsWidget::~DatabaseSettingsWidget() = default;
*
* @param db database object to be configured
*/
-void DatabaseSettingsWidget::load(QSharedPointer db)
+void DatabaseSettingsWidget::loadSettings(QSharedPointer db)
{
m_db = std::move(db);
initialize();
diff --git a/src/gui/dbsettings/DatabaseSettingsWidget.h b/src/gui/dbsettings/DatabaseSettingsWidget.h
index 243245138..89c048a8d 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidget.h
+++ b/src/gui/dbsettings/DatabaseSettingsWidget.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
#ifndef KEEPASSXC_DATABASESETTINGSWIDGET_H
#define KEEPASSXC_DATABASESETTINGSWIDGET_H
-#include "gui/settings/SettingsWidget.h"
+#include "gui/SettingsWidget.h"
class Database;
@@ -34,7 +34,7 @@ public:
Q_DISABLE_COPY(DatabaseSettingsWidget);
~DatabaseSettingsWidget() override;
- virtual void load(QSharedPointer db);
+ virtual void loadSettings(QSharedPointer db);
const QSharedPointer getDatabase() const;
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp
index 0dbdf3ae6..7be217710 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp
@@ -82,7 +82,7 @@ void DatabaseSettingsWidgetBrowser::showEvent(QShowEvent* event)
QWidget::showEvent(event);
}
-bool DatabaseSettingsWidgetBrowser::save()
+bool DatabaseSettingsWidgetBrowser::saveSettings()
{
return true;
}
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h
index 18f00b1e2..e032e414f 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
* Copyright (C) 2018 Sami Vänttinen
*
* This program is free software: you can redistribute it and/or modify
@@ -47,7 +47,7 @@ public:
public slots:
void initialize() override;
void uninitialize() override;
- bool save() override;
+ bool saveSettings() override;
private slots:
void removeSelectedKey();
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp
index f631f021d..18d35af4e 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,10 +46,10 @@ DatabaseSettingsWidgetDatabaseKey::DatabaseSettingsWidgetDatabaseKey(QWidget* pa
vbox->setSizeConstraint(QLayout::SetMinimumSize);
vbox->setSpacing(20);
- // primary password option
+ // Primary password option
vbox->addWidget(m_passwordEditWidget);
- // additional key options
+ // Additional key options
m_additionalKeyOptionsToggle->setObjectName("additionalKeyOptionsToggle");
vbox->addWidget(m_additionalKeyOptionsToggle);
vbox->addWidget(m_additionalKeyOptions);
@@ -71,12 +71,12 @@ DatabaseSettingsWidgetDatabaseKey::DatabaseSettingsWidgetDatabaseKey(QWidget* pa
DatabaseSettingsWidgetDatabaseKey::~DatabaseSettingsWidgetDatabaseKey() = default;
-void DatabaseSettingsWidgetDatabaseKey::load(QSharedPointer db)
+void DatabaseSettingsWidgetDatabaseKey::loadSettings(QSharedPointer db)
{
- DatabaseSettingsWidget::load(db);
+ DatabaseSettingsWidget::loadSettings(db);
if (!m_db->key() || m_db->key()->keys().isEmpty()) {
- // database has no key, we are about to add a new one
+ // Database has no key, we are about to add a new one
m_passwordEditWidget->changeVisiblePage(KeyComponentWidget::Page::Edit);
m_passwordEditWidget->setPasswordVisible(true);
// Focus won't work until the UI settles
@@ -126,7 +126,7 @@ void DatabaseSettingsWidgetDatabaseKey::uninitialize()
{
}
-bool DatabaseSettingsWidgetDatabaseKey::save()
+bool DatabaseSettingsWidgetDatabaseKey::saveSettings()
{
m_isDirty |= (m_passwordEditWidget->visiblePage() == KeyComponentWidget::Page::Edit);
m_isDirty |= (m_keyFileEditWidget->visiblePage() == KeyComponentWidget::Page::Edit);
@@ -135,7 +135,7 @@ bool DatabaseSettingsWidgetDatabaseKey::save()
#endif
if (m_db->key() && !m_db->key()->keys().isEmpty() && !m_isDirty) {
- // key unchanged
+ // Key unchanged
return true;
}
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.h b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.h
index 258f33e36..3e4bcdc73 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.h
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
* along with this program. If not, see .
*/
-#ifndef KEEPASSXC_DATABASESETTINGSPAGECHANGEDBKEY_H
-#define KEEPASSXC_DATABASESETTINGSPAGECHANGEDBKEY_H
+#ifndef KEEPASSXC_DATABASESETTINGSWIDGETDATABASEKEY_H
+#define KEEPASSXC_DATABASESETTINGSWIDGETDATABASEKEY_H
#include "DatabaseSettingsWidget.h"
#include "config-keepassx.h"
@@ -42,12 +42,12 @@ public:
Q_DISABLE_COPY(DatabaseSettingsWidgetDatabaseKey);
~DatabaseSettingsWidgetDatabaseKey() override;
- void load(QSharedPointer db) override;
+ void loadSettings(QSharedPointer db) override;
public slots:
void initialize() override;
void uninitialize() override;
- bool save() override;
+ bool saveSettings() override;
void discard() override;
private slots:
@@ -77,4 +77,4 @@ private:
#endif
};
-#endif // KEEPASSXC_DATABASESETTINGSPAGECHANGEDBKEY_H
+#endif // KEEPASSXC_DATABASESETTINGSWIDGETDATABASEKEY_H
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.cpp
index 17b35a5a0..b9016499b 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.cpp
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -73,7 +73,7 @@ DatabaseSettingsWidgetEncryption::DatabaseSettingsWidgetEncryption(QWidget* pare
connect(m_ui->decryptionTimeSlider, SIGNAL(valueChanged(int)), SLOT(updateDecryptionTime(int)));
- // conditions under which a key re-transformation is needed
+ // Conditions under which a key re-transformation is needed
connect(m_ui->decryptionTimeSlider, SIGNAL(valueChanged(int)), SLOT(markDirty()));
connect(m_ui->compatibilitySelection, SIGNAL(currentIndexChanged(int)), SLOT(markDirty()));
connect(m_ui->algorithmComboBox, SIGNAL(currentIndexChanged(int)), SLOT(markDirty()));
@@ -256,7 +256,7 @@ void DatabaseSettingsWidgetEncryption::markDirty()
m_isDirty = true;
}
-bool DatabaseSettingsWidgetEncryption::save()
+bool DatabaseSettingsWidgetEncryption::saveSettings()
{
Q_ASSERT(m_db);
if (!m_db) {
@@ -269,7 +269,7 @@ bool DatabaseSettingsWidgetEncryption::save()
}
if (m_db->key() && !m_db->key()->keys().isEmpty() && !m_isDirty) {
- // nothing has changed, don't re-transform
+ // Nothing has changed, don't re-transform
return true;
}
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.h b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.h
index 346274dd9..6b87bd462 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.h
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ public:
public slots:
void initialize() override;
void uninitialize() override;
- bool save() override;
+ bool saveSettings() override;
protected:
void showEvent(QShowEvent* event) override;
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.ui b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.ui
index 581bc6ca2..dd5efe671 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.ui
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.ui
@@ -537,6 +537,7 @@
transformBenchmarkButtonmemorySpinBoxparallelismSpinBox
+ advancedSettingsButton
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp
index 777c464e4..84b903b5c 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -82,7 +82,7 @@ void DatabaseSettingsWidgetGeneral::showEvent(QShowEvent* event)
m_ui->dbNameEdit->setFocus();
}
-bool DatabaseSettingsWidgetGeneral::save()
+bool DatabaseSettingsWidgetGeneral::saveSettings()
{
auto* meta = m_db->metadata();
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.h b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.h
index a26e1ef7a..548490cf0 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.h
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ public:
public slots:
void initialize() override;
void uninitialize() override;
- bool save() override;
+ bool saveSettings() override;
protected:
void showEvent(QShowEvent* event) override;
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.h b/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.h
index e17689f9e..075b911bb 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.h
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ public:
public slots:
void initialize() override;
void uninitialize() override{};
- inline bool save() override
+ inline bool saveSettings() override
{
return true;
};
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.cpp
index 32879a75b..f474fe8d6 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.cpp
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ void DatabaseSettingWidgetMetaData::uninitialize()
{
}
-bool DatabaseSettingWidgetMetaData::save()
+bool DatabaseSettingWidgetMetaData::saveSettings()
{
Metadata* meta = m_db->metadata();
meta->setName(m_ui->databaseName->text());
diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.h b/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.h
index 8a32e0670..2aee80813 100644
--- a/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.h
+++ b/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ public:
public slots:
void initialize() override;
void uninitialize() override;
- bool save() override;
+ bool saveSettings() override;
protected:
void showEvent(QShowEvent* event) override;
diff --git a/src/gui/remote/DatabaseSettingsWidgetRemote.cpp b/src/gui/remote/DatabaseSettingsWidgetRemote.cpp
index b38bd828c..e6ed0a486 100644
--- a/src/gui/remote/DatabaseSettingsWidgetRemote.cpp
+++ b/src/gui/remote/DatabaseSettingsWidgetRemote.cpp
@@ -69,7 +69,7 @@ void DatabaseSettingsWidgetRemote::uninitialize()
{
}
-bool DatabaseSettingsWidgetRemote::save()
+bool DatabaseSettingsWidgetRemote::saveSettings()
{
if (m_modified) {
auto ans = MessageBox::question(this,
diff --git a/src/gui/remote/DatabaseSettingsWidgetRemote.h b/src/gui/remote/DatabaseSettingsWidgetRemote.h
index fe91b94a7..6184e4bd9 100644
--- a/src/gui/remote/DatabaseSettingsWidgetRemote.h
+++ b/src/gui/remote/DatabaseSettingsWidgetRemote.h
@@ -43,7 +43,7 @@ public:
public slots:
void initialize() override;
void uninitialize() override;
- bool save() override;
+ bool saveSettings() override;
private slots:
void saveCurrentSettings();
diff --git a/src/gui/reports/ReportsWidget.h b/src/gui/reports/ReportsWidget.h
index 59609acf9..c80c5eb65 100644
--- a/src/gui/reports/ReportsWidget.h
+++ b/src/gui/reports/ReportsWidget.h
@@ -18,7 +18,7 @@
#ifndef KEEPASSXC_REPORTSWIDGET_H
#define KEEPASSXC_REPORTSWIDGET_H
-#include "gui/settings/SettingsWidget.h"
+#include "gui/SettingsWidget.h"
class Database;
diff --git a/src/gui/wizard/NewDatabaseWizardPage.cpp b/src/gui/wizard/NewDatabaseWizardPage.cpp
index 4b169ce49..17dcaa673 100644
--- a/src/gui/wizard/NewDatabaseWizardPage.cpp
+++ b/src/gui/wizard/NewDatabaseWizardPage.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -69,7 +69,7 @@ void NewDatabaseWizardPage::initializePage()
return;
}
- m_pageWidget->load(m_db);
+ m_pageWidget->loadSettings(m_db);
}
bool NewDatabaseWizardPage::validatePage()
@@ -79,7 +79,7 @@ bool NewDatabaseWizardPage::validatePage()
return false;
}
- bool valid = m_pageWidget->save();
+ bool valid = m_pageWidget->saveSettings();
m_pageWidget->uninitialize();
return valid;
}
diff --git a/src/keeshare/CMakeLists.txt b/src/keeshare/CMakeLists.txt
index 5f7a39658..5fe739b36 100644
--- a/src/keeshare/CMakeLists.txt
+++ b/src/keeshare/CMakeLists.txt
@@ -2,7 +2,6 @@ if(WITH_XC_KEESHARE)
set(keeshare_SOURCES
SettingsPageKeeShare.cpp
SettingsWidgetKeeShare.cpp
- DatabaseSettingsPageKeeShare.cpp
DatabaseSettingsWidgetKeeShare.cpp
group/EditGroupWidgetKeeShare.cpp
group/EditGroupPageKeeShare.cpp
diff --git a/src/keeshare/DatabaseSettingsPageKeeShare.cpp b/src/keeshare/DatabaseSettingsPageKeeShare.cpp
deleted file mode 100644
index f197c3e66..000000000
--- a/src/keeshare/DatabaseSettingsPageKeeShare.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2018 KeePassXC Team
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 or (at your option)
- * version 3 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "DatabaseSettingsPageKeeShare.h"
-
-#include "core/Database.h"
-#include "gui/Icons.h"
-#include "keeshare/DatabaseSettingsWidgetKeeShare.h"
-
-QString DatabaseSettingsPageKeeShare::name()
-{
- return "KeeShare";
-}
-
-QIcon DatabaseSettingsPageKeeShare::icon()
-{
- return icons()->icon("preferences-system-network-sharing");
-}
-
-QWidget* DatabaseSettingsPageKeeShare::createWidget()
-{
- return new DatabaseSettingsWidgetKeeShare();
-}
-
-void DatabaseSettingsPageKeeShare::loadSettings(QWidget* widget, QSharedPointer db)
-{
- DatabaseSettingsWidgetKeeShare* settingsWidget = reinterpret_cast(widget);
- settingsWidget->loadSettings(db);
-}
-
-void DatabaseSettingsPageKeeShare::saveSettings(QWidget* widget)
-{
- DatabaseSettingsWidgetKeeShare* settingsWidget = reinterpret_cast(widget);
- settingsWidget->saveSettings();
-}
diff --git a/src/keeshare/DatabaseSettingsPageKeeShare.h b/src/keeshare/DatabaseSettingsPageKeeShare.h
deleted file mode 100644
index 1de48eae8..000000000
--- a/src/keeshare/DatabaseSettingsPageKeeShare.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2018 KeePassXC Team
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 or (at your option)
- * version 3 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef KEEPASSXC_DATABASESETTINGSPAGEKEESHARE_H
-#define KEEPASSXC_DATABASESETTINGSPAGEKEESHARE_H
-
-#include "gui/dbsettings/DatabaseSettingsDialog.h"
-
-class DatabaseSettingsPageKeeShare : public IDatabaseSettingsPage
-{
-public:
- QString name() override;
- QIcon icon() override;
- QWidget* createWidget() override;
- void loadSettings(QWidget* widget, QSharedPointer db) override;
- void saveSettings(QWidget* widget) override;
-};
-
-#endif // KEEPASSXC_DATABASESETTINGSPAGEKEESHARE_H
diff --git a/src/keeshare/DatabaseSettingsWidgetKeeShare.cpp b/src/keeshare/DatabaseSettingsWidgetKeeShare.cpp
index e72a86384..c0fdc4985 100644
--- a/src/keeshare/DatabaseSettingsWidgetKeeShare.cpp
+++ b/src/keeshare/DatabaseSettingsWidgetKeeShare.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ DatabaseSettingsWidgetKeeShare::~DatabaseSettingsWidgetKeeShare()
{
}
-void DatabaseSettingsWidgetKeeShare::loadSettings(QSharedPointer db)
+void DatabaseSettingsWidgetKeeShare::loadSettings(const QSharedPointer& db)
{
m_db = db;
diff --git a/src/keeshare/DatabaseSettingsWidgetKeeShare.h b/src/keeshare/DatabaseSettingsWidgetKeeShare.h
index bebc0feeb..765bc3a36 100644
--- a/src/keeshare/DatabaseSettingsWidgetKeeShare.h
+++ b/src/keeshare/DatabaseSettingsWidgetKeeShare.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team
+ * Copyright (C) 2023 KeePassXC Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ public:
explicit DatabaseSettingsWidgetKeeShare(QWidget* parent = nullptr);
~DatabaseSettingsWidgetKeeShare();
- void loadSettings(QSharedPointer db);
+ void loadSettings(const QSharedPointer& db);
void saveSettings();
private:
diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp
index aaf0611bf..3446280be 100644
--- a/tests/gui/TestGui.cpp
+++ b/tests/gui/TestGui.cpp
@@ -54,6 +54,7 @@
#include "gui/databasekey/KeyFileEditWidget.h"
#include "gui/databasekey/PasswordEditWidget.h"
#include "gui/dbsettings/DatabaseSettingsDialog.h"
+#include "gui/dbsettings/DatabaseSettingsWidgetEncryption.h"
#include "gui/entry/EditEntryWidget.h"
#include "gui/entry/EntryView.h"
#include "gui/group/EditGroupWidget.h"
@@ -1604,7 +1605,7 @@ void TestGui::testDatabaseSettings()
int autosaveDelayTestValue = 2;
dbSettingsCategoryList->setCurrentCategory(1); // go into security category
- auto securityTabWidget = dbSettingsStackedWidget->findChild();
+ auto securityTabWidget = dbSettingsStackedWidget->findChild("securityTabWidget");
QCOMPARE(securityTabWidget->currentIndex(), 0);
// Interact with the password edit option