diff options
author | Jonathan White <support@dmapps.us> | 2021-06-12 05:13:52 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2021-06-12 05:13:52 +0300 |
commit | 9c108b95100bfa3b172edcfd5754aa2e831a3221 (patch) | |
tree | 837101ac7854d5df6adaf49fdfa76cd84494c896 | |
parent | 2b262c5b2438d8ef8febcde5ede2043a4e00c192 (diff) | |
parent | 596821ca0d1be143a16501bc978feeb801db6f79 (diff) |
Fixed
- Fix focusing search when pressing hotkey [#6603]
- Trim whitespace from TOTP key input prior to processing [#6604]
- Fix building on macOS [#6598]
- Resolve compiler warnings for unused return values [#6607]
-rw-r--r-- | CHANGELOG.md | 9 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | share/linux/org.keepassxc.KeePassXC.appdata.xml | 10 | ||||
-rw-r--r-- | share/translations/keepassx_el.ts | 4 | ||||
-rw-r--r-- | share/translations/keepassx_hu.ts | 16 | ||||
-rw-r--r-- | share/translations/keepassx_zh_TW.ts | 16 | ||||
-rw-r--r-- | snap/snapcraft.yaml | 2 | ||||
-rw-r--r-- | src/gui/Application.cpp | 4 | ||||
-rw-r--r-- | src/gui/SearchWidget.cpp | 3 | ||||
-rw-r--r-- | src/gui/TotpSetupDialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/osutils/macutils/AppKitImpl.mm | 9 | ||||
-rw-r--r-- | tests/TestDatabase.cpp | 4 | ||||
-rw-r--r-- | tests/TestKeys.cpp | 2 | ||||
-rw-r--r-- | tests/gui/TestGui.cpp | 13 | ||||
-rw-r--r-- | tests/gui/TestGui.h | 2 |
15 files changed, 53 insertions, 45 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e21063e5f..948532f55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 2.6.6 (2021-06-11) + +### Fixed + +- Fix focusing search when pressing hotkey [#6603] +- Trim whitespace from TOTP key input prior to processing [#6604] +- Fix building on macOS [#6598] +- Resolve compiler warnings for unused return values [#6607] + ## 2.6.5 (2021-06-07) ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index dd7861cf1..401ab6290 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,7 +101,7 @@ endif() set(KEEPASSXC_VERSION_MAJOR "2") set(KEEPASSXC_VERSION_MINOR "6") -set(KEEPASSXC_VERSION_PATCH "5") +set(KEEPASSXC_VERSION_PATCH "6") set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}") set(OVERRIDE_VERSION "" CACHE STRING "Override the KeePassXC Version for Snapshot builds") diff --git a/share/linux/org.keepassxc.KeePassXC.appdata.xml b/share/linux/org.keepassxc.KeePassXC.appdata.xml index fb9eb6f0c..a91f7b6a4 100644 --- a/share/linux/org.keepassxc.KeePassXC.appdata.xml +++ b/share/linux/org.keepassxc.KeePassXC.appdata.xml @@ -50,6 +50,16 @@ </screenshots> <releases> + <release version="2.6.6" date="2021-06-11"> + <description> + <ul> + <li>Fix focusing search when pressing hotkey [#6603]</li> + <li>Trim whitespace from TOTP key input prior to processing [#6604]</li> + <li>Fix building on macOS [#6598]</li> + <li>Resolve compiler warnings for unused return values [#6607]</li> + </ul> + </description> + </release> <release version="2.6.5" date="2021-06-07"> <description> <ul> diff --git a/share/translations/keepassx_el.ts b/share/translations/keepassx_el.ts index ea0d138a5..8d14def4e 100644 --- a/share/translations/keepassx_el.ts +++ b/share/translations/keepassx_el.ts @@ -4705,11 +4705,11 @@ Expect some bugs and minor issues, this version is not meant for production use. </message> <message> <source>Database &Security…</source> - <translation>Βάση Δεδομένων & Ασφάλεια...</translation> + <translation>Ασφάλεια Βάσης Δεδομένων...</translation> </message> <message> <source>Database &Reports...</source> - <translation>Βάση Δεδομένων & Αναφορές...</translation> + <translation>Αναφορές Βάσης Δεδομένων...</translation> </message> <message> <source>Statistics, health check, etc.</source> diff --git a/share/translations/keepassx_hu.ts b/share/translations/keepassx_hu.ts index c14164f8f..e5d65205d 100644 --- a/share/translations/keepassx_hu.ts +++ b/share/translations/keepassx_hu.ts @@ -4405,15 +4405,15 @@ Valóban folytatható a művelet ezzel a fájllal?</translation> </message> <message> <source>Generate a new key file or choose an existing one to protect your database.</source> - <translation type="unfinished"/> + <translation>Új kulcsfájl generálása vagy egy meglévő kulcsfájl kijelölése az adatbázis védelméhez.</translation> </message> <message> <source>Note: Do NOT use a file that may change as that will prevent you from unlocking your database.</source> - <translation type="unfinished"/> + <translation>Megjegyzés: NEM szabad olyan fájlt használni, amely megváltozhat, mivel ez megakadályozza az adatbázis feloldását!</translation> </message> <message> <source>Browse…</source> - <translation type="unfinished"/> + <translation>Tallózás…</translation> </message> </context> <context> @@ -5515,7 +5515,7 @@ Néhány hiba és kisebb nehézségek várhatóak, ezért ez a verzió nem aján </message> <message> <source>Excluded characters: "0", "O", "1", "l", "I", "|", "G", "6", "B", "8", "﹒"</source> - <translation type="unfinished"/> + <translation>Kihagyott karakterek: „0”, „O”, „1”, „l”, „I”, „|”, „G”, „6”, „B”, „8”, „﹒”</translation> </message> </context> <context> @@ -6792,19 +6792,19 @@ Fontolja meg, hogy új kulcsfájlt állítson elő.</translation> </message> <message numerus="yes"> <source>Clearing the clipboard in %1 second(s)…</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>Vágólap törlése %1 másodperc múlva…</numerusform><numerusform>Vágólap törlése %1 másodperc múlva…</numerusform></translation> </message> <message> <source>lock all open databases</source> - <translation type="unfinished"/> + <translation>Összes nyitott adatbázis zárolása</translation> </message> <message> <source>Locked databases.</source> - <translation type="unfinished"/> + <translation>Zárolt adatbázisok.</translation> </message> <message> <source>Database failed to lock.</source> - <translation type="unfinished"/> + <translation>Adatbázis-zárolás sikertelen.</translation> </message> </context> <context> diff --git a/share/translations/keepassx_zh_TW.ts b/share/translations/keepassx_zh_TW.ts index d3e938f2b..472a5be53 100644 --- a/share/translations/keepassx_zh_TW.ts +++ b/share/translations/keepassx_zh_TW.ts @@ -4404,15 +4404,15 @@ Are you sure you want to continue with this file?</source> </message> <message> <source>Generate a new key file or choose an existing one to protect your database.</source> - <translation type="unfinished"/> + <translation>產生新金鑰檔或選擇既有金鑰以保護您的資料庫。</translation> </message> <message> <source>Note: Do NOT use a file that may change as that will prevent you from unlocking your database.</source> - <translation type="unfinished"/> + <translation>注意:請勿使用可變動的檔案,否則將導致資料庫無法解鎖。</translation> </message> <message> <source>Browse…</source> - <translation type="unfinished"/> + <translation>瀏覽…</translation> </message> </context> <context> @@ -5515,7 +5515,7 @@ Expect some bugs and minor issues, this version is not meant for production use. </message> <message> <source>Excluded characters: "0", "O", "1", "l", "I", "|", "G", "6", "B", "8", "﹒"</source> - <translation type="unfinished"/> + <translation>排除以下字元:"0", "O", "1", "l", "I", "|", "G", "6", "B", "8", "﹒"</translation> </message> </context> <context> @@ -6792,19 +6792,19 @@ Please consider generating a new key file.</source> </message> <message numerus="yes"> <source>Clearing the clipboard in %1 second(s)…</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>將於 %1 秒後清空剪貼簿...</numerusform></translation> </message> <message> <source>lock all open databases</source> - <translation type="unfinished"/> + <translation>鎖定所有開啟的資料庫</translation> </message> <message> <source>Locked databases.</source> - <translation type="unfinished"/> + <translation>已鎖定的資料庫。</translation> </message> <message> <source>Database failed to lock.</source> - <translation type="unfinished"/> + <translation>資料庫鎖定失敗。</translation> </message> </context> <context> diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 822b10398..5cc73a127 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: keepassxc -version: 2.6.5 +version: 2.6.6 grade: stable summary: Community-driven port of the Windows application “KeePass Password Safe” description: | diff --git a/src/gui/Application.cpp b/src/gui/Application.cpp index 973e29032..273b662ec 100644 --- a/src/gui/Application.cpp +++ b/src/gui/Application.cpp @@ -235,7 +235,7 @@ void Application::handleUnixSignal(int sig) case SIGINT: case SIGTERM: { char buf = 0; - Q_UNUSED(::write(unixSignalSocket[0], &buf, sizeof(buf))); + Q_UNUSED(!::write(unixSignalSocket[0], &buf, sizeof(buf))); return; } case SIGHUP: @@ -247,7 +247,7 @@ void Application::quitBySignal() { m_unixSignalNotifier->setEnabled(false); char buf; - Q_UNUSED(::read(unixSignalSocket[1], &buf, sizeof(buf))); + Q_UNUSED(!::read(unixSignalSocket[1], &buf, sizeof(buf))); emit quitSignalReceived(); } #endif diff --git a/src/gui/SearchWidget.cpp b/src/gui/SearchWidget.cpp index 4cf53a9ac..9498e4507 100644 --- a/src/gui/SearchWidget.cpp +++ b/src/gui/SearchWidget.cpp @@ -51,9 +51,6 @@ SearchWidget::SearchWidget(QWidget* parent) connect(m_clearSearchTimer, SIGNAL(timeout()), SLOT(clearSearch())); connect(this, SIGNAL(escapePressed()), SLOT(clearSearch())); - new QShortcut(QKeySequence::Find, this, SLOT(searchFocus()), nullptr, Qt::ApplicationShortcut); - new QShortcut(Qt::Key_Escape, m_ui->searchEdit, SLOT(clear()), nullptr, Qt::ApplicationShortcut); - m_ui->searchEdit->setPlaceholderText(tr("Search (%1)...", "Search placeholder text, %1 is the keyboard shortcut") .arg(QKeySequence(QKeySequence::Find).toString(QKeySequence::NativeText))); m_ui->searchEdit->installEventFilter(this); diff --git a/src/gui/TotpSetupDialog.cpp b/src/gui/TotpSetupDialog.cpp index b350bedc4..1d403a17c 100644 --- a/src/gui/TotpSetupDialog.cpp +++ b/src/gui/TotpSetupDialog.cpp @@ -46,7 +46,7 @@ void TotpSetupDialog::saveSettings() { // Secret key sanity check // Convert user input to all uppercase and remove '=' - auto key = m_ui->seedEdit->text().toUpper().remove(" ").remove("=").toLatin1(); + auto key = m_ui->seedEdit->text().toUpper().remove(" ").remove("=").trimmed().toLatin1(); auto sanitizedKey = Base32::sanitizeInput(key); // Use startsWith to ignore added '=' for padding at the end if (!sanitizedKey.startsWith(key)) { diff --git a/src/gui/osutils/macutils/AppKitImpl.mm b/src/gui/osutils/macutils/AppKitImpl.mm index 31362c8e6..fa52693b4 100644 --- a/src/gui/osutils/macutils/AppKitImpl.mm +++ b/src/gui/osutils/macutils/AppKitImpl.mm @@ -17,13 +17,8 @@ */ #import "AppKitImpl.h" -#include "AppKit.h" - -#import <AppKit/NSStatusBar.h> -#import <AppKit/NSStatusItem.h> -#import <AppKit/NSStatusBarButton.h> -#import <AppKit/NSWorkspace.h> -#import <CoreVideo/CVPixelBuffer.h> +#import <QWindow> +#import <Cocoa/Cocoa.h> @implementation AppKitImpl diff --git a/tests/TestDatabase.cpp b/tests/TestDatabase.cpp index c3a3a8c42..8ec4a1bd7 100644 --- a/tests/TestDatabase.cpp +++ b/tests/TestDatabase.cpp @@ -23,6 +23,7 @@ #include "config-keepassx-tests.h" #include "core/Metadata.h" +#include "core/Tools.h" #include "crypto/Crypto.h" #include "format/KeePass2Writer.h" #include "keys/PasswordKey.h" @@ -118,6 +119,9 @@ void TestDatabase::testSignals() QVERIFY(db->save(&error)); QCOMPARE(spySaved.count(), 1); + // Short delay to allow file system settling to reduce test failures + Tools::wait(100); + QSignalSpy spyFileChanged(db.data(), SIGNAL(databaseFileChanged())); QVERIFY(tempFile.copyFromFile(dbFileName)); QTRY_COMPARE(spyFileChanged.count(), 1); diff --git a/tests/TestKeys.cpp b/tests/TestKeys.cpp index cbbaae398..9fa75f795 100644 --- a/tests/TestKeys.cpp +++ b/tests/TestKeys.cpp @@ -235,7 +235,7 @@ void TestKeys::benchmarkTransformKey() QBENCHMARK { - Q_UNUSED(compositeKey->transform(kdf, result)); + Q_UNUSED(!compositeKey->transform(kdf, result)); }; } diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index 65ca319bc..0de8be359 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -853,7 +853,7 @@ void TestGui::testTotp() void TestGui::testSearch() { // Add canned entries for consistent testing - Q_UNUSED(addCannedEntries()); + addCannedEntries(); auto* toolBar = m_mainWindow->findChild<QToolBar*>("toolBar"); @@ -1007,7 +1007,7 @@ void TestGui::testSearch() void TestGui::testDeleteEntry() { // Add canned entries for consistent testing - Q_UNUSED(addCannedEntries()); + addCannedEntries(); auto* groupView = m_dbWidget->findChild<GroupView*>("groupView"); auto* entryView = m_dbWidget->findChild<EntryView*>("entryView"); @@ -1673,10 +1673,8 @@ void TestGui::testAutoType() entryView->selectionModel()->clearSelection(); } -int TestGui::addCannedEntries() +void TestGui::addCannedEntries() { - int entries_added = 0; - // Find buttons auto* toolBar = m_mainWindow->findChild<QToolBar*>("toolBar"); QWidget* entryNewWidget = toolBar->widgetForAction(m_mainWindow->findChild<QAction*>("actionEntryNew")); @@ -1689,22 +1687,17 @@ int TestGui::addCannedEntries() QTest::keyClicks(titleEdit, "test"); auto* editEntryWidgetButtonBox = editEntryWidget->findChild<QDialogButtonBox*>("buttonBox"); QTest::mouseClick(editEntryWidgetButtonBox->button(QDialogButtonBox::Ok), Qt::LeftButton); - ++entries_added; // Add entry "something 2" QTest::mouseClick(entryNewWidget, Qt::LeftButton); QTest::keyClicks(titleEdit, "something 2"); QTest::keyClicks(passwordEdit, "something 2"); QTest::mouseClick(editEntryWidgetButtonBox->button(QDialogButtonBox::Ok), Qt::LeftButton); - ++entries_added; // Add entry "something 3" QTest::mouseClick(entryNewWidget, Qt::LeftButton); QTest::keyClicks(titleEdit, "something 3"); QTest::mouseClick(editEntryWidgetButtonBox->button(QDialogButtonBox::Ok), Qt::LeftButton); - ++entries_added; - - return entries_added; } void TestGui::checkDatabase(QString dbFileName) diff --git a/tests/gui/TestGui.h b/tests/gui/TestGui.h index 5bfc04265..b41e22227 100644 --- a/tests/gui/TestGui.h +++ b/tests/gui/TestGui.h @@ -72,7 +72,7 @@ private slots: void testTrayRestoreHide(); private: - int addCannedEntries(); + void addCannedEntries(); void checkDatabase(QString dbFileName = ""); void triggerAction(const QString& name); void dragAndDropGroup(const QModelIndex& sourceIndex, |