Merge branch 'develop' into feature/yubikey

This commit is contained in:
Janek Bevendorff 2017-02-25 01:09:59 +01:00
commit e25e7ff4a2
No known key found for this signature in database
GPG key ID: CFEC2F6850BFFA53
46 changed files with 1724 additions and 872 deletions

View file

@ -54,34 +54,47 @@
#ifdef WITH_XC_HTTP
class HttpPlugin: public ISettingsPage
{
public:
HttpPlugin(DatabaseTabWidget * tabWidget) {
m_service = new Service(tabWidget);
}
virtual ~HttpPlugin() {
//delete m_service;
}
virtual QString name() {
return QObject::tr("Http");
}
virtual QWidget * createWidget() {
OptionDialog * dlg = new OptionDialog();
QObject::connect(dlg, SIGNAL(removeSharedEncryptionKeys()), m_service, SLOT(removeSharedEncryptionKeys()));
QObject::connect(dlg, SIGNAL(removeStoredPermissions()), m_service, SLOT(removeStoredPermissions()));
return dlg;
}
virtual void loadSettings(QWidget * widget) {
qobject_cast<OptionDialog*>(widget)->loadSettings();
}
virtual void saveSettings(QWidget * widget) {
qobject_cast<OptionDialog*>(widget)->saveSettings();
if (HttpSettings::isEnabled())
m_service->start();
else
m_service->stop();
}
private:
Service *m_service;
public:
HttpPlugin(DatabaseTabWidget * tabWidget)
{
m_service = new Service(tabWidget);
}
~HttpPlugin() = default;
QString name() override
{
return QObject::tr("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
@ -510,7 +523,7 @@ void MainWindow::updateWindowTitle()
void MainWindow::showAboutDialog()
{
AboutDialog* aboutDialog = new AboutDialog(this);
aboutDialog->show();
aboutDialog->open();
}
void MainWindow::switchToDatabases()