Skip to content

Commit

Permalink
Release 2.6.6
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
droidmonkey committed Jun 12, 2021
2 parents 2b262c5 + 596821c commit 9c108b9
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 45 deletions.
9 changes: 9 additions & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -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")

Expand Down
10 changes: 10 additions & 0 deletions share/linux/org.keepassxc.KeePassXC.appdata.xml
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions share/translations/keepassx_el.ts
Expand Up @@ -4705,11 +4705,11 @@ Expect some bugs and minor issues, this version is not meant for production use.
</message>
<message>
<source>Database &amp;Security…</source>
<translation>Βάση Δεδομένων &amp; Ασφάλεια...</translation>
<translation>Ασφάλεια Βάσης Δεδομένων...</translation>
</message>
<message>
<source>Database &amp;Reports...</source>
<translation>Βάση Δεδομένων &amp; Αναφορές...</translation>
<translation>Αναφορές Βάσης Δεδομένων...</translation>
</message>
<message>
<source>Statistics, health check, etc.</source>
Expand Down
16 changes: 8 additions & 8 deletions share/translations/keepassx_hu.ts
Expand Up @@ -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>
Expand Down Expand Up @@ -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: &quot;0&quot;, &quot;O&quot;, &quot;1&quot;, &quot;l&quot;, &quot;I&quot;, &quot;|&quot;, &quot;G&quot;, &quot;6&quot;, &quot;B&quot;, &quot;8&quot;, &quot;&quot;</source>
<translation type="unfinished"/>
<translation>Kihagyott karakterek: „0”, „O”, „1”, „l”, „I”, „|”, „G”, „6”, „B”, „8”, „﹒”</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -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>
Expand Down
16 changes: 8 additions & 8 deletions share/translations/keepassx_zh_TW.ts
Expand Up @@ -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>
Expand Down Expand Up @@ -5515,7 +5515,7 @@ Expect some bugs and minor issues, this version is not meant for production use.
</message>
<message>
<source>Excluded characters: &quot;0&quot;, &quot;O&quot;, &quot;1&quot;, &quot;l&quot;, &quot;I&quot;, &quot;|&quot;, &quot;G&quot;, &quot;6&quot;, &quot;B&quot;, &quot;8&quot;, &quot;&quot;</source>
<translation type="unfinished"/>
<translation>排除以下字元:&quot;0&quot;, &quot;O&quot;, &quot;1&quot;, &quot;l&quot;, &quot;I&quot;, &quot;|&quot;, &quot;G&quot;, &quot;6&quot;, &quot;B&quot;, &quot;8&quot;, &quot;&quot;</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion 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: |
Expand Down
4 changes: 2 additions & 2 deletions src/gui/Application.cpp
Expand Up @@ -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:
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/gui/SearchWidget.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/TotpSetupDialog.cpp
Expand Up @@ -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)) {
Expand Down
9 changes: 2 additions & 7 deletions src/gui/osutils/macutils/AppKitImpl.mm
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions tests/TestDatabase.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestKeys.cpp
Expand Up @@ -235,7 +235,7 @@ void TestKeys::benchmarkTransformKey()

QBENCHMARK
{
Q_UNUSED(compositeKey->transform(kdf, result));
Q_UNUSED(!compositeKey->transform(kdf, result));
};
}

Expand Down
13 changes: 3 additions & 10 deletions tests/gui/TestGui.cpp
Expand Up @@ -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");

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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"));
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/gui/TestGui.h
Expand Up @@ -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,
Expand Down

0 comments on commit 9c108b9

Please sign in to comment.