Merge branch 'feature/cmake-fix-#50-#123' into develop

* Fixes #50 and #123
This commit is contained in:
Jonathan White 2017-01-02 22:27:20 -05:00
commit 534364454d
No known key found for this signature in database
GPG key ID: 440FC65F2E0C6E01
14 changed files with 138 additions and 54 deletions

View file

@ -56,6 +56,22 @@ AboutDialog::AboutDialog(QWidget* parent)
.arg(Crypto::backendVersion());
m_ui->label_libs->setText(libs);
QString extensions;
#ifdef WITH_XC_HTTP
extensions += "- KeePassHTTP\n";
#endif
#ifdef WITH_XC_AUTOTYPE
extensions += "- Autotype\n";
#endif
#ifdef WITH_XC_YUBIKEY
extensions += "- Yubikey\n";
#endif
if (extensions.isEmpty())
extensions = "None";
m_ui->label_features->setText(m_ui->label_features->text() + extensions);
setAttribute(Qt::WA_DeleteOnClose);
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(close()));
}

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>375</width>
<height>210</height>
<width>455</width>
<height>238</height>
</rect>
</property>
<property name="windowTitle">
@ -93,6 +93,14 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_features">
<property name="text">
<string>Extensions:
</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">

View file

@ -22,6 +22,8 @@
#include <QShortcut>
#include <QTimer>
#include "config-keepassx.h"
#include "autotype/AutoType.h"
#include "core/Config.h"
#include "core/FilePath.h"
@ -35,12 +37,16 @@
#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
#include "gui/SettingsWidget.h"
#include "gui/PasswordGeneratorWidget.h"
#ifdef WITH_XC_HTTP
class HttpPlugin: public ISettingsPage
{
public:
@ -72,6 +78,7 @@ class HttpPlugin: public ISettingsPage
private:
Service *m_service;
};
#endif
const QString MainWindow::BaseWindowTitle = "KeePassXC";
@ -92,7 +99,9 @@ MainWindow::MainWindow()
m_countDefaultAttributes = m_ui->menuEntryCopyAttribute->actions().size();
restoreGeometry(config()->get("GUI/MainWindowGeometry").toByteArray());
#ifdef WITH_XC_HTTP
m_ui->settingsWidget->addSettingsPage(new HttpPlugin(m_ui->tabWidget));
#endif
setWindowIcon(filePath()->applicationIcon());
QAction* toggleViewAction = m_ui->toolBar->toggleViewAction();
@ -449,7 +458,7 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
m_ui->actionRepairDatabase->setEnabled(inDatabaseTabWidgetOrWelcomeWidget);
m_ui->actionLockDatabases->setEnabled(m_ui->tabWidget->hasLockableDatabases());
if ((3 == currentIndex) != m_ui->actionPasswordGenerator->isChecked()) {
bool blocked = m_ui->actionPasswordGenerator->blockSignals(true);
m_ui->actionPasswordGenerator->toggle();