Skip to content

Commit

Permalink
now getting "pass" from settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Janosch Knack committed Nov 29, 2016
1 parent 1bd2ef4 commit 8b01b81
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ void MainWindow::setPassword(QString file, bool overwrite, bool isNew = false) {
// warn?
return;
}
PasswordDialog d(pwdConfig, *pass, this);
PasswordDialog d(pwdConfig, this);
d.setFile(file);
d.usePwgen(QtPassSettings::isUsePwgen());
d.setTemplate(QtPassSettings::getPassTemplate());
Expand Down
8 changes: 4 additions & 4 deletions passworddialog.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "passworddialog.h"
#include "ui_passworddialog.h"
#include "qtpasssettings.h"
#include <QDebug>
#include <QLabel>
#include <QLineEdit>
Expand All @@ -9,9 +10,8 @@
* @param parent
*/
PasswordDialog::PasswordDialog(const passwordConfiguration &passConfig,
Pass &pass, QWidget *parent)
: QDialog(parent), ui(new Ui::PasswordDialog), m_passConfig(passConfig),
m_pass(pass) {
QWidget *parent)
: QDialog(parent), ui(new Ui::PasswordDialog), m_passConfig(passConfig){
templating = false;
allFields = false;
ui->setupUi(this);
Expand Down Expand Up @@ -42,7 +42,7 @@ void PasswordDialog::on_checkBoxShow_stateChanged(int arg1) {
*/
void PasswordDialog::on_createPasswordButton_clicked() {
ui->widget->setEnabled(false);
QString newPass = m_pass.Generate(
QString newPass = QtPassSettings::getPass()->Generate(
ui->spinBox_pwdLength->value(),
m_passConfig.Characters[(passwordConfiguration::characterSet)
ui->passwordTemplateSwitch->currentIndex()]);
Expand Down
3 changes: 1 addition & 2 deletions passworddialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PasswordDialog : public QDialog {
Q_OBJECT

public:
explicit PasswordDialog(const passwordConfiguration &passConfig, Pass &pass,
explicit PasswordDialog(const passwordConfiguration &passConfig,
QWidget *parent = 0);
~PasswordDialog();

Expand Down Expand Up @@ -59,7 +59,6 @@ private slots:
private:
Ui::PasswordDialog *ui;
const passwordConfiguration &m_passConfig;
Pass &m_pass;
QString passTemplate;
QStringList fields;
bool templating;
Expand Down

0 comments on commit 8b01b81

Please sign in to comment.