diff options
author | varjolintu <sami.vanttinen@protonmail.com> | 2021-10-17 09:53:25 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2021-10-24 17:24:17 +0300 |
commit | dd41f093e65ab54befff63008c26ba78be409f7e (patch) | |
tree | abef7b162b3cf648ee784bd5140980b0fd98c367 /src/gui | |
parent | 2a9d92faeb48ec284700fd0ee5307cd0e36160f7 (diff) |
Launch KeePassXC password generator popup from the extension
* Closes #6473
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/PasswordGeneratorWidget.cpp | 10 | ||||
-rw-r--r-- | src/gui/PasswordGeneratorWidget.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/PasswordGeneratorWidget.cpp b/src/gui/PasswordGeneratorWidget.cpp index acb93b630..78b240de9 100644 --- a/src/gui/PasswordGeneratorWidget.cpp +++ b/src/gui/PasswordGeneratorWidget.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2013 Felix Geyer <debfx@fobos.de> - * Copyright (C) 2020 KeePassXC Team <team@keepassxc.org> + * Copyright (C) 2021 KeePassXC Team <team@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 @@ -19,6 +19,7 @@ #include "PasswordGeneratorWidget.h" #include "ui_PasswordGeneratorWidget.h" +#include <QCloseEvent> #include <QDir> #include <QShortcut> #include <QTimer> @@ -109,6 +110,13 @@ PasswordGeneratorWidget::~PasswordGeneratorWidget() { } +void PasswordGeneratorWidget::closeEvent(QCloseEvent* event) +{ + // Emits closed signal when clicking X from title bar + emit closed(); + event->accept(); +} + PasswordGeneratorWidget* PasswordGeneratorWidget::popupGenerator(QWidget* parent) { auto pwGenerator = new PasswordGeneratorWidget(parent); diff --git a/src/gui/PasswordGeneratorWidget.h b/src/gui/PasswordGeneratorWidget.h index 832025d46..50de172ac 100644 --- a/src/gui/PasswordGeneratorWidget.h +++ b/src/gui/PasswordGeneratorWidget.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2013 Felix Geyer <debfx@fobos.de> - * Copyright (C) 2017 KeePassXC Team <team@keepassxc.org> + * Copyright (C) 2021 KeePassXC Team <team@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 @@ -81,6 +81,7 @@ private slots: private: bool m_standalone = false; + void closeEvent(QCloseEvent* event); PasswordGenerator::CharClasses charClasses(); PasswordGenerator::GeneratorFlags generatorFlags(); |