-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix password generator close button for good
* Avoids using QDialog which breaks the standalone password generator Revert "Fix password dialog close button" This reverts commit 5b47190.
- Loading branch information
1 parent
6e8fa34
commit 013db19
Showing
5 changed files
with
15 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2023 KeePassXC Team <[email protected]> | ||
* Copyright (C) 2013 Felix Geyer <[email protected]> | ||
* Copyright (C) 2022 KeePassXC Team <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -34,13 +34,12 @@ | |
#include "gui/styles/StateColorPalette.h" | ||
|
||
PasswordGeneratorWidget::PasswordGeneratorWidget(QWidget* parent) | ||
: QDialog(parent) | ||
: QWidget(parent) | ||
, m_passwordGenerator(new PasswordGenerator()) | ||
, m_dicewareGenerator(new PassphraseGenerator()) | ||
, m_ui(new Ui::PasswordGeneratorWidget()) | ||
{ | ||
m_ui->setupUi(this); | ||
setWindowFlags(Qt::Widget); | ||
|
||
m_ui->buttonGenerate->setIcon(icons()->icon("refresh")); | ||
m_ui->buttonGenerate->setToolTip( | ||
|
@@ -122,7 +121,7 @@ void PasswordGeneratorWidget::closeEvent(QCloseEvent* event) | |
{ | ||
// Emits closed signal when clicking X from title bar | ||
emit closed(); | ||
event->accept(); | ||
QWidget::closeEvent(event); | ||
} | ||
|
||
PasswordGeneratorWidget* PasswordGeneratorWidget::popupGenerator(QWidget* parent) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2023 KeePassXC Team <[email protected]> | ||
* Copyright (C) 2013 Felix Geyer <[email protected]> | ||
* Copyright (C) 2022 KeePassXC Team <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -20,7 +20,6 @@ | |
#define KEEPASSX_PASSWORDGENERATORWIDGET_H | ||
|
||
#include <QComboBox> | ||
#include <QDialog> | ||
#include <QTimer> | ||
|
||
#include "core/PassphraseGenerator.h" | ||
|
@@ -35,7 +34,7 @@ class PasswordGenerator; | |
class PasswordHealth; | ||
class PassphraseGenerator; | ||
|
||
class PasswordGeneratorWidget : public QDialog | ||
class PasswordGeneratorWidget : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
|
@@ -71,6 +70,9 @@ public slots: | |
void deleteWordList(); | ||
void addWordList(); | ||
|
||
protected: | ||
void closeEvent(QCloseEvent* event) override; | ||
|
||
private slots: | ||
void updateButtonsEnabled(const QString& password); | ||
void updatePasswordStrength(); | ||
|
@@ -87,7 +89,6 @@ private slots: | |
bool m_passwordGenerated = false; | ||
int m_firstCustomWordlistIndex; | ||
|
||
void closeEvent(QCloseEvent* event) override; | ||
PasswordGenerator::CharClasses charClasses(); | ||
PasswordGenerator::GeneratorFlags generatorFlags(); | ||
|
||
|