Merge branch 'master'

Conflicts:
	INSTALL.md
	release-tool
	src/browser/BrowserOptionDialog.cpp
	src/browser/BrowserService.cpp
	src/browser/BrowserService.h
	src/browser/NativeMessagingBase.h
	src/browser/NativeMessagingHost.h
	src/core/Uuid.cpp
	src/gui/DatabaseTabWidget.cpp
	src/gui/DatabaseWidget.cpp
	src/gui/EditWidget.cpp
	src/gui/MainWindow.cpp
	src/gui/MainWindow.ui
	src/proxy/NativeMessagingHost.h
	src/sshagent/ASN1Key.cpp
This commit is contained in:
Jonathan White 2018-08-24 08:40:41 -04:00
commit ca27fb06d5
No known key found for this signature in database
GPG key ID: 440FC65F2E0C6E01
52 changed files with 5657 additions and 1106 deletions

View file

@ -23,6 +23,7 @@
#include <QMimeData>
#include <QShortcut>
#include <QTimer>
#include <QDesktopServices>
#include "config-keepassx.h"
@ -298,7 +299,7 @@ MainWindow::MainWindow()
m_actionMultiplexer.connect(m_ui->actionGroupDelete, SIGNAL(triggered()), SLOT(deleteGroup()));
m_actionMultiplexer.connect(m_ui->actionGroupEmptyRecycleBin, SIGNAL(triggered()), SLOT(emptyRecycleBin()));
connect(m_ui->actionSettings, SIGNAL(triggered()), SLOT(switchToSettings()));
connect(m_ui->actionSettings, SIGNAL(toggled(bool)), SLOT(switchToSettings(bool)));
connect(m_ui->actionPasswordGenerator, SIGNAL(toggled(bool)), SLOT(switchToPasswordGen(bool)));
connect(m_ui->passwordGeneratorWidget, SIGNAL(dialogTerminated()), SLOT(closePasswordGen()));
@ -309,6 +310,8 @@ MainWindow::MainWindow()
connect(m_ui->welcomeWidget, SIGNAL(importCsv()), SLOT(switchToImportCsv()));
connect(m_ui->actionAbout, SIGNAL(triggered()), SLOT(showAboutDialog()));
connect(m_ui->actionDonate, SIGNAL(triggered()), SLOT(openDonateUrl()));
connect(m_ui->actionBugReport, SIGNAL(triggered()), SLOT(openBugReportUrl()));
#ifdef Q_OS_MAC
setUnifiedTitleAndToolBarOnMac(true);
@ -335,13 +338,20 @@ MainWindow::MainWindow()
MessageWidget::Error);
}
#ifndef KEEPASSXC_BUILD_TYPE_RELEASE
#if !defined(KEEPASSXC_BUILD_TYPE_RELEASE)
m_ui->globalMessageWidget->showMessage(
tr("WARNING: You are using an unstable build of KeePassXC!\n"
"There is a high risk of corruption, maintain a backup of your databases.\n"
"This version is not meant for production use."),
MessageWidget::Warning,
-1);
MessageWidget::Warning, -1);
#elif (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) && QT_VERSION < QT_VERSION_CHECK(5, 6, 0))
if (!config()->get("QtErrorMessageShown", false).toBool()) {
m_ui->globalMessageWidget->showMessage(
tr("WARNING: Your Qt version may cause KeePassXC to crash with an On-Screen Keyboard!\n"
"We recommend you use the AppImage available on our downloads page."),
MessageWidget::Warning, -1);
config()->set("QtErrorMessageShown", true);
}
#endif
}
@ -551,6 +561,10 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
bool blocked = m_ui->actionPasswordGenerator->blockSignals(true);
m_ui->actionPasswordGenerator->toggle();
m_ui->actionPasswordGenerator->blockSignals(blocked);
} else if ((currentIndex == SettingsScreen) != m_ui->actionSettings->isChecked()) {
bool blocked = m_ui->actionSettings->blockSignals(true);
m_ui->actionSettings->toggle();
m_ui->actionSettings->blockSignals(blocked);
}
}
@ -599,6 +613,16 @@ void MainWindow::showAboutDialog()
aboutDialog->open();
}
void MainWindow::openDonateUrl()
{
QDesktopServices::openUrl(QUrl("https://keepassxc.org/donate"));
}
void MainWindow::openBugReportUrl()
{
QDesktopServices::openUrl(QUrl("https://github.com/keepassxreboot/keepassxc/issues"));
}
void MainWindow::switchToDatabases()
{
if (m_ui->tabWidget->currentIndex() == -1) {
@ -608,19 +632,23 @@ void MainWindow::switchToDatabases()
}
}
void MainWindow::switchToSettings()
void MainWindow::switchToSettings(bool enabled)
{
m_ui->settingsWidget->loadSettings();
m_ui->stackedWidget->setCurrentIndex(SettingsScreen);
if (enabled) {
m_ui->settingsWidget->loadSettings();
m_ui->stackedWidget->setCurrentIndex(SettingsScreen);
} else {
switchToDatabases();
}
}
void MainWindow::switchToPasswordGen(bool enabled)
{
if (enabled == true) {
m_ui->passwordGeneratorWidget->loadSettings();
m_ui->passwordGeneratorWidget->regeneratePassword();
m_ui->passwordGeneratorWidget->setStandaloneMode(true);
m_ui->stackedWidget->setCurrentIndex(PasswordGeneratorScreen);
if (enabled) {
m_ui->passwordGeneratorWidget->loadSettings();
m_ui->passwordGeneratorWidget->regeneratePassword();
m_ui->passwordGeneratorWidget->setStandaloneMode(true);
m_ui->stackedWidget->setCurrentIndex(PasswordGeneratorScreen);
} else {
m_ui->passwordGeneratorWidget->saveSettings();
switchToDatabases();