diff --git a/CHANGELOG.md b/CHANGELOG.md
index c201bee41..ff7e1b018 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -897,7 +897,7 @@
- Compare window title to entry URLs #556
- Implemented inline error messages #162
- Ignore group expansion and other minor changes when making database "dirty" #464
-- Updated license and copyright information on souce files #632
+- Updated license and copyright information on source files #632
- Added contributors list to about dialog #629
## 2.1.4 (2017-04-09)
diff --git a/README.md b/README.md
index 0142a698b..4bffba69c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
# KeePassXC
+[](https://bestpractices.coreinfrastructure.org/projects/6326)
[/statusIcon)](https://ci.keepassxc.org/?guest=1)
[](https://codecov.io/gh/keepassxreboot/keepassxc)
[](https://github.com/keepassxreboot/keepassxc/releases/)
diff --git a/cmake/KPXCMacDeployHelpers.cmake b/cmake/KPXCMacDeployHelpers.cmake
index d22051d32..f86067cbc 100644
--- a/cmake/KPXCMacDeployHelpers.cmake
+++ b/cmake/KPXCMacDeployHelpers.cmake
@@ -1,5 +1,5 @@
# Running macdeployqt on a POST_BUILD copied binaries is pointless when using CPack because
-# the copied binaries will be overriden by the corresponding install(TARGETS) commands.
+# the copied binaries will be overridden by the corresponding install(TARGETS) commands.
# That's why we run macdeployqt using install(CODE) on the already installed binaries.
# The precondition is that all install(TARGETS) calls have to be called before this function is
# called.
diff --git a/docs/topics/AutoType.adoc b/docs/topics/AutoType.adoc
index 836d2c7d1..04c5e7b96 100644
--- a/docs/topics/AutoType.adoc
+++ b/docs/topics/AutoType.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Auto-Type
+= KeePassXC – Auto-Type
:imagesdir: ../images
// tag::content[]
diff --git a/docs/topics/BrowserPlugin.adoc b/docs/topics/BrowserPlugin.adoc
index 9435a1c9c..f36767492 100644
--- a/docs/topics/BrowserPlugin.adoc
+++ b/docs/topics/BrowserPlugin.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Browser Plugin
+= KeePassXC – Browser Plugin
include::.sharedheader[]
:imagesdir: ../images
diff --git a/docs/topics/DatabaseOperations.adoc b/docs/topics/DatabaseOperations.adoc
index aa5b4aec3..b3098fc9a 100644
--- a/docs/topics/DatabaseOperations.adoc
+++ b/docs/topics/DatabaseOperations.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Database Operations
+= KeePassXC – Database Operations
include::.sharedheader[]
:imagesdir: ../images
@@ -11,22 +11,22 @@ To create a database, perform the following steps:
1. Open your KeePassXC application. Click the create new database button *(A)*:
+
-.Create database - Welcome screen
+.Create database – Welcome screen
image::welcome_screen.png[]
2. The database creation wizard appears. Enter the desired database name and a short description (optional):
+
-.Create database - General information
+.Create database – General information
image::new_db_wizard_1.png[,80%]
3. Click Continue. The Encryption Settings screen appears, we don't recommend making any changes besides increasing or decreasing the decryption time using the slider. Setting the Decryption Time slider at higher values means that the database will have higher level of protection but the time taken by the database to open will increase.
+
-.Create database - Encryption settings
+.Create database – Encryption settings
image::new_db_wizard_2.png[,80%]
4. Click the Continue button. The Database Credentials screen appears, enter your desired database password. We recommend using a long, randomized password.
+
-.Create database - Database credentials
+.Create database – Database credentials
image::new_db_wizard_3.png[,80%]
+
*(A)* Open the password generator +
@@ -362,7 +362,7 @@ The following key derivation functions are supported:
* AES-KDF (KDBX 4 and KDBX 3.1): This key derivation function is based on iterating AES. Users can change the number of iterations. The more iterations, the harder are dictionary and guessing attacks, but also database loading/saving takes more time (linearly). KDBX 3.1 only supports AES-KDF; any other key derivation function, like for instance Argon2, requires KDBX 4.
- * Argon2 (KDBX 4 - recommended): KDBX 4, the Argon2 key derivation function can be used for transforming the composite master key (as protection against dictionary attacks). The main advantage of Argon2 over AES-KDF is that it provides a better resistance against GPU/ASIC attacks (due to being a memory-hard function). The number of iterations scales linearly with the required time. By increasing the memory parameter, GPU/ASIC attacks become harder and the required time increases. The parallelism parameter can be used to specify how many threads should be used. We recommend using Argon2id to prevent against timing-based attacks. Argon2d offers maximum compatibility with other KeePass-based apps, the default settings provide sufficient protection against any known attacks.
+ * Argon2 (KDBX 4 – recommended): KDBX 4, the Argon2 key derivation function can be used for transforming the composite master key (as protection against dictionary attacks). The main advantage of Argon2 over AES-KDF is that it provides a better resistance against GPU/ASIC attacks (due to being a memory-hard function). The number of iterations scales linearly with the required time. By increasing the memory parameter, GPU/ASIC attacks become harder and the required time increases. The parallelism parameter can be used to specify how many threads should be used. We recommend using Argon2id to prevent against timing-based attacks. Argon2d offers maximum compatibility with other KeePass-based apps, the default settings provide sufficient protection against any known attacks.
== Database Maintenance
KeePassXC offers some maintenance features that can be applied to clean up your database. Navigate to _Database_ -> _Database settings_ then click on _Maintenance_ on the left hand panel. The following screen appears. On this screen you can delete multiple icons at once and purge any unused icons in your database.
@@ -395,9 +395,9 @@ The database file that you create might contain highly sensitive data and must b
Make sure that you or someone else does not accidentally delete the database file. Deletion of the database file will result in the total loss of all your information (including all your passwords!) and a lot of inconvenience to manually retrieve your logins for various web applications. Do not share the credentials to access your database file with anyone unless you absolutely trust them (spouse, child, etc.).
-TIP: You can safely store your database file in the cloud (e.g., OneDrive, Dropbox, Google Drive, Nextcloud, Syncthing, etc). The database file is always fully encrypted; unencrypted data is never written to disk and is never accessible to your cloud storage provider. We recommend using a storage service that keeps automatic backups (version history) of your database file in the event of corruption or accidental deletion.
+TIP: You can safely store your database file in the cloud (OneDrive, Dropbox, Google Drive, Nextcloud, Syncthing, etc.). The database file is always fully encrypted; unencrypted data is never written to disk and is never accessible to your cloud storage provider. We recommend using a storage service that keeps automatic backups (version history) of your database file in the event of corruption or accidental deletion.
-== Backing up a Database File
+== Backing up a Database File
It is a good practice to create copies of your database file and store the copies of your database on a different computer, smart phone, or cloud storage space such a Google Drive or Microsoft OneDrive. Backups can be created automatically by selecting the _Backup database file before saving_ option in the application settings. Additionally, you can create a backup on-demand using the _Database_ -> _Save Database Backup..._ menu feature.
.Saving a database backup
diff --git a/docs/topics/DownloadInstall.adoc b/docs/topics/DownloadInstall.adoc
index e96c885de..f5a967ec5 100644
--- a/docs/topics/DownloadInstall.adoc
+++ b/docs/topics/DownloadInstall.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Download and Install
+= KeePassXC – Download and Install
include::.sharedheader[]
:imagesdir: ../images
@@ -8,9 +8,9 @@ KeePassXC is available for download for the following operating systems and plat
* Microsoft Windows
** Portable and MSI Installer (64-bit and 32-bit)
-* Linux - Official Cross-Distribution Packages
+* Linux – Official Cross-Distribution Packages
** AppImage and Snap Package
-* Linux - Distribution-Specific Packages
+* Linux – Distribution-Specific Packages
** Ubuntu, Debian, Arch Linux, Gentoo, Fedora, CentOS, and OpenSUSE
* macOS
** DMG Installer, Homebrew Cask
@@ -45,9 +45,9 @@ image::install_wizard_2.png[,80%]
The following options can be set when running the MSI in an unattended installation:
-* *LAUNCHAPPONEXIT* - Launch KeePassXC after install (default ON)
-* *AUTOSTARTPROGRAM* - KeePassXC will auto-start on login (default ON)
-* *INSTALLDESKTOPSHORTCUT* - A desktop icon will be installed (default OFF)
+* *LAUNCHAPPONEXIT* – Launch KeePassXC after install (default ON)
+* *AUTOSTARTPROGRAM* – KeePassXC will auto-start on login (default ON)
+* *INSTALLDESKTOPSHORTCUT* – A desktop icon will be installed (default OFF)
Example: `msiexec.exe /q /i KeePassXC-Y.Y.Y-WinZZ.msi AUTOSTARTPROGRAM=0`
@@ -69,4 +69,4 @@ image::macos_install.png[,80%]
// end::content[]
// tag::advanced[]
-// end::advanced[]
\ No newline at end of file
+// end::advanced[]
diff --git a/docs/topics/ImportExport.adoc b/docs/topics/ImportExport.adoc
index 657a182ad..974b00474 100644
--- a/docs/topics/ImportExport.adoc
+++ b/docs/topics/ImportExport.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Import/Export Operations
+= KeePassXC – Import/Export Operations
include::.sharedheader[]
:imagesdir: ../images
diff --git a/docs/topics/KeeShare.adoc b/docs/topics/KeeShare.adoc
index 6735378d4..75769bdb4 100644
--- a/docs/topics/KeeShare.adoc
+++ b/docs/topics/KeeShare.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - KeeShare
+= KeePassXC – KeeShare
include::.sharedheader[]
:imagesdir: ../images
@@ -24,10 +24,10 @@ NOTE: KeeShare does not synchronize group structure after the initial share is c
1. Open the edit sheet on a group you want to share.
2. Select the KeeShare category on the left toolbar.
3. Choose a sharing type:
- a. *Inactive* - Disable sharing this group
- b. *Import* - Read-only import of entries, merge changes
- c. *Export* - Write-only export of entries, no merge
- d. *Synchronize* - Read/Write entries from the share, merge changes
+ a. *Inactive* – Disable sharing this group
+ b. *Import* – Read-only import of entries, merge changes
+ c. *Export* – Write-only export of entries, no merge
+ d. *Synchronize* – Read/Write entries from the share, merge changes
4. Choose a path to store the shared credentials to.
5. The password to use for this share container.
diff --git a/docs/topics/KeyboardShortcuts.adoc b/docs/topics/KeyboardShortcuts.adoc
index b027ba1fc..8d8ab6ca0 100644
--- a/docs/topics/KeyboardShortcuts.adoc
+++ b/docs/topics/KeyboardShortcuts.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Keyboard Shortcuts
+= KeePassXC – Keyboard Shortcuts
include::.sharedheader[]
:imagesdir: ../images
@@ -9,12 +9,15 @@ NOTE: On macOS please substitute `Ctrl` with `Cmd` (aka `⌘`).
|===
|Action | Keyboard Shortcut
+|Settings | Ctrl + ,
|Open Database | Ctrl + O
|Save Database | Ctrl + S
|Save Database As | Ctrl + Shift + S
|New Database | Ctrl + Shift + N
|Close Database | Ctrl + W ; Ctrl + F4
|Lock All Databases | Ctrl + L
+|Database Settings | Ctrl + Shift + ,
+|Database Reports | Ctrl + Shift + R
|Quit | Ctrl + Q
|New Entry | Ctrl + N
|Edit Entry | Enter ; Ctrl + E
diff --git a/docs/topics/PasswordGenerator.adoc b/docs/topics/PasswordGenerator.adoc
index 2d8310b83..a1f1915e9 100644
--- a/docs/topics/PasswordGenerator.adoc
+++ b/docs/topics/PasswordGenerator.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Password Generator
+= KeePassXC – Password Generator
include::.sharedheader[]
:imagesdir: ../images
diff --git a/docs/topics/Reference.adoc b/docs/topics/Reference.adoc
index fb9545ed2..4171ed9a5 100644
--- a/docs/topics/Reference.adoc
+++ b/docs/topics/Reference.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Reference
+= KeePassXC – Reference
include::.sharedheader[]
:imagesdir: ../images
@@ -53,13 +53,13 @@ A reference to another entry's field is possible using the shorthand syntax:
`<FIELD>` and `<SEARCH_IN>` can be one of following:
-* T - Title
-* U - Username
-* P - Password
-* A - URL
-* N - Notes
-* I - UUID (found on entry properties page)
-* O - Custom Attribute _(SEARCH_IN only)_
+* T – Title
+* U – Username
+* P – Password
+* A – URL
+* N – Notes
+* I – UUID (found on entry properties page)
+* O – Custom Attribute _(SEARCH_IN only)_
Examples: +
`{REF:U@I:033054D445C648C59092CC1D661B1B71}` +
diff --git a/docs/topics/SSHAgent.adoc b/docs/topics/SSHAgent.adoc
index e47ffa506..5539e0e67 100644
--- a/docs/topics/SSHAgent.adoc
+++ b/docs/topics/SSHAgent.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - SSH Agent integration
+= KeePassXC – SSH Agent integration
include::.sharedheader[]
:imagesdir: ../images
diff --git a/docs/topics/UserInterface.adoc b/docs/topics/UserInterface.adoc
index c61dc85a8..dc7908e56 100644
--- a/docs/topics/UserInterface.adoc
+++ b/docs/topics/UserInterface.adoc
@@ -1,22 +1,22 @@
-= KeePassXC - Database Operations
+= KeePassXC – Database Operations
include::.sharedheader[]
:imagesdir: ../images
// tag::content[]
== Interface Overview
=== Application Layout
-The KeePassXC interface is designed for simplicity and easy access to your information. The main database view is split into three main partitions detailed below. You can open multiple databases at the same time, they will appear in tabs.
+The KeePassXC interface is designed for simplicity and easy access to your information. The main database view is split into four main partitions detailed below. You can open multiple databases at the same time, they will appear in tabs.
.Main database interface
image::main_interface.png[]
-*(A) Groups* - Organize your entries into discrete groups to bring order to all of your sensitive information. Groups can be nested under each other to create a hierarchy. Settings from parent groups get applied to their children. You can hide this panel on the View menu.
+*(A) Groups* – Organize your entries into discrete groups to bring order to all of your sensitive information. Groups can be nested under each other to create a hierarchy. Settings from parent groups get applied to their children. You can hide this panel on the View menu.
-*(B) Tags* - Dynamic groups of entries that can be quickly displayed with one click. Any number of custom tags can be added when editing an entry. This panel also includes useful pre-defined searches, such as finding expired and weak passwords.
+*(B) Tags* – Dynamic groups of entries that can be quickly displayed with one click. Any number of custom tags can be added when editing an entry. This panel also includes useful pre-defined searches, such as finding expired and weak passwords.
-*\(C) Entries* - Entries contain all the information you want to store for a website or application you are storing in KeePassXC. This view shows all the entries in the selected group. Each column can be resized, reordered, and shown or hidden based on your preference. Right-click the header row to see all available options.
+*\(C) Entries* – Entries contain all the information you want to store for a website or application you are storing in KeePassXC. This view shows all the entries in the selected group. Each column can be resized, reordered, and shown or hidden based on your preference. Right-click the header row to see all available options.
-*(D) Preview* - Shows a preview of the selected group or entry. You can temporarily hide this preview using the close button on the right hand side or completely disabled in the application settings.
+*(D) Preview* – Shows a preview of the selected group or entry. You can temporarily hide this preview using the close button on the right hand side or completely disabled in the application settings.
TIP: You can enable double-click copying of entry username and password in the Application Security Settings. This is turned off by default starting with version 2.7.0.
@@ -26,10 +26,10 @@ The toolbar provides a quick way to perform common tasks with your database. Som
.Toolbar overview
image::toolbar.png[]
-*(A) Database* - Open Database, Save Database, Lock Database +
-*(B) Entries* - Create Entry, Edit Entry, Delete Selected Entries +
-*\(C) Entry Data* - Copy Username, Copy Password, Copy URL, Perform Auto-Type +
-*(D) Tools* - Password Generator, Application Settings +
+*(A) Database* – Open Database, Save Database, Lock Database +
+*(B) Entries* – Create Entry, Edit Entry, Delete Selected Entries +
+*\(C) Entry Data* – Copy Username, Copy Password, Copy URL, Perform Auto-Type +
+*(D) Tools* – Password Generator, Application Settings +
*(E) Search*
=== Application Settings
@@ -59,7 +59,7 @@ You can use the following command line options to tailor the application to your
----
Usage: keepassxc.exe [options] [filename(s)]
-KeePassXC - cross-platform password manager
+KeePassXC – cross-platform password manager
Options:
-?, -h, --help Displays help on commandline options.
diff --git a/docs/topics/Welcome.adoc b/docs/topics/Welcome.adoc
index 4eb168e6c..ec44b6e53 100644
--- a/docs/topics/Welcome.adoc
+++ b/docs/topics/Welcome.adoc
@@ -1,4 +1,4 @@
-= KeePassXC - Welcome
+= KeePassXC – Welcome
include::.sharedheader[]
:imagesdir: ../images
@@ -9,7 +9,7 @@ KeePassXC is a modern, secure, and open-source password manager that stores and
KeePassXC is for people with extremely high demands of secure personal data management. It saves many different types of information, such as usernames, passwords, URLs, attachments, and notes in an offline, encrypted file that can be stored in any location, including private and public cloud solutions. For easy identification and management, user-defined titles and icons can be specified for entries. In addition, entries are sorted in customizable groups. An integrated search function allows you to use advanced patterns to easily find any entry in your database. A customizable, fast, and easy-to-use password generator utility allows you to create passwords with any combination of characters or easy to remember passphrases.
=== Overview
-You can store an unlimited number of passwords and information in a KeePassXC database. Every piece of information you store in your database is encrypted at all times within the `kdbx` file. When you are accessing your database from within KeePassXC, your information in decrypted and stored in your computer's memory. KeePassXC places controls over the access to this data so other applications cannot read it (unless they have administrative rights). The interface is designed to let you quickly access your passwords, search for the right entry, perform Auto-Type or copy/paste operations, make and save changes, and then get out of your way.
+You can store an unlimited number of passwords and information in a KeePassXC database. Every piece of information you store in your database is encrypted at all times within the `kdbx` file. When you are accessing your database from within KeePassXC, your information is decrypted and stored in your computer's memory. KeePassXC places controls over the access to this data so other applications cannot read it (unless they have administrative rights). The interface is designed to let you quickly access your passwords, search for the right entry, perform Auto-Type or copy/paste operations, make and save changes, and then get out of your way.
KeePassXC ships with light and dark themes specifically designed to meet accessibility standards. In most cases, the appropriate theme for your system will be determined automatically, but you can always set a specific theme in the application settings.
@@ -45,4 +45,4 @@ KeePassXC has numerous features for novice and power users alike. This guide wil
** Additional encryption choices: Twofish and ChaCha20
// end::content[]
// tag::advanced[]
-// end::advanced[]
\ No newline at end of file
+// end::advanced[]
diff --git a/release-tool b/release-tool
index 920edba06..0f43ec632 100755
--- a/release-tool
+++ b/release-tool
@@ -1411,8 +1411,8 @@ i18n() {
if ! command -v $LUPDATE > /dev/null; then
LUPDATE=lupdate
fi
- $LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src \
- -ts share/translations/keepassxc_en.ts $@
+ $LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -extensions c,cpp,h,js,mm,qrc,ui \
+ -no-obsolete src -ts share/translations/keepassxc_en.ts $@
return 0
fi
diff --git a/release-tool.ps1 b/release-tool.ps1
index 76bb15790..1864258c4 100644
--- a/release-tool.ps1
+++ b/release-tool.ps1
@@ -284,7 +284,7 @@ if ($Merge) {
# Update translation files
Write-Host "Updating source translation file..."
Invoke-Cmd "lupdate" "-no-ui-lines -disable-heuristic similartext -locations none", `
- "-no-obsolete ./src -ts share/translations/keepassxc_en.ts"
+ "-extensions c,cpp,h,js,mm,qrc,ui -no-obsolete ./src -ts share/translations/keepassxc_en.ts"
Write-Host "Pulling updated translations from Transifex..."
Invoke-Cmd "tx" "pull -af --minimum-perc=60 --parallel -r keepassxc.share-translations-keepassxc-en-ts--develop"
diff --git a/share/linux/org.keepassxc.KeePassXC.appdata.xml b/share/linux/org.keepassxc.KeePassXC.appdata.xml
index c899a6601..e51d6acac 100644
--- a/share/linux/org.keepassxc.KeePassXC.appdata.xml
+++ b/share/linux/org.keepassxc.KeePassXC.appdata.xml
@@ -941,7 +941,7 @@
Compare window title to entry URLs [#556]
Implemented inline error messages [#162]
Ignore group expansion and other minor changes when making database "dirty" [#464]
-
Updated license and copyright information on souce files [#632]
+
Updated license and copyright information on source files [#632]
Added contributors list to about dialog [#629]
diff --git a/share/linux/org.keepassxc.KeePassXC.desktop.in b/share/linux/org.keepassxc.KeePassXC.desktop.in
index eef24fe7f..bf633727a 100644
--- a/share/linux/org.keepassxc.KeePassXC.desktop.in
+++ b/share/linux/org.keepassxc.KeePassXC.desktop.in
@@ -42,6 +42,8 @@ StartupWMClass=keepassxc
StartupNotify=true
Terminal=false
Type=Application
-Version=1.0
+Version=1.5
Categories=Utility;Security;Qt;
MimeType=application/x-keepass2;
+SingleMainWindow=true
+X-GNOME-SingleWindow=true
diff --git a/share/translations/keepassxc_en.ts b/share/translations/keepassxc_en.ts
index a526851ec..927492641 100644
--- a/share/translations/keepassxc_en.ts
+++ b/share/translations/keepassxc_en.ts
@@ -892,52 +892,6 @@ Do you want to delete the entry?
-
- Converting attributes to custom data…
-
-
-
- Abort
-
-
-
- KeePassXC: Converted KeePassHTTP attributes
-
-
-
- Successfully converted attributes from %1 entry(s).
-Moved %2 keys to custom data.
-
-
-
- Successfully moved %n keys to custom data.
-
-
-
-
-
-
- KeePassXC: No entry with KeePassHTTP attributes found!
-
-
-
- The active database does not contain an entry with KeePassHTTP attributes.
-
-
-
- Don't show this warning again
-
-
-
- KeePassXC: Legacy browser integration settings detected
-
-
-
- Your KeePassXC-Browser settings need to be moved into the database settings.
-This is necessary to maintain your current browser connections.
-Would you like to migrate your existing settings now?
-
- BrowserSettingsWidget
@@ -1597,6 +1551,10 @@ If you do not have a key file, please leave the field empty.
<p>Click for more information…</p>
+
+ authenticate to access the database
+
+ DatabaseSettingWidgetMetaData
@@ -1642,14 +1600,6 @@ If you do not have a key file, please leave the field empty.
KeePassXC-Browser settings
-
- Convert KeePassHTTP data
-
-
-
- Convert legacy KeePassHTTP attributes to KeePassXC-Browser compatible custom data
-
- Refresh database root group ID
@@ -1759,15 +1709,6 @@ Permissions to access entries will be revoked.
The active database does not contain an entry with permissions.
-
- Move KeePassHTTP attributes to custom data
-
-
-
- Do you really want to convert all legacy browser integration data to the latest standard?
-This is necessary to maintain compatibility with the browser plugin.
-
- Refresh database ID
@@ -3084,10 +3025,6 @@ Would you like to correct it?
EditGroupWidgetBrowser
-
- Edit Group
-
- These settings affect to the group's behaviour with the browser extension.
@@ -5200,10 +5137,6 @@ Are you sure you want to continue with this file?
Copy title to clipboard
-
- &URL
-
- Copy URL to clipboard
@@ -5458,6 +5391,10 @@ We recommend you use the AppImage available on our downloads page.
XML File…
+
+ Copy &URL
+
+ ManageDatabase
@@ -5827,6 +5764,10 @@ We recommend you use the AppImage available on our downloads page.
Unexpected EOF when writing private key
+
+ AES-256/GCM is currently not supported
+
+ PasswordEditWidget
@@ -7924,6 +7865,10 @@ Kernel: %3 %4
This options is deprecated, use --set-key-file instead.
+
+ KeePassXC is not running. No open database to lock
+
+ Password is %1 old
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b0bd3e0ab..3a589842d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -532,5 +532,5 @@ if(WIN32)
endif()
# The install commands in this subdirectory will be executed after all the install commands in the
-# current scope are ran. It is required for correct functtioning of macdeployqt.
+# current scope are ran. It is required for correct functioning of macdeployqt.
add_subdirectory(post_install)
diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp
index 750053955..c39a13201 100644
--- a/src/autotype/AutoType.cpp
+++ b/src/autotype/AutoType.cpp
@@ -225,7 +225,7 @@ void AutoType::createTestInstance()
QStringList AutoType::windowTitles()
{
if (!m_plugin) {
- return QStringList();
+ return {};
}
return m_plugin->windowTitles();
@@ -356,7 +356,7 @@ void AutoType::executeAutoTypeActions(const Entry* entry,
/**
* Single Autotype entry-point function
- * Look up the Auto-Type sequence for the given entry then perfom Auto-Type in the active window
+ * Look up the Auto-Type sequence for the given entry then perform Auto-Type in the active window
*/
void AutoType::performAutoType(const Entry* entry)
{
@@ -372,7 +372,7 @@ void AutoType::performAutoType(const Entry* entry)
/**
* Extra Autotype entry-point function
- * Perfom Auto-Type of the directly specified sequence in the active window
+ * Perform Auto-Type of the directly specified sequence in the active window
*/
void AutoType::performAutoTypeWithSequence(const Entry* entry, const QString& sequence)
{
diff --git a/src/autotype/AutoTypeAction.h b/src/autotype/AutoTypeAction.h
index 082d0aea7..f68917f8f 100644
--- a/src/autotype/AutoTypeAction.h
+++ b/src/autotype/AutoTypeAction.h
@@ -38,17 +38,17 @@ public:
static Result Ok()
{
- return Result(true, false, QString());
+ return {true, false, QString()};
}
static Result Retry(const QString& error)
{
- return Result(false, true, error);
+ return {false, true, error};
}
static Result Failed(const QString& error)
{
- return Result(false, false, error);
+ return {false, false, error};
}
bool isOk() const
diff --git a/src/autotype/AutoTypePlatformPlugin.h b/src/autotype/AutoTypePlatformPlugin.h
index 7154dcdd7..1e1e7b846 100644
--- a/src/autotype/AutoTypePlatformPlugin.h
+++ b/src/autotype/AutoTypePlatformPlugin.h
@@ -25,9 +25,7 @@
class AutoTypePlatformInterface
{
public:
- virtual ~AutoTypePlatformInterface()
- {
- }
+ virtual ~AutoTypePlatformInterface() = default;
virtual bool isAvailable() = 0;
virtual QStringList windowTitles() = 0;
virtual WId activeWindow() = 0;
diff --git a/src/autotype/AutoTypeSelectDialog.cpp b/src/autotype/AutoTypeSelectDialog.cpp
index 38c1ac58c..5e5d20c3a 100644
--- a/src/autotype/AutoTypeSelectDialog.cpp
+++ b/src/autotype/AutoTypeSelectDialog.cpp
@@ -92,9 +92,7 @@ AutoTypeSelectDialog::AutoTypeSelectDialog(QWidget* parent)
}
// Required for QScopedPointer
-AutoTypeSelectDialog::~AutoTypeSelectDialog()
-{
-}
+AutoTypeSelectDialog::~AutoTypeSelectDialog() = default;
void AutoTypeSelectDialog::setMatches(const QList& matches,
const QList>& dbs,
@@ -326,7 +324,7 @@ void AutoTypeSelectDialog::buildActionMenu()
submitAutoTypeMatch(match);
});
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
auto typeVirtualAction = new QAction(icons()->icon("auto-type"), tr("Use Virtual Keyboard"));
m_actionMenu->insertAction(copyUsernameAction, typeVirtualAction);
typeVirtualAction->setShortcut(Qt::CTRL + Qt::Key_4);
@@ -342,7 +340,7 @@ void AutoTypeSelectDialog::buildActionMenu()
typeUsernameAction->setShortcutVisibleInContextMenu(true);
typePasswordAction->setShortcutVisibleInContextMenu(true);
typeTotpAction->setShortcutVisibleInContextMenu(true);
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
typeVirtualAction->setShortcutVisibleInContextMenu(true);
#endif
#endif
diff --git a/src/autotype/mac/AutoTypeMac.cpp b/src/autotype/mac/AutoTypeMac.cpp
index eb6e4f774..f3f5c6594 100644
--- a/src/autotype/mac/AutoTypeMac.cpp
+++ b/src/autotype/mac/AutoTypeMac.cpp
@@ -250,6 +250,10 @@ AutoTypeAction::Result AutoTypeExecutorMac::execType(const AutoTypeKey* action)
int ch = action->character.toUpper().toLatin1();
m_platform->sendKey(static_cast(ch), true, action->modifiers);
m_platform->sendKey(static_cast(ch), false, action->modifiers);
+ } else if (mode == Mode::VIRTUAL) {
+ int ch = action->character.toLatin1();
+ m_platform->sendKey(static_cast(ch), true, action->modifiers);
+ m_platform->sendKey(static_cast(ch), false, action->modifiers);
} else {
m_platform->sendChar(action->character, true);
m_platform->sendChar(action->character, false);
diff --git a/src/autotype/test/AutoTypeTest.cpp b/src/autotype/test/AutoTypeTest.cpp
index 69c71a53c..641b9502a 100644
--- a/src/autotype/test/AutoTypeTest.cpp
+++ b/src/autotype/test/AutoTypeTest.cpp
@@ -29,7 +29,7 @@ QString AutoTypePlatformTest::keyToString(Qt::Key key)
QStringList AutoTypePlatformTest::windowTitles()
{
- return QStringList();
+ return {};
}
WId AutoTypePlatformTest::activeWindow()
diff --git a/src/autotype/test/AutoTypeTestInterface.h b/src/autotype/test/AutoTypeTestInterface.h
index 7681f2ecb..8b1b7f9ad 100644
--- a/src/autotype/test/AutoTypeTestInterface.h
+++ b/src/autotype/test/AutoTypeTestInterface.h
@@ -23,9 +23,7 @@
class AutoTypeTestInterface
{
public:
- virtual ~AutoTypeTestInterface()
- {
- }
+ virtual ~AutoTypeTestInterface() = default;
virtual void setActiveWindowTitle(const QString& title) = 0;
virtual QString actionChars() = 0;
diff --git a/src/autotype/xcb/AutoTypeXCB.cpp b/src/autotype/xcb/AutoTypeXCB.cpp
index f2b967656..047ef3a95 100644
--- a/src/autotype/xcb/AutoTypeXCB.cpp
+++ b/src/autotype/xcb/AutoTypeXCB.cpp
@@ -184,17 +184,17 @@ QString AutoTypePlatformX11::windowTitle(Window window, bool useBlacklist)
if (useBlacklist && !title.isEmpty()) {
if (window == m_rootWindow) {
- return QString();
+ return {};
}
QString className = windowClassName(window);
if (m_classBlacklist.contains(className)) {
- return QString();
+ return {};
}
QList keepassxWindows = widgetsToX11Windows(QApplication::topLevelWidgets());
if (keepassxWindows.contains(window)) {
- return QString();
+ return {};
}
}
diff --git a/src/browser/BrowserService.cpp b/src/browser/BrowserService.cpp
index 2953cf582..f054f75b9 100644
--- a/src/browser/BrowserService.cpp
+++ b/src/browser/BrowserService.cpp
@@ -1,6 +1,7 @@
/*
- * Copyright (C) 2013 Francois Ferrand
* Copyright (C) 2022 KeePassXC Team
+ * Copyright (C) 2017 Sami Vänttinen
+ * Copyright (C) 2013 Francois Ferrand
*
* 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
@@ -781,79 +782,6 @@ BrowserService::searchEntries(const QString& siteUrl, const QString& formUrl, co
return entries;
}
-void BrowserService::convertAttributesToCustomData(QSharedPointer db)
-{
- if (!db) {
- return;
- }
-
- QList entries = db->rootGroup()->entriesRecursive();
- QProgressDialog progress(tr("Converting attributes to custom data…"), tr("Abort"), 0, entries.count());
- progress.setWindowModality(Qt::WindowModal);
-
- int counter = 0;
- int keyCounter = 0;
- for (auto* entry : entries) {
- if (progress.wasCanceled()) {
- return;
- }
-
- if (moveSettingsToCustomData(entry, KEEPASSHTTP_NAME)) {
- ++counter;
- }
-
- if (moveSettingsToCustomData(entry, KEEPASSXCBROWSER_OLD_NAME)) {
- ++counter;
- }
-
- if (moveSettingsToCustomData(entry, KEEPASSXCBROWSER_NAME)) {
- ++counter;
- }
-
- if (entry->title() == KEEPASSHTTP_NAME || entry->title().contains(KEEPASSXCBROWSER_NAME, Qt::CaseInsensitive)) {
- keyCounter += moveKeysToCustomData(entry, db);
- db->recycleEntry(entry);
- }
-
- progress.setValue(progress.value() + 1);
- }
- progress.reset();
-
- if (counter > 0) {
- MessageBox::information(nullptr,
- tr("KeePassXC: Converted KeePassHTTP attributes"),
- tr("Successfully converted attributes from %1 entry(s).\n"
- "Moved %2 keys to custom data.",
- "")
- .arg(counter)
- .arg(keyCounter),
- MessageBox::Ok);
- } else if (counter == 0 && keyCounter > 0) {
- MessageBox::information(nullptr,
- tr("KeePassXC: Converted KeePassHTTP attributes"),
- tr("Successfully moved %n keys to custom data.", "", keyCounter),
- MessageBox::Ok);
- } else {
- MessageBox::information(nullptr,
- tr("KeePassXC: No entry with KeePassHTTP attributes found!"),
- tr("The active database does not contain an entry with KeePassHTTP attributes."),
- MessageBox::Ok);
- }
-
- // Rename password groupName
- Group* rootGroup = db->rootGroup();
- if (!rootGroup) {
- return;
- }
-
- for (auto* g : rootGroup->groupsRecursive(true)) {
- if (g->name() == KEEPASSHTTP_GROUP_NAME) {
- g->setName(KEEPASSXCBROWSER_GROUP_NAME);
- break;
- }
- }
-}
-
void BrowserService::requestGlobalAutoType(const QString& search)
{
emit osUtils->globalShortcutTriggered("autotype", search);
@@ -1264,84 +1192,6 @@ QSharedPointer BrowserService::selectedDatabase()
return getDatabase();
}
-bool BrowserService::moveSettingsToCustomData(Entry* entry, const QString& name)
-{
- if (entry->attributes()->contains(name)) {
- QString attr = entry->attributes()->value(name);
- entry->beginUpdate();
- if (!attr.isEmpty()) {
- entry->customData()->set(KEEPASSXCBROWSER_NAME, attr);
- }
- entry->attributes()->remove(name);
- entry->endUpdate();
- return true;
- }
- return false;
-}
-
-int BrowserService::moveKeysToCustomData(Entry* entry, QSharedPointer db)
-{
- int keyCounter = 0;
- for (const auto& key : entry->attributes()->keys()) {
- if (key.contains(CustomData::BrowserLegacyKeyPrefix)) {
- QString publicKey = key;
- publicKey.remove(CustomData::BrowserLegacyKeyPrefix);
-
- // Add key to database custom data
- if (db && !db->metadata()->customData()->contains(CustomData::BrowserKeyPrefix + publicKey)) {
- db->metadata()->customData()->set(CustomData::BrowserKeyPrefix + publicKey,
- entry->attributes()->value(key));
- ++keyCounter;
- }
- }
- }
-
- return keyCounter;
-}
-
-bool BrowserService::checkLegacySettings(QSharedPointer db)
-{
- if (!db || !browserSettings()->isEnabled() || browserSettings()->noMigrationPrompt()) {
- return false;
- }
-
- bool legacySettingsFound = false;
- QList entries = db->rootGroup()->entriesRecursive();
- for (const auto& e : entries) {
- if (e->isRecycled()) {
- continue;
- }
-
- if ((e->attributes()->contains(KEEPASSHTTP_NAME) || e->attributes()->contains(KEEPASSXCBROWSER_NAME))
- || (e->title() == KEEPASSHTTP_NAME || e->title().contains(KEEPASSXCBROWSER_NAME, Qt::CaseInsensitive))) {
- legacySettingsFound = true;
- break;
- }
- }
-
- if (!legacySettingsFound) {
- return false;
- }
-
- auto* checkbox = new QCheckBox(tr("Don't show this warning again"));
- QObject::connect(checkbox, &QCheckBox::stateChanged, [&](int state) {
- browserSettings()->setNoMigrationPrompt(static_cast(state) == Qt::CheckState::Checked);
- });
-
- auto dialogResult =
- MessageBox::warning(nullptr,
- tr("KeePassXC: Legacy browser integration settings detected"),
- tr("Your KeePassXC-Browser settings need to be moved into the database settings.\n"
- "This is necessary to maintain your current browser connections.\n"
- "Would you like to migrate your existing settings now?"),
- MessageBox::Yes | MessageBox::No,
- MessageBox::NoButton,
- MessageBox::Raise,
- checkbox);
-
- return dialogResult == MessageBox::Yes;
-}
-
QStringList BrowserService::getEntryURLs(const Entry* entry)
{
QStringList urlList;
@@ -1440,11 +1290,6 @@ void BrowserService::databaseUnlocked(DatabaseWidget* dbWidget)
QJsonObject msg;
msg["action"] = QString("database-unlocked");
m_browserHost->broadcastClientMessage(msg);
-
- auto db = dbWidget->database();
- if (checkLegacySettings(db)) {
- convertAttributesToCustomData(db);
- }
}
}
diff --git a/src/browser/BrowserService.h b/src/browser/BrowserService.h
index b9e153248..c9fc83b75 100644
--- a/src/browser/BrowserService.h
+++ b/src/browser/BrowserService.h
@@ -1,6 +1,7 @@
/*
- * Copyright (C) 2013 Francois Ferrand
* Copyright (C) 2022 KeePassXC Team
+ * Copyright (C) 2017 Sami Vänttinen
+ * Copyright (C) 2013 Francois Ferrand
*
* 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
@@ -88,7 +89,6 @@ public:
const StringPairList& keyList,
const bool httpAuth = false);
void requestGlobalAutoType(const QString& search);
- static void convertAttributesToCustomData(QSharedPointer db);
static const QString KEEPASSXCBROWSER_NAME;
static const QString KEEPASSXCBROWSER_OLD_NAME;
@@ -157,16 +157,11 @@ private:
QSharedPointer selectedDatabase();
QString getDatabaseRootUuid();
QString getDatabaseRecycleBinUuid();
- bool checkLegacySettings(QSharedPointer db);
QStringList getEntryURLs(const Entry* entry);
void hideWindow() const;
void raiseWindow(const bool force = false);
-
void updateWindowState();
- static bool moveSettingsToCustomData(Entry* entry, const QString& name);
- static int moveKeysToCustomData(Entry* entry, QSharedPointer db);
-
QPointer m_browserHost;
QHash> m_browserClients;
diff --git a/src/browser/NativeMessageInstaller.cpp b/src/browser/NativeMessageInstaller.cpp
index f4876f4e8..2d5054ec9 100644
--- a/src/browser/NativeMessageInstaller.cpp
+++ b/src/browser/NativeMessageInstaller.cpp
@@ -225,7 +225,7 @@ QString NativeMessageInstaller::getNativeMessagePath(SupportedBrowsers browser)
} else {
basePath = QDir::homePath() + "/.config";
}
-#elif defined(Q_OS_LINUX)
+#elif defined(Q_OS_LINUX) || (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
if (browser == SupportedBrowsers::TOR_BROWSER) {
basePath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
} else if (browser == SupportedBrowsers::FIREFOX) {
diff --git a/src/cli/AddGroup.cpp b/src/cli/AddGroup.cpp
index d323ecff8..762afa80f 100644
--- a/src/cli/AddGroup.cpp
+++ b/src/cli/AddGroup.cpp
@@ -29,9 +29,7 @@ AddGroup::AddGroup()
positionalArguments.append({QString("group"), QObject::tr("Path of the group to add."), QString("")});
}
-AddGroup::~AddGroup()
-{
-}
+AddGroup::~AddGroup() = default;
int AddGroup::executeWithDatabase(QSharedPointer database, QSharedPointer parser)
{
diff --git a/src/cli/Command.cpp b/src/cli/Command.cpp
index 4bba8fff9..f138fb5c8 100644
--- a/src/cli/Command.cpp
+++ b/src/cli/Command.cpp
@@ -103,9 +103,7 @@ Command::Command()
options.append(Command::QuietOption);
}
-Command::~Command()
-{
-}
+Command::~Command() = default;
QString Command::getDescriptionLine()
{
diff --git a/src/cli/DatabaseCreate.cpp b/src/cli/DatabaseCreate.cpp
index 10b424825..c2444645b 100644
--- a/src/cli/DatabaseCreate.cpp
+++ b/src/cli/DatabaseCreate.cpp
@@ -149,7 +149,7 @@ QSharedPointer DatabaseCreate::initializeDatabaseFromOptions(const QSh
* If a key file is specified but it can't be loaded, the function will
* fail.
*
- * If the database is being saved in a non existant directory, the
+ * If the database is being saved in a non existent directory, the
* function will fail.
*
* @return EXIT_SUCCESS on success, or EXIT_FAILURE on failure
diff --git a/src/cli/Generate.cpp b/src/cli/Generate.cpp
index 980e9fa14..1f6ceff5d 100644
--- a/src/cli/Generate.cpp
+++ b/src/cli/Generate.cpp
@@ -93,7 +93,7 @@ QSharedPointer Generate::createGenerator(QSharedPointersetLength(PasswordGenerator::DefaultLength);
} else if (passwordLength.toInt() <= 0) {
err << QObject::tr("Invalid password length %1").arg(passwordLength) << endl;
- return QSharedPointer(nullptr);
+ return {};
} else {
passwordGenerator->setLength(passwordLength.toInt());
}
@@ -139,7 +139,7 @@ QSharedPointer Generate::createGenerator(QSharedPointerisValid()) {
err << QObject::tr("Invalid password generator after applying all options") << endl;
- return QSharedPointer(nullptr);
+ return {};
}
return passwordGenerator;
diff --git a/src/cli/Import.cpp b/src/cli/Import.cpp
index cc74df767..a9d7a5a2f 100644
--- a/src/cli/Import.cpp
+++ b/src/cli/Import.cpp
@@ -28,7 +28,7 @@
* A password can be specified to encrypt the database.
* If none is specified the function will fail.
*
- * If the database is being saved in a non existant directory, the
+ * If the database is being saved in a non existent directory, the
* function will fail.
*
* @return EXIT_SUCCESS on success, or EXIT_FAILURE on failure
diff --git a/src/cli/Move.cpp b/src/cli/Move.cpp
index a9ee78614..8cdf96eb9 100644
--- a/src/cli/Move.cpp
+++ b/src/cli/Move.cpp
@@ -30,9 +30,7 @@ Move::Move()
positionalArguments.append({QString("group"), QObject::tr("Path of the destination group."), QString("")});
}
-Move::~Move()
-{
-}
+Move::~Move() = default;
int Move::executeWithDatabase(QSharedPointer database, QSharedPointer parser)
{
diff --git a/src/cli/RemoveGroup.cpp b/src/cli/RemoveGroup.cpp
index 6455af496..15bb01c29 100644
--- a/src/cli/RemoveGroup.cpp
+++ b/src/cli/RemoveGroup.cpp
@@ -30,9 +30,7 @@ RemoveGroup::RemoveGroup()
positionalArguments.append({QString("group"), QObject::tr("Path of the group to remove."), QString("")});
}
-RemoveGroup::~RemoveGroup()
-{
-}
+RemoveGroup::~RemoveGroup() = default;
int RemoveGroup::executeWithDatabase(QSharedPointer database, QSharedPointer parser)
{
diff --git a/src/cli/Utils.cpp b/src/cli/Utils.cpp
index d8134de26..bca837db8 100644
--- a/src/cli/Utils.cpp
+++ b/src/cli/Utils.cpp
@@ -384,7 +384,7 @@ namespace Utils
if (fieldName == TagsFieldName) {
return entry->tags();
}
- return QString("");
+ return "";
}
QStringList findAttributes(const EntryAttributes& attributes, const QString& name)
@@ -413,7 +413,7 @@ namespace Utils
*
* @param path Path to the key file to be loaded
* @param fileKey Resulting fileKey
- * @return true if the key file was loaded succesfully
+ * @return true if the key file was loaded successfully
*/
bool loadFileKey(const QString& path, QSharedPointer& fileKey)
{
diff --git a/src/core/AsyncTask.h b/src/core/AsyncTask.h
index 581865419..244d0ff92 100644
--- a/src/core/AsyncTask.h
+++ b/src/core/AsyncTask.h
@@ -64,7 +64,7 @@ namespace AsyncTask
*
* @param task std::function object to run
* @param context QObject responsible for calling this function
- * @param callback std::function object to run after the task completess
+ * @param callback std::function object to run after the task completes
*/
template
void runThenCallback(FunctionObject task, QObject* context, FunctionObject2 callback)
diff --git a/src/core/Base32.cpp b/src/core/Base32.cpp
index 05841121a..d0a148eec 100644
--- a/src/core/Base32.cpp
+++ b/src/core/Base32.cpp
@@ -50,7 +50,7 @@ QVariant Base32::decode(const QByteArray& encodedData)
}
if (encodedData.size() % 8 != 0) {
- return QVariant();
+ return {};
}
int nPads = 0;
@@ -119,7 +119,7 @@ QVariant Base32::decode(const QByteArray& encodedData)
continue;
} else {
// illegal character
- return QVariant();
+ return {};
}
}
}
@@ -145,7 +145,7 @@ QVariant Base32::decode(const QByteArray& encodedData)
QByteArray Base32::encode(const QByteArray& data)
{
if (data.size() < 1) {
- return QByteArray();
+ return {};
}
const int nBits = data.size() * 8;
diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp
index 5704d4bff..fcab4d2ae 100644
--- a/src/core/Clock.cpp
+++ b/src/core/Clock.cpp
@@ -50,12 +50,12 @@ QDateTime Clock::serialized(const QDateTime& dateTime)
QDateTime Clock::datetimeUtc(int year, int month, int day, int hour, int min, int second)
{
- return QDateTime(QDate(year, month, day), QTime(hour, min, second), Qt::UTC);
+ return {QDate(year, month, day), QTime(hour, min, second), Qt::UTC};
}
QDateTime Clock::datetime(int year, int month, int day, int hour, int min, int second)
{
- return QDateTime(QDate(year, month, day), QTime(hour, min, second), Qt::LocalTime);
+ return {QDate(year, month, day), QTime(hour, min, second), Qt::LocalTime};
}
QDateTime Clock::datetimeUtc(qint64 msecSinceEpoch)
@@ -78,13 +78,9 @@ QDateTime Clock::parse(const QString& text, const QString& format)
return QDateTime::fromString(text, format);
}
-Clock::~Clock()
-{
-}
+Clock::~Clock() = default;
-Clock::Clock()
-{
-}
+Clock::Clock() = default;
QDateTime Clock::currentDateTimeUtcImpl() const
{
diff --git a/src/core/Config.cpp b/src/core/Config.cpp
index 44896bc1c..5811b2e25 100644
--- a/src/core/Config.cpp
+++ b/src/core/Config.cpp
@@ -454,9 +454,7 @@ Config::Config(QObject* parent)
init(configFiles.first, configFiles.second);
}
-Config::~Config()
-{
-}
+Config::~Config() = default;
void Config::init(const QString& configFileName, const QString& localConfigFileName)
{
diff --git a/src/core/Database.cpp b/src/core/Database.cpp
index 508cbe51c..5ba2ab367 100644
--- a/src/core/Database.cpp
+++ b/src/core/Database.cpp
@@ -275,8 +275,8 @@ bool Database::saveAs(const QString& filePath, SaveAction action, const QString&
bool isNewFile = !QFile::exists(realFilePath);
bool ok = AsyncTask::runAndWaitForFuture([&] { return performSave(realFilePath, action, backupFilePath, error); });
if (ok) {
- markAsClean();
setFilePath(filePath);
+ markAsClean();
if (isNewFile) {
QFile::setPermissions(realFilePath, QFile::ReadUser | QFile::WriteUser);
}
@@ -346,7 +346,7 @@ bool Database::performSave(const QString& filePath, SaveAction action, const QSt
tempFile.setAutoRemove(false);
QFile::setPermissions(filePath, perms);
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
- // Retain orginal creation time
+ // Retain original creation time
tempFile.setFileTime(createTime, QFile::FileBirthTime);
#endif
return true;
diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp
index 48fd6a769..251e18631 100644
--- a/src/core/Entry.cpp
+++ b/src/core/Entry.cpp
@@ -1236,7 +1236,7 @@ QString Entry::referenceFieldValue(EntryReferenceType referenceType) const
default:
break;
}
- return QString();
+ return {};
}
void Entry::moveUp()
@@ -1353,7 +1353,7 @@ QString Entry::resolvePlaceholder(const QString& placeholder) const
QString Entry::resolveUrlPlaceholder(const QString& str, Entry::PlaceholderType placeholderType) const
{
if (str.isEmpty()) {
- return QString();
+ return {};
}
const QUrl qurl(str);
@@ -1384,7 +1384,7 @@ QString Entry::resolveUrlPlaceholder(const QString& str, Entry::PlaceholderType
}
}
- return QString();
+ return {};
}
Entry::PlaceholderType Entry::placeholderType(const QString& placeholder) const
@@ -1456,7 +1456,7 @@ QString Entry::resolveUrl(const QString& url) const
}
// No URL in this command
- return QString("");
+ return {};
}
if (!newUrl.isEmpty() && !newUrl.contains("://")) {
diff --git a/src/core/Group.cpp b/src/core/Group.cpp
index 273ada2cb..f9aa9d142 100644
--- a/src/core/Group.cpp
+++ b/src/core/Group.cpp
@@ -166,7 +166,7 @@ QString Group::effectiveAutoTypeSequence() const
const Group* group = this;
do {
if (group->autoTypeEnabled() == Group::Disable) {
- return QString();
+ return {};
}
sequence = group->defaultAutoTypeSequence();
diff --git a/src/core/Group.h b/src/core/Group.h
index 4d1ddfd83..4e7f7cb0c 100644
--- a/src/core/Group.h
+++ b/src/core/Group.h
@@ -43,7 +43,7 @@ public:
KeepLocal, // merge history forcing local as top regardless of age
KeepRemote, // merge history forcing remote as top regardless of age
KeepNewer, // merge history
- Synchronize, // merge history keeping most recent as top entry and appling deletions
+ Synchronize, // merge history keeping most recent as top entry and applying deletions
};
enum CloneFlag
diff --git a/src/core/PassphraseGenerator.cpp b/src/core/PassphraseGenerator.cpp
index ef1d867e2..79227817e 100644
--- a/src/core/PassphraseGenerator.cpp
+++ b/src/core/PassphraseGenerator.cpp
@@ -116,7 +116,7 @@ QString PassphraseGenerator::generatePassphrase() const
// In case there was an error loading the wordlist
if (m_wordlist.length() == 0) {
- return QString();
+ return {};
}
QStringList words;
diff --git a/src/core/SignalMultiplexer.cpp b/src/core/SignalMultiplexer.cpp
index d1ed89e30..99f7fab15 100644
--- a/src/core/SignalMultiplexer.cpp
+++ b/src/core/SignalMultiplexer.cpp
@@ -19,9 +19,7 @@
#include "core/Global.h"
-SignalMultiplexer::SignalMultiplexer()
-{
-}
+SignalMultiplexer::SignalMultiplexer() = default;
SignalMultiplexer::~SignalMultiplexer()
{
diff --git a/src/core/TimeDelta.cpp b/src/core/TimeDelta.cpp
index 0037396f6..94cea03c8 100644
--- a/src/core/TimeDelta.cpp
+++ b/src/core/TimeDelta.cpp
@@ -29,22 +29,22 @@ QDateTime operator+(const QDateTime& dateTime, const TimeDelta& delta)
TimeDelta TimeDelta::fromHours(int hours)
{
- return TimeDelta(hours, 0, 0, 0);
+ return {hours, 0, 0, 0};
}
TimeDelta TimeDelta::fromDays(int days)
{
- return TimeDelta(0, days, 0, 0);
+ return {0, days, 0, 0};
}
TimeDelta TimeDelta::fromMonths(int months)
{
- return TimeDelta(0, 0, months, 0);
+ return {0, 0, months, 0};
}
TimeDelta TimeDelta::fromYears(int years)
{
- return TimeDelta(0, 0, 0, years);
+ return {0, 0, 0, years};
}
TimeDelta::TimeDelta()
diff --git a/src/crypto/CryptoHash.cpp b/src/crypto/CryptoHash.cpp
index 5177bb86f..a1dc6595e 100644
--- a/src/crypto/CryptoHash.cpp
+++ b/src/crypto/CryptoHash.cpp
@@ -106,7 +106,7 @@ QByteArray CryptoHash::result() const
} else if (d->hashFunction) {
result = d->hashFunction->final();
}
- return QByteArray(reinterpret_cast(result.data()), result.size());
+ return {reinterpret_cast(result.data()), int(result.size())};
}
QByteArray CryptoHash::hash(const QByteArray& data, Algorithm algo)
diff --git a/src/crypto/SymmetricCipher.cpp b/src/crypto/SymmetricCipher.cpp
index 4d3a7bdfe..1ed05bb33 100644
--- a/src/crypto/SymmetricCipher.cpp
+++ b/src/crypto/SymmetricCipher.cpp
@@ -267,3 +267,22 @@ int SymmetricCipher::blockSize(Mode mode)
return 0;
}
}
+
+int SymmetricCipher::ivSize(Mode mode)
+{
+ switch (mode) {
+ case Aes128_CBC:
+ case Aes256_CBC:
+ case Aes128_CTR:
+ case Aes256_CTR:
+ case Twofish_CBC:
+ return 16;
+ case Aes256_GCM:
+ return 12;
+ case Salsa20:
+ case ChaCha20:
+ return 8;
+ default:
+ return 0;
+ }
+}
diff --git a/src/crypto/SymmetricCipher.h b/src/crypto/SymmetricCipher.h
index 83b54658f..e18f623f3 100644
--- a/src/crypto/SymmetricCipher.h
+++ b/src/crypto/SymmetricCipher.h
@@ -70,6 +70,7 @@ public:
static int defaultIvSize(Mode mode);
static int keySize(Mode mode);
static int blockSize(Mode mode);
+ static int ivSize(Mode mode);
private:
static QString modeToString(const Mode mode);
diff --git a/src/format/KdbxXmlReader.cpp b/src/format/KdbxXmlReader.cpp
index e66e12174..eb7fa4158 100644
--- a/src/format/KdbxXmlReader.cpp
+++ b/src/format/KdbxXmlReader.cpp
@@ -183,7 +183,7 @@ QString KdbxXmlReader::errorString() const
.arg(m_xml.lineNumber())
.arg(m_xml.columnNumber());
}
- return QString();
+ return {};
}
bool KdbxXmlReader::isTrueValue(const QStringRef& value)
@@ -1117,13 +1117,13 @@ QUuid KdbxXmlReader::readUuid()
{
QByteArray uuidBin = readBinary();
if (uuidBin.isEmpty()) {
- return QUuid();
+ return {};
}
if (uuidBin.length() != UUID_LENGTH) {
if (m_strictMode) {
raiseError(tr("Invalid uuid value"));
}
- return QUuid();
+ return {};
}
return QUuid::fromRfc4122(uuidBin);
}
diff --git a/src/format/KeePass1Reader.cpp b/src/format/KeePass1Reader.cpp
index 993939a44..144e1b473 100644
--- a/src/format/KeePass1Reader.cpp
+++ b/src/format/KeePass1Reader.cpp
@@ -391,7 +391,7 @@ QByteArray KeePass1Reader::key(const QByteArray& password, const QByteArray& key
if (!result) {
raiseError(tr("Key transformation failed"));
- return QByteArray();
+ return {};
}
CryptoHash hash(CryptoHash::Sha256);
@@ -927,7 +927,7 @@ QDateTime KeePass1Reader::dateFromPackedStruct(const QByteArray& data)
// check for the special "never" datetime
if (dateTime == QDateTime(QDate(2999, 12, 28), QTime(23, 59, 59), Qt::UTC)) {
- return QDateTime();
+ return {};
} else {
return dateTime;
}
@@ -943,13 +943,13 @@ bool KeePass1Reader::isMetaStream(const Entry* entry)
QByteArray KeePass1Reader::readKeyfile(QIODevice* device)
{
if (device->size() == 0) {
- return QByteArray();
+ return {};
}
if (device->size() == 32) {
QByteArray data = device->read(32);
if (data.size() != 32) {
- return QByteArray();
+ return {};
}
return data;
@@ -959,7 +959,7 @@ QByteArray KeePass1Reader::readKeyfile(QIODevice* device)
QByteArray data = device->read(64);
if (data.size() != 64) {
- return QByteArray();
+ return {};
}
if (Tools::isHex(data)) {
@@ -974,7 +974,7 @@ QByteArray KeePass1Reader::readKeyfile(QIODevice* device)
do {
if (!Tools::readFromDevice(device, buffer)) {
- return QByteArray();
+ return {};
}
cryptoHash.addData(buffer);
} while (!buffer.isEmpty());
diff --git a/src/format/KeePass2RandomStream.cpp b/src/format/KeePass2RandomStream.cpp
index 509e32513..da6df20ad 100644
--- a/src/format/KeePass2RandomStream.cpp
+++ b/src/format/KeePass2RandomStream.cpp
@@ -50,7 +50,7 @@ QByteArray KeePass2RandomStream::randomBytes(int size, bool* ok)
if (m_buffer.size() == m_offset) {
if (!loadBlock()) {
*ok = false;
- return QByteArray();
+ return {};
}
}
@@ -71,7 +71,7 @@ QByteArray KeePass2RandomStream::process(const QByteArray& data, bool* ok)
QByteArray randomData = randomBytes(data.size(), &randomBytesOk);
if (!randomBytesOk) {
*ok = false;
- return QByteArray();
+ return {};
}
QByteArray result;
diff --git a/src/format/KeePass2Writer.cpp b/src/format/KeePass2Writer.cpp
index 4cf0d4ad6..76e8cacc3 100644
--- a/src/format/KeePass2Writer.cpp
+++ b/src/format/KeePass2Writer.cpp
@@ -184,7 +184,7 @@ void KeePass2Writer::raiseError(const QString& errorMessage)
*/
QSharedPointer KeePass2Writer::writer() const
{
- return QSharedPointer();
+ return {};
}
/**
diff --git a/src/format/OpData01.cpp b/src/format/OpData01.cpp
index 3ded0288c..a51ff8fdb 100644
--- a/src/format/OpData01.cpp
+++ b/src/format/OpData01.cpp
@@ -27,9 +27,7 @@ OpData01::OpData01(QObject* parent)
{
}
-OpData01::~OpData01()
-{
-}
+OpData01::~OpData01() = default;
bool OpData01::decodeBase64(QString const& b64String, const QByteArray& key, const QByteArray& hmacKey)
{
diff --git a/src/format/OpVaultReader.cpp b/src/format/OpVaultReader.cpp
index 201354bce..44f0d85ec 100644
--- a/src/format/OpVaultReader.cpp
+++ b/src/format/OpVaultReader.cpp
@@ -35,9 +35,7 @@ OpVaultReader::OpVaultReader(QObject* parent)
{
}
-OpVaultReader::~OpVaultReader()
-{
-}
+OpVaultReader::~OpVaultReader() = default;
Database* OpVaultReader::readDatabase(QDir& opdataDir, const QString& password)
{
@@ -301,11 +299,11 @@ QJsonObject OpVaultReader::readAndAssertJsonFile(QFile& file, const QString& str
auto absFilePath = fileInfo.absoluteFilePath();
if (!fileInfo.exists()) {
qCritical() << QString("File \"%1\" must exist").arg(absFilePath);
- return QJsonObject();
+ return {};
}
if (!fileInfo.isReadable()) {
qCritical() << QString("File \"%1\" must be readable").arg(absFilePath);
- return QJsonObject();
+ return {};
}
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -331,7 +329,7 @@ QJsonObject OpVaultReader::readAndAssertJsonFile(QFile& file, const QString& str
QJsonDocument jDoc = QJsonDocument::fromJson(filePayload, error);
if (!jDoc.isObject()) {
qCritical() << "Expected " << filePayload << "to be a JSON Object";
- return QJsonObject();
+ return {};
}
return jDoc.object();
}
diff --git a/src/gui/AboutDialog.cpp b/src/gui/AboutDialog.cpp
index 00d12c65e..e48fa8c49 100644
--- a/src/gui/AboutDialog.cpp
+++ b/src/gui/AboutDialog.cpp
@@ -327,9 +327,7 @@ AboutDialog::AboutDialog(QWidget* parent)
m_ui->buttonBox->button(QDialogButtonBox::Close)->setDefault(true);
}
-AboutDialog::~AboutDialog()
-{
-}
+AboutDialog::~AboutDialog() = default;
void AboutDialog::copyToClipboard()
{
diff --git a/src/gui/ApplicationSettingsWidget.cpp b/src/gui/ApplicationSettingsWidget.cpp
index 7972e8e0c..901afeab9 100644
--- a/src/gui/ApplicationSettingsWidget.cpp
+++ b/src/gui/ApplicationSettingsWidget.cpp
@@ -175,9 +175,7 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent)
m_secUi->quickUnlockCheckBox->setVisible(showQuickUnlock);
}
-ApplicationSettingsWidget::~ApplicationSettingsWidget()
-{
-}
+ApplicationSettingsWidget::~ApplicationSettingsWidget() = default;
void ApplicationSettingsWidget::addSettingsPage(ISettingsPage* page)
{
diff --git a/src/gui/ApplicationSettingsWidget.h b/src/gui/ApplicationSettingsWidget.h
index e7acb37b7..5c6572173 100644
--- a/src/gui/ApplicationSettingsWidget.h
+++ b/src/gui/ApplicationSettingsWidget.h
@@ -30,9 +30,7 @@ namespace Ui
class ISettingsPage
{
public:
- virtual ~ISettingsPage()
- {
- }
+ virtual ~ISettingsPage() = default;
virtual QString name() = 0;
virtual QIcon icon() = 0;
virtual QWidget* createWidget() = 0;
diff --git a/src/gui/CategoryListWidget.cpp b/src/gui/CategoryListWidget.cpp
index 8da7431b5..cae806f62 100644
--- a/src/gui/CategoryListWidget.cpp
+++ b/src/gui/CategoryListWidget.cpp
@@ -43,9 +43,7 @@ CategoryListWidget::CategoryListWidget(QWidget* parent)
// clang-format on
}
-CategoryListWidget::~CategoryListWidget()
-{
-}
+CategoryListWidget::~CategoryListWidget() = default;
QSize CategoryListWidget::sizeHint() const
{
@@ -64,8 +62,8 @@ QSize CategoryListWidget::sizeHint() const
QSize CategoryListWidget::minimumSizeHint() const
{
- return QSize(m_itemDelegate->minWidth() + m_ui->categoryList->frameWidth() * 2,
- m_ui->categoryList->sizeHintForRow(0) * 2);
+ return {m_itemDelegate->minWidth() + m_ui->categoryList->frameWidth() * 2,
+ m_ui->categoryList->sizeHintForRow(0) * 2};
}
int CategoryListWidget::addCategory(const QString& labelText, const QIcon& icon)
diff --git a/src/gui/Clipboard.cpp b/src/gui/Clipboard.cpp
index 2def33c81..c5ee9c6a0 100644
--- a/src/gui/Clipboard.cpp
+++ b/src/gui/Clipboard.cpp
@@ -52,24 +52,19 @@ void Clipboard::setText(const QString& text, bool clear)
}
auto* mime = new QMimeData;
-#ifdef Q_OS_MACOS
mime->setText(text);
+#if defined(Q_OS_MACOS)
mime->setData("application/x-nspasteboard-concealed-type", text.toUtf8());
- clipboard->setMimeData(mime, QClipboard::Clipboard);
-#else
- mime->setText(text);
-#ifdef Q_OS_LINUX
+#elif defined(Q_OS_UNIX)
mime->setData("x-kde-passwordManagerHint", QByteArrayLiteral("secret"));
-#endif
-#ifdef Q_OS_WIN
+#elif defined(Q_OS_WIN)
mime->setData("ExcludeClipboardContentFromMonitorProcessing", QByteArrayLiteral("1"));
#endif
- clipboard->setMimeData(mime, QClipboard::Clipboard);
if (clipboard->supportsSelection()) {
clipboard->setMimeData(mime, QClipboard::Selection);
}
-#endif
+ clipboard->setMimeData(mime, QClipboard::Clipboard);
if (clear) {
m_lastCopied = text;
diff --git a/src/gui/CloneDialog.cpp b/src/gui/CloneDialog.cpp
index 8ce368a60..0ce2c5f2e 100644
--- a/src/gui/CloneDialog.cpp
+++ b/src/gui/CloneDialog.cpp
@@ -61,6 +61,4 @@ void CloneDialog::cloneEntry()
close();
}
-CloneDialog::~CloneDialog()
-{
-}
+CloneDialog::~CloneDialog() = default;
diff --git a/src/gui/DatabaseOpenDialog.cpp b/src/gui/DatabaseOpenDialog.cpp
index e1b9391d0..3eef249f1 100644
--- a/src/gui/DatabaseOpenDialog.cpp
+++ b/src/gui/DatabaseOpenDialog.cpp
@@ -68,13 +68,13 @@ DatabaseOpenDialog::DatabaseOpenDialog(QWidget* parent)
auto* shortcut = new QShortcut(Qt::CTRL + Qt::Key_PageUp, this);
shortcut->setContext(Qt::WidgetWithChildrenShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { selectTabOffset(-1); });
- shortcut = new QShortcut(dbTabModifier + Qt::Key_Tab, this);
+ shortcut = new QShortcut(dbTabModifier + Qt::SHIFT + Qt::Key_Tab, this);
shortcut->setContext(Qt::WidgetWithChildrenShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { selectTabOffset(-1); });
shortcut = new QShortcut(Qt::CTRL + Qt::Key_PageDown, this);
shortcut->setContext(Qt::WidgetWithChildrenShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { selectTabOffset(1); });
- shortcut = new QShortcut(dbTabModifier + Qt::SHIFT + Qt::Key_Tab, this);
+ shortcut = new QShortcut(dbTabModifier + Qt::Key_Tab, this);
shortcut->setContext(Qt::WidgetWithChildrenShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { selectTabOffset(1); });
}
diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp
index aff418627..882d8d057 100644
--- a/src/gui/DatabaseOpenWidget.cpp
+++ b/src/gui/DatabaseOpenWidget.cpp
@@ -141,9 +141,7 @@ DatabaseOpenWidget::DatabaseOpenWidget(QWidget* parent)
connect(m_ui->resetQuickUnlockButton, &QPushButton::pressed, this, [this] { resetQuickUnlock(); });
}
-DatabaseOpenWidget::~DatabaseOpenWidget()
-{
-}
+DatabaseOpenWidget::~DatabaseOpenWidget() = default;
void DatabaseOpenWidget::showEvent(QShowEvent* event)
{
@@ -538,9 +536,6 @@ bool DatabaseOpenWidget::isOnQuickUnlockScreen()
*/
void DatabaseOpenWidget::resetQuickUnlock()
{
- if (!isQuickUnlockAvailable()) {
- return;
- }
#if defined(Q_CC_MSVC)
getWindowsHello()->reset(m_filename);
#elif defined(Q_OS_MACOS)
diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp
index 8d95aaef1..d4e50116f 100644
--- a/src/gui/DatabaseTabWidget.cpp
+++ b/src/gui/DatabaseTabWidget.cpp
@@ -68,9 +68,7 @@ DatabaseTabWidget::DatabaseTabWidget(QWidget* parent)
connect(&m_lockDelayTimer, &QTimer::timeout, this, [this] { lockDatabases(); });
}
-DatabaseTabWidget::~DatabaseTabWidget()
-{
-}
+DatabaseTabWidget::~DatabaseTabWidget() = default;
void DatabaseTabWidget::toggleTabbar()
{
@@ -244,6 +242,7 @@ void DatabaseTabWidget::addDatabaseTab(DatabaseWidget* dbWidget, bool inBackgrou
SLOT(updateTabName()));
connect(dbWidget, SIGNAL(databaseModified()), SLOT(updateTabName()));
connect(dbWidget, SIGNAL(databaseSaved()), SLOT(updateTabName()));
+ connect(dbWidget, SIGNAL(databaseSaved()), SLOT(updateLastDatabases()));
connect(dbWidget, SIGNAL(databaseUnlocked()), SLOT(updateTabName()));
connect(dbWidget, SIGNAL(databaseUnlocked()), SLOT(emitDatabaseLockChanged()));
connect(dbWidget, SIGNAL(databaseLocked()), SLOT(updateTabName()));
@@ -331,7 +330,7 @@ void DatabaseTabWidget::importOpVaultDatabase()
* Attempt to close the current database and remove its tab afterwards.
*
* @param index index of the database tab to close
- * @return true if database was closed successully
+ * @return true if database was closed successfully
*/
bool DatabaseTabWidget::closeCurrentDatabaseTab()
{
@@ -342,7 +341,7 @@ bool DatabaseTabWidget::closeCurrentDatabaseTab()
* Attempt to close the database tab that sent the close request.
*
* @param index index of the database tab to close
- * @return true if database was closed successully
+ * @return true if database was closed successfully
*/
bool DatabaseTabWidget::closeDatabaseTabFromSender()
{
@@ -353,7 +352,7 @@ bool DatabaseTabWidget::closeDatabaseTabFromSender()
* Attempt to close a database and remove its tab afterwards.
*
* @param index index of the database tab to close
- * @return true if database was closed successully
+ * @return true if database was closed successfully
*/
bool DatabaseTabWidget::closeDatabaseTab(int index)
{
@@ -364,7 +363,7 @@ bool DatabaseTabWidget::closeDatabaseTab(int index)
* Attempt to close a database and remove its tab afterwards.
*
* @param dbWidget \link DatabaseWidget to close
- * @return true if database was closed successully
+ * @return true if database was closed successfully
*/
bool DatabaseTabWidget::closeDatabaseTab(DatabaseWidget* dbWidget)
{
@@ -829,6 +828,18 @@ void DatabaseTabWidget::updateLastDatabases(const QString& filename)
}
}
+void DatabaseTabWidget::updateLastDatabases()
+{
+ auto dbWidget = currentDatabaseWidget();
+
+ if (dbWidget) {
+ auto filePath = dbWidget->database()->filePath();
+ if (!filePath.isEmpty()) {
+ updateLastDatabases(filePath);
+ }
+ }
+}
+
void DatabaseTabWidget::emitActiveDatabaseChanged()
{
emit activeDatabaseChanged(currentDatabaseWidget());
diff --git a/src/gui/DatabaseTabWidget.h b/src/gui/DatabaseTabWidget.h
index 38a1822bf..3a6791a80 100644
--- a/src/gui/DatabaseTabWidget.h
+++ b/src/gui/DatabaseTabWidget.h
@@ -105,6 +105,7 @@ private slots:
void emitDatabaseLockChanged();
void handleDatabaseUnlockDialogFinished(bool accepted, DatabaseWidget* dbWidget);
void handleExportError(const QString& reason);
+ void updateLastDatabases();
private:
QSharedPointer execNewDatabaseWizard();
diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp
index 76191fd2b..882a87f49 100644
--- a/src/gui/DatabaseWidget.cpp
+++ b/src/gui/DatabaseWidget.cpp
@@ -1837,7 +1837,7 @@ QStringList DatabaseWidget::customEntryAttributes() const
{
Entry* entry = m_entryView->currentEntry();
if (!entry) {
- return QStringList();
+ return {};
}
return entry->attributes()->customKeys();
diff --git a/src/gui/DatabaseWidgetStateSync.cpp b/src/gui/DatabaseWidgetStateSync.cpp
index 9cc22254f..7264c23df 100644
--- a/src/gui/DatabaseWidgetStateSync.cpp
+++ b/src/gui/DatabaseWidgetStateSync.cpp
@@ -36,9 +36,7 @@ DatabaseWidgetStateSync::DatabaseWidgetStateSync(QObject* parent)
connect(qApp, &QCoreApplication::aboutToQuit, this, &DatabaseWidgetStateSync::sync);
}
-DatabaseWidgetStateSync::~DatabaseWidgetStateSync()
-{
-}
+DatabaseWidgetStateSync::~DatabaseWidgetStateSync() = default;
/**
* Sync state with persistent storage.
diff --git a/src/gui/EditWidget.cpp b/src/gui/EditWidget.cpp
index 92e221607..719656744 100644
--- a/src/gui/EditWidget.cpp
+++ b/src/gui/EditWidget.cpp
@@ -45,9 +45,7 @@ EditWidget::EditWidget(QWidget* parent)
connect(m_ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), SLOT(buttonClicked(QAbstractButton*)));
}
-EditWidget::~EditWidget()
-{
-}
+EditWidget::~EditWidget() = default;
void EditWidget::addPage(const QString& labelText, const QIcon& icon, QWidget* widget)
{
diff --git a/src/gui/EditWidgetIcons.cpp b/src/gui/EditWidgetIcons.cpp
index 25542730c..e57e23c94 100644
--- a/src/gui/EditWidgetIcons.cpp
+++ b/src/gui/EditWidgetIcons.cpp
@@ -86,9 +86,7 @@ EditWidgetIcons::EditWidgetIcons(QWidget* parent)
#endif
}
-EditWidgetIcons::~EditWidgetIcons()
-{
-}
+EditWidgetIcons::~EditWidgetIcons() = default;
IconStruct EditWidgetIcons::state()
{
diff --git a/src/gui/EditWidgetProperties.cpp b/src/gui/EditWidgetProperties.cpp
index 3e26352d3..4aea1510c 100644
--- a/src/gui/EditWidgetProperties.cpp
+++ b/src/gui/EditWidgetProperties.cpp
@@ -41,9 +41,7 @@ EditWidgetProperties::EditWidgetProperties(QWidget* parent)
connect(m_ui->removeCustomDataButton, SIGNAL(clicked()), SLOT(removeSelectedPluginData()));
}
-EditWidgetProperties::~EditWidgetProperties()
-{
-}
+EditWidgetProperties::~EditWidgetProperties() = default;
void EditWidgetProperties::setFields(const TimeInfo& timeInfo, const QUuid& uuid)
{
diff --git a/src/gui/EntryPreviewWidget.cpp b/src/gui/EntryPreviewWidget.cpp
index d864560dd..a3eda3f37 100644
--- a/src/gui/EntryPreviewWidget.cpp
+++ b/src/gui/EntryPreviewWidget.cpp
@@ -107,9 +107,7 @@ EntryPreviewWidget::EntryPreviewWidget(QWidget* parent)
#endif
}
-EntryPreviewWidget::~EntryPreviewWidget()
-{
-}
+EntryPreviewWidget::~EntryPreviewWidget() = default;
void EntryPreviewWidget::clear()
{
diff --git a/src/gui/FileDialog.cpp b/src/gui/FileDialog.cpp
index 0d46898fb..84b19e260 100644
--- a/src/gui/FileDialog.cpp
+++ b/src/gui/FileDialog.cpp
@@ -21,9 +21,7 @@
FileDialog* FileDialog::m_instance(nullptr);
-FileDialog::FileDialog()
-{
-}
+FileDialog::FileDialog() = default;
QString FileDialog::getOpenFileName(QWidget* parent,
const QString& caption,
diff --git a/src/gui/Font.h b/src/gui/Font.h
index d53f0c407..878dbb53d 100644
--- a/src/gui/Font.h
+++ b/src/gui/Font.h
@@ -27,9 +27,7 @@ public:
static QFont fixedFont();
private:
- Font()
- {
- }
+ Font() = default;
};
#endif // KEEPASSX_FONT_H
diff --git a/src/gui/HtmlExporter.cpp b/src/gui/HtmlExporter.cpp
index 70249ed26..654909463 100644
--- a/src/gui/HtmlExporter.cpp
+++ b/src/gui/HtmlExporter.cpp
@@ -85,15 +85,6 @@ namespace
item.append("");
}
- const auto& n = entry.notes();
- if (!n.isEmpty()) {
- item.append("