Merge branch 'master' into develop

This commit is contained in:
Janek Bevendorff 2019-06-12 01:10:25 +02:00
commit 38524507d5
No known key found for this signature in database
GPG Key ID: 2FDEB0D40BCA5E11
14 changed files with 1168 additions and 1248 deletions

View File

@ -1,3 +1,11 @@
2.4.3 (2019-06-12)
=========================
- Fix library loading issues in the Snap and macOS releases [#3247]
- Fix various keyboard navigation issues [#3248]
- Fix main window toggling regression when clicking the tray icon on KDE [#3258]
- Add documentation for keyboard shortcuts to source code distribution [#3215]
2.4.2 (2019-05-31)
=========================

View File

@ -1,97 +0,0 @@
# KeePassXC Linux Release Build Dockerfile
# Copyright (C) 2017-2018 KeePassXC team <https://keepassxc.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 or (at your option)
# version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM ubuntu:14.04
ENV REBUILD_COUNTER=10
ENV QT5_VERSION=qt510
ENV QT5_PPA_VERSION=qt-5.10.1
ENV TERM=xterm-256color
RUN set -x \
&& apt-get update -y \
&& apt-get -y install software-properties-common
RUN set -x \
&& add-apt-repository ppa:beineri/opt-${QT5_PPA_VERSION}-trusty \
&& add-apt-repository ppa:phoerious/keepassxc
RUN set -x \
&& apt-get update -y \
&& apt-get upgrade -y
# build and runtime dependencies
RUN set -x \
&& apt-get install -y \
cmake3 \
curl \
g++ \
git \
libgcrypt20-18-dev \
libargon2-0-dev \
libsodium-dev \
libcurl-no-gcrypt-dev \
${QT5_VERSION}base \
${QT5_VERSION}tools \
${QT5_VERSION}x11extras \
${QT5_VERSION}translations \
${QT5_VERSION}imageformats \
${QT5_VERSION}svg \
zlib1g-dev \
libxi-dev \
libxtst-dev \
# ubuntu:14.04 has no quazip (it's optional)
# libquazip5-dev \
mesa-common-dev \
libyubikey-dev \
libykpers-1-dev \
libqrencode-dev \
xclip \
xvfb
ENV PATH="/opt/${QT5_VERSION}/bin:${PATH}"
ENV CMAKE_PREFIX_PATH="/opt/${QT5_VERSION}/lib/cmake"
ENV CMAKE_INCLUDE_PATH="/opt/keepassxc-libs/include"
ENV CMAKE_LIBRARY_PATH="/opt/keepassxc-libs/lib/x86_64-linux-gnu"
ENV CPATH="${CMAKE_INCLUDE_PATH}"
ENV LD_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}:/opt/${QT5_VERSION}/lib"
RUN set -x \
&& echo "/opt/${QT5_VERSION}/lib" > /etc/ld.so.conf.d/${QT5_VERSION}.conf \
&& echo "/opt/keepassxc-libs/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/keepassxc.conf
# AppImage dependencies
RUN set -x \
&& apt-get install -y \
curl \
libfuse2
RUN set -x \
&& curl -L "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" > /usr/bin/linuxdeploy \
&& curl -L "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" > /usr/bin/linuxdeploy-plugin-qt \
&& curl -L "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" > /usr/bin/appimagetool \
&& chmod +x /usr/bin/linuxdeploy \
&& chmod +x /usr/bin/linuxdeploy-plugin-qt \
&& chmod +x /usr/bin/appimagetool
RUN set -x \
&& apt-get autoremove --purge \
&& rm -rf /var/lib/apt/lists/*
VOLUME /keepassxc/src
VOLUME /keepassxc/out
WORKDIR /keepassxc

View File

@ -144,10 +144,7 @@ DESTDIR=X
Packaging
=========
You can create a package to redistribute KeePassXC (zip, deb, rpm, dmg, etc..)
```
make package
```
You can create a package to redistribute KeePassXC (zip, deb, rpm, dmg, etc..). Refer to [keepassxc-packaging](https://github.com/keepassxreboot/keepassxc-packaging)
Testing

View File

@ -34,6 +34,7 @@ so please check out your distribution's package list to see if KeePassXC is avai
- Many bug fixes
For a full list of features and changes, read the [CHANGELOG](CHANGELOG) document.
For a full list of keyboard shortcuts, see [KEYBINDS](./docs/KEYBINDS.md)
## Building KeePassXC

View File

@ -1,95 +0,0 @@
# KeePassXC Linux Release Build Dockerfile
# Copyright (C) 2017 KeePassXC team <https://keepassxc.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 or (at your option)
# version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# TIP: check this Dockerfile using this online tool: https://www.fromlatest.io
FROM ubuntu:14.04
ENV REBUILD_COUNTER=5
ENV QT5_VERSION=qt53
ENV QT5_PPA_VERSION=${QT5_VERSION}2
ENV TERM=xterm-256color
RUN set -x \
&& apt-get update -y \
&& apt-get -y install software-properties-common
RUN set -x \
&& add-apt-repository ppa:beineri/opt-${QT5_PPA_VERSION}-trusty \
&& add-apt-repository ppa:phoerious/keepassxc
RUN set -x \
&& apt-get -y update \
&& apt-get -y --no-install-recommends install \
build-essential \
clang-3.6 \
libclang-common-3.6-dev \
clang-format-3.6 \
llvm-3.6 \
cmake3 \
make \
libgcrypt20-18-dev \
libargon2-0-dev \
libsodium-dev \
libcurl-no-gcrypt-dev \
${QT5_VERSION}base \
${QT5_VERSION}tools \
${QT5_VERSION}x11extras \
${QT5_VERSION}translations \
${QT5_VERSION}svg \
zlib1g-dev \
libyubikey-dev \
libykpers-1-dev \
# ubuntu:14.04 has no quazip (it's optional)
# libquazip5-dev \
libxi-dev \
libxtst-dev \
libqrencode-dev \
xclip \
xvfb
ENV PATH="/opt/${QT5_VERSION}/bin:${PATH}"
ENV CMAKE_PREFIX_PATH="/opt/${QT5_VERSION}/lib/cmake"
ENV CMAKE_INCLUDE_PATH="/opt/keepassxc-libs/include"
ENV CMAKE_LIBRARY_PATH="/opt/keepassxc-libs/lib/x86_64-linux-gnu"
ENV CPATH="${CMAKE_INCLUDE_PATH}"
ENV LD_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}:/opt/${QT5_VERSION}/lib"
RUN set -x \
&& echo "/opt/${QT5_VERSION}/lib" > /etc/ld.so.conf.d/${QT5_VERSION}.conf \
&& echo "/opt/keepassxc-libs/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/keepassxc.conf
# AppImage dependencies
RUN set -x \
&& apt-get install -y \
curl \
libfuse2
RUN set -x \
&& curl -L "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" > /usr/bin/linuxdeploy \
&& curl -L "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" > /usr/bin/linuxdeploy-plugin-qt \
&& curl -L "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" > /usr/bin/appimagetool \
&& chmod +x /usr/bin/linuxdeploy \
&& chmod +x /usr/bin/linuxdeploy-plugin-qt \
&& chmod +x /usr/bin/appimagetool
RUN set -x \
&& apt-get autoremove --purge \
&& rm -rf /var/lib/apt/lists/*
VOLUME ["/keepassxc"]
WORKDIR /keepassxc

34
docs/KEYBINDS.md Normal file
View File

@ -0,0 +1,34 @@
# List of Keyboard Shortcuts for KeepassXC
Actions | Keyboard Shortcuts
---------------------------|----------------------------
New Database | Ctrl + Shift + N
Open Database | Ctrl + O
Save Database | Ctrl + S
Save Database As | Ctrl + Shift + S
Close Database | Ctrl + W
Lock Databases | Ctrl + L
Quit | Ctrl + Q
New Entry | Ctrl + N
Edit Entry | Ctrl + E
Delete Entry | Ctrl + D
Clone Entry | Ctrl + K
Show TOTP | Ctrl + Shift + T
Copy TOTP | Ctrl + T
Copy Username | Ctrl + B
Copy Password | Ctrl + C
Trigger AutoType | Ctrl + Shift - V
Open Url | Ctrl + Shift - U
Copy Url | Ctrl + U
Show Minimized | Ctrl + M
Hide Window | Ctrl + Shift - M
Select Next Database Tab | Ctrl + Tab *OR* Ctrl + PGDN
Select Previous Datase Tab | Ctrl + Shift + Tab *OR* Ctrl + PGUP
Toggle Passwords Hidden | Ctrl + Shift + C
Toggle Usernames Hidden | Ctrl + Shift + B
Focus Search | Ctrl + F
Clear Search | ESC

View File

@ -50,6 +50,16 @@
</screenshots>
<releases>
<release version="2.4.3" date="2019-06-12">
<description>
<ul>
<li>Fix library loading issues in the Snap and macOS releases [#3247]</li>
<li>Fix various keyboard navigation issues [#3248]</li>
<li>Fix main window toggling regression when clicking the tray icon on KDE [#3258]</li>
<li>Add documentation for keyboard shortcuts to source code distribution [#3215]</li>
</ul>
</description>
</release>
<release version="2.4.2" date="2019-05-31">
<description>
<ul>

View File

@ -3158,19 +3158,19 @@ Line %2, column %3</source>
</message>
<message>
<source>Disabled share %1</source>
<translation type="unfinished"/>
<translation> %1 </translation>
</message>
<message>
<source>Import from share %1</source>
<translation type="unfinished"/>
<translation> %1 </translation>
</message>
<message>
<source>Export to share %1</source>
<translation type="unfinished"/>
<translation> %1 </translation>
</message>
<message>
<source>Synchronize with share %1</source>
<translation type="unfinished"/>
<translation> %1 </translation>
</message>
</context>
<context>
@ -5259,11 +5259,11 @@ Available commands:
</message>
<message>
<source>Multiple import source path to %1 in %2</source>
<translation type="unfinished"/>
<translation>%2 %1 </translation>
</message>
<message>
<source>Conflicting export target path %1 in %2</source>
<translation type="unfinished"/>
<translation>%2 %1 </translation>
</message>
<message>
<source>Could not embed signature: Could not open file to write (%1)</source>

File diff suppressed because it is too large Load Diff

View File

@ -86,6 +86,7 @@ parts:
- libusb-1.0-0
- qtwayland5
- qt5-gtk-platformtheme # for theming, font settings, cursor and to use gtk3 file chooser
- libqrencode3
override-build: |
snapcraftctl build
sed -i 's|Icon=keepassxc|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/keepassxc.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/org.keepassxc.KeePassXC.desktop
@ -121,6 +122,7 @@ parts:
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libgtk2.0-0
- libqt5svg5 # for loading icon themes which are svg
- try: [appmenu-qt5] # not available on core18
- locales-all

View File

@ -25,6 +25,7 @@
#include <QMimeData>
#include <QShortcut>
#include <QTimer>
#include <QWindow>
#include "config-keepassx.h"
@ -160,9 +161,9 @@ MainWindow::MainWindow()
setAcceptDrops(true);
// Setup the search widget in the toolbar
auto* search = new SearchWidget();
search->connectSignals(m_actionMultiplexer);
m_searchWidgetAction = m_ui->toolBar->addWidget(search);
m_searchWidget = new SearchWidget();
m_searchWidget->connectSignals(m_actionMultiplexer);
m_searchWidgetAction = m_ui->toolBar->addWidget(m_searchWidget);
m_searchWidgetAction->setEnabled(false);
m_countDefaultAttributes = m_ui->menuEntryCopyAttribute->actions().size();
@ -268,7 +269,9 @@ MainWindow::MainWindow()
m_ui->actionEntryCopyURL->setShortcutVisibleInContextMenu(true);
#endif
connect(m_ui->menuEntries, SIGNAL(aboutToShow()), SLOT(obtainContextFocusLock()));
connect(m_ui->menuEntries, SIGNAL(aboutToHide()), SLOT(releaseContextFocusLock()));
connect(m_ui->menuGroups, SIGNAL(aboutToShow()), SLOT(obtainContextFocusLock()));
connect(m_ui->menuGroups, SIGNAL(aboutToHide()), SLOT(releaseContextFocusLock()));
// Control window state
@ -323,9 +326,9 @@ MainWindow::MainWindow()
// Notify search when the active database changes or gets locked
connect(m_ui->tabWidget,
SIGNAL(activateDatabaseChanged(DatabaseWidget*)),
search,
m_searchWidget,
SLOT(databaseChanged(DatabaseWidget*)));
connect(m_ui->tabWidget, SIGNAL(databaseLocked(DatabaseWidget*)), search, SLOT(databaseChanged()));
connect(m_ui->tabWidget, SIGNAL(databaseLocked(DatabaseWidget*)), m_searchWidget, SLOT(databaseChanged()));
connect(m_ui->tabWidget, SIGNAL(tabNameChanged()), SLOT(updateWindowTitle()));
connect(m_ui->tabWidget, SIGNAL(currentChanged(int)), SLOT(updateWindowTitle()));
@ -562,9 +565,10 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
switch (mode) {
case DatabaseWidget::Mode::ViewMode: {
// bool inSearch = dbWidget->isInSearchMode();
bool singleEntrySelected = dbWidget->numberOfSelectedEntries() == 1 && (m_contextMenuFocusLock || dbWidget->currentEntryHasFocus());
bool entriesSelected = dbWidget->numberOfSelectedEntries() > 0 && (m_contextMenuFocusLock || dbWidget->currentEntryHasFocus());
bool hasFocus = m_contextMenuFocusLock || menuBar()->hasFocus() || m_searchWidget->hasFocus()
|| dbWidget->currentEntryHasFocus();
bool singleEntrySelected = dbWidget->numberOfSelectedEntries() == 1 && hasFocus;
bool entriesSelected = dbWidget->numberOfSelectedEntries() > 0 && hasFocus;
bool groupSelected = dbWidget->isGroupSelected();
bool recycleBinSelected = dbWidget->isRecycleBinSelected();
@ -1014,6 +1018,11 @@ void MainWindow::updateTrayIcon()
}
}
void MainWindow::obtainContextFocusLock()
{
m_contextMenuFocusLock = true;
}
void MainWindow::releaseContextFocusLock()
{
m_contextMenuFocusLock = false;
@ -1021,13 +1030,11 @@ void MainWindow::releaseContextFocusLock()
void MainWindow::showEntryContextMenu(const QPoint& globalPos)
{
m_contextMenuFocusLock = true;
m_ui->menuEntries->popup(globalPos);
}
void MainWindow::showGroupContextMenu(const QPoint& globalPos)
{
m_contextMenuFocusLock = true;
m_ui->menuGroups->popup(globalPos);
}
@ -1106,9 +1113,16 @@ void MainWindow::processTrayIconTrigger()
toggleWindow();
} else if (m_trayIconTriggerReason == QSystemTrayIcon::Trigger
|| m_trayIconTriggerReason == QSystemTrayIcon::MiddleClick) {
// On single/middle click focus the window if it is not hidden
// and did not have focus less than a second ago, otherwise toggle
if (isHidden() || (Clock::currentSecondsSinceEpoch() - m_lastFocusOutTime) <= 1) {
// Toggle window if hidden
// If on windows, check if focus switched within the last second because
// clicking the tray icon removes focus from main window
// If on Linux or macOS, check if the window is active
if (isHidden()
#ifdef Q_OS_WIN
|| (Clock::currentSecondsSinceEpoch() - m_lastFocusOutTime) <= 1) {
#else
|| windowHandle()->isActive()) {
#endif
toggleWindow();
} else {
bringToFront();

View File

@ -34,6 +34,7 @@ namespace Ui
}
class InactivityTimer;
class SearchWidget;
class MainWindow : public QMainWindow
{
@ -119,6 +120,7 @@ private slots:
void selectPreviousDatabaseTab();
void togglePasswordsHidden();
void toggleUsernamesHidden();
void obtainContextFocusLock();
void releaseContextFocusLock();
private:
@ -146,6 +148,7 @@ private:
int m_countDefaultAttributes;
QSystemTrayIcon* m_trayIcon;
ScreenLockListener* m_screenLockListener;
QPointer<SearchWidget> m_searchWidget;
Q_DISABLE_COPY(MainWindow)

View File

@ -35,6 +35,7 @@ SearchWidget::SearchWidget(QWidget* parent)
, m_clearSearchTimer(new QTimer(this))
{
m_ui->setupUi(this);
setFocusProxy(m_ui->searchEdit);
m_helpWidget = new PopupHelpWidget(m_ui->searchEdit);
m_helpWidget->setOffset(QPoint(0, 1));

View File

@ -44,6 +44,8 @@ if(WITH_XC_BROWSER)
"@executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork"
-change /usr/local/opt/qt/lib/QtNetwork.framework/Versions/5/QtNetwork
"@executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork"
-change /usr/local/opt/libsodium/lib/libsodium.23.dylib
"@executable_path/../Frameworks/libsodium.23.dylib"
keepassxc-proxy
COMMENT "Changing linking of keepassxc-proxy")