Remove KeePassHttp plugin and qhttp (#1752)

Remove KeePassHttp plugin and qhttp
This commit is contained in:
Jonathan White 2018-03-31 11:36:18 -04:00 committed by GitHub
parent bd654ea1db
commit 410d88bf99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 7 additions and 10289 deletions

View file

@ -39,12 +39,6 @@
#include "gui/MessageBox.h"
#include "gui/SearchWidget.h"
#ifdef WITH_XC_HTTP
#include "http/Service.h"
#include "http/HttpSettings.h"
#include "http/OptionDialog.h"
#endif
#ifdef WITH_XC_SSHAGENT
#include "sshagent/AgentSettingsPage.h"
#include "sshagent/SSHAgent.h"
@ -65,53 +59,6 @@
#include "gui/SettingsWidget.h"
#include "gui/PasswordGeneratorWidget.h"
#ifdef WITH_XC_HTTP
class HttpPlugin: public ISettingsPage
{
public:
HttpPlugin(DatabaseTabWidget* tabWidget)
{
m_service = new Service(tabWidget);
}
~HttpPlugin() = default;
QString name() override
{
return QObject::tr("Legacy Browser Integration");
}
QIcon icon() override
{
return FilePath::instance()->icon("apps", "internet-web-browser");
}
QWidget * createWidget() override
{
OptionDialog* dlg = new OptionDialog();
QObject::connect(dlg, SIGNAL(removeSharedEncryptionKeys()), m_service, SLOT(removeSharedEncryptionKeys()));
QObject::connect(dlg, SIGNAL(removeStoredPermissions()), m_service, SLOT(removeStoredPermissions()));
return dlg;
}
void loadSettings(QWidget* widget) override
{
qobject_cast<OptionDialog*>(widget)->loadSettings();
}
void saveSettings(QWidget* widget) override
{
qobject_cast<OptionDialog*>(widget)->saveSettings();
if (HttpSettings::isEnabled())
m_service->start();
else
m_service->stop();
}
private:
Service* m_service;
};
#endif
#ifdef WITH_XC_BROWSER
class BrowserPlugin: public ISettingsPage
{
@ -193,9 +140,6 @@ MainWindow::MainWindow()
#ifdef WITH_XC_BROWSER
m_ui->settingsWidget->addSettingsPage(new BrowserPlugin(m_ui->tabWidget));
#endif
#ifdef WITH_XC_HTTP
m_ui->settingsWidget->addSettingsPage(new HttpPlugin(m_ui->tabWidget));
#endif
#ifdef WITH_XC_SSHAGENT
SSHAgent::init(this);
connect(SSHAgent::instance(), SIGNAL(error(QString)), this, SLOT(showErrorMessage(QString)));
@ -419,21 +363,12 @@ MainWindow::MainWindow()
m_ui->globalMessageWidget->showMessage(
tr("Access error for config file %1").arg(config()->getFileName()), MessageWidget::Error);
}
#ifdef WITH_XC_HTTP
if (config()->get("Http/Enabled", false).toBool() && config()->get("Http/DeprecationNoticeShown", 0).toInt() < 3) {
// show message after global widget dismissed all messages
connect(m_ui->globalMessageWidget, SIGNAL(hideAnimationFinished()), this, SLOT(showKeePassHTTPDeprecationNotice()));
}
#endif
#ifndef 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);
#else
// Show the HTTP deprecation message if enabled above
emit m_ui->globalMessageWidget->hideAnimationFinished();
#endif
}
@ -441,20 +376,6 @@ MainWindow::~MainWindow()
{
}
void MainWindow::showKeePassHTTPDeprecationNotice()
{
int warningNum = config()->get("Http/DeprecationNoticeShown", 0).toInt();
displayGlobalMessage(tr("<p>It looks like you are using KeePassHTTP for browser integration. "
"This feature has been deprecated and will be removed in the future.<br>"
"Please switch to KeePassXC-Browser instead! For help with migration, "
"visit our <a class=\"link\" href=\"https://keepassxc.org/docs/keepassxc-browser-migration\">"
"migration guide</a> (warning %1 of 3).</p>").arg(warningNum + 1),
MessageWidget::Warning, true, -1);
config()->set("Http/DeprecationNoticeShown", warningNum + 1);
disconnect(m_ui->globalMessageWidget, SIGNAL(hideAnimationFinished()), this, SLOT(showKeePassHTTPDeprecationNotice()));
}
void MainWindow::showErrorMessage(const QString& message)
{
m_ui->globalMessageWidget->showMessage(message, MessageWidget::Error);