summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Klimt <jounathaen@mail.de>2016-10-11 21:47:08 +0200
committerJonathan Klimt <jounathaen@mail.de>2016-10-11 21:47:08 +0200
commitaa8b15d70e3a08a82f06ecbe9d1db80150fe7e00 (patch)
tree2354fabe045734a88c1e9358e7ef0fe48b8a61f8
parentdc5bf4876306b19785dbbb984ee9c4a36b571133 (diff)
smaller Bugfixes for previous commit and comments added
-rw-r--r--configdialog.cpp16
-rw-r--r--configdialog.h1
-rw-r--r--mainwindow.cpp2
3 files changed, 17 insertions, 2 deletions
diff --git a/configdialog.cpp b/configdialog.cpp
index 90aff198..015a7df0 100644
--- a/configdialog.cpp
+++ b/configdialog.cpp
@@ -862,19 +862,31 @@ int ConfigDialog::getPwdTemplateSelector(){
return ui->passwordCharTemplateSelector->currentIndex();
}
+/**
+ * @brief ConfigDialog::on_passwordCharTemplateSelector_activated sets the passwordChar Template
+ * combo box to the desired entry
+ * @param entry of
+ */
void ConfigDialog::on_passwordCharTemplateSelector_activated(int index){
ui->lineEditPasswordChars->setText(mainWindow->pwdConfig.Characters[index]);
if (index != 3){
ui->lineEditPasswordChars->setEnabled(false);
- ui->labelPasswordChars->setEnabled(false);
}
else {
ui->lineEditPasswordChars->setEnabled(true);
- ui->labelPasswordChars->setEnabled(true);
}
}
/**
+ * @brief ConfigDialog::setLineEditEnabled enabling/disabling the textbox with the
+ * password characters
+ * @param b enable/disable
+ */
+void ConfigDialog::setLineEditEnabled(bool b){
+ ui->lineEditPasswordChars->setEnabled(b);
+}
+
+/**
* @brief ConfigDialog::startMinimized return preference for starting
* application minimized (tray icon).
* @return
diff --git a/configdialog.h b/configdialog.h
index 070d44f8..43f4136c 100644
--- a/configdialog.h
+++ b/configdialog.h
@@ -73,6 +73,7 @@ public:
void setPasswordLength(int pwLen);
void setPasswordChars(QString);
void setPwdTemplateSelector(int selection);
+ void setLineEditEnabled(bool b);
int getPwdTemplateSelector();
bool usePwgen();
bool avoidCapitals();
diff --git a/mainwindow.cpp b/mainwindow.cpp
index b0345a6c..9e2a28ba 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -456,6 +456,8 @@ void MainWindow::config() {
d->useSymbols(useSymbols);
d->setPasswordLength(pwdConfig.length);
d->setPwdTemplateSelector(pwdConfig.selected);
+ if (pwdConfig.selected!=3)
+ d->setLineEditEnabled(false);
d->setPasswordChars(pwdConfig.Characters[pwdConfig.selected]);
d->useTemplate(useTemplate);
d->setTemplate(passTemplate);