@@ -91,43 +91,14 @@ SettingsDialog::SettingsDialog(int page, QWidget *parent)
9191 ui->chkRoleAddressInfo ->setChecked (Settings::SHOW_ROLE_ADDRESS_INFO);
9292 connect (ui->chkRoleAddressInfo , &QCheckBox::toggled, this , Settings::SHOW_ROLE_ADDRESS_INFO);
9393
94- #ifdef Q_OS_MACOS
95- ui->lblDefaultDirectory ->hide ();
96- ui->rdGeneralSameDirectory ->hide ();
97- ui->txtGeneralDirectory ->hide ();
98- ui->btGeneralChooseDirectory ->hide ();
99- ui->rdGeneralSpecifyDirectory ->hide ();
100- #else
101- connect (ui->btGeneralChooseDirectory , &QPushButton::clicked, this , [this ]{
102- QString dir = FileDialog::getExistingDirectory (this , tr (" Select folder" ), Settings::DEFAULT_DIR);
103- if (!dir.isEmpty ())
104- {
105- ui->rdGeneralSpecifyDirectory ->setChecked (true );
106- Settings::DEFAULT_DIR = dir;
107- ui->txtGeneralDirectory ->setText (dir);
108- }
109- });
110- connect (ui->rdGeneralSpecifyDirectory , &QRadioButton::toggled, this , [this ](bool enable) {
111- ui->btGeneralChooseDirectory ->setVisible (enable);
112- ui->txtGeneralDirectory ->setVisible (enable);
113- if (!enable)
114- ui->txtGeneralDirectory ->clear ();
115- });
116- ui->txtGeneralDirectory ->setText (Settings::DEFAULT_DIR);
117- if (ui->txtGeneralDirectory ->text ().isEmpty ())
118- ui->rdGeneralSameDirectory ->setChecked (true );
119- connect (ui->txtGeneralDirectory , &QLineEdit::textChanged, this , Settings::DEFAULT_DIR);
120- #endif
121-
12294 // pageServices - TimeStamp
12395 ui->rdTimeStampDefault ->setDisabled (Settings::TSA_URL_CUSTOM.isLocked ());
12496 ui->rdTimeStampCustom ->setEnabled (ui->rdTimeStampDefault ->isEnabled ());
12597 ui->rdTimeStampCustom ->setChecked (Settings::TSA_URL_CUSTOM);
12698 ui->txtTimeStamp ->setReadOnly (Settings::TSA_URL.isLocked ());
12799 ui->txtTimeStamp ->setVisible (ui->rdTimeStampCustom ->isChecked ());
128100 ui->txtTimeStamp ->setPlaceholderText (Application::confValue (Settings::TSA_URL.KEY ).toString ());
129- QString TSA_URL = Settings::TSA_URL.value (Application::confValue (Application::TSAUrl));
130- ui->txtTimeStamp ->setText (ui->txtTimeStamp ->placeholderText () == TSA_URL ? QString () : std::move (TSA_URL));
101+ ui->txtTimeStamp ->setText (Settings::TSA_URL);
131102 ui->wgtTSACert ->setDisabled (Settings::TSA_CERT.isLocked ());
132103 ui->wgtTSACert ->setVisible (ui->rdTimeStampCustom ->isChecked ());
133104 connect (ui->rdTimeStampCustom , &QRadioButton::toggled, ui->txtTimeStamp , [this ](bool checked) {
@@ -183,8 +154,7 @@ SettingsDialog::SettingsDialog(int page, QWidget *parent)
183154 ui->txtSiVa ->setReadOnly (Settings::SIVA_URL.isLocked ());
184155 ui->txtSiVa ->setVisible (ui->rdSiVaCustom ->isChecked ());
185156 ui->txtSiVa ->setPlaceholderText (Application::confValue (Settings::SIVA_URL.KEY ).toString ());
186- QString SIVA_URL = Settings::SIVA_URL.value (Application::confValue (Application::SiVaUrl));
187- ui->txtSiVa ->setText (ui->txtSiVa ->placeholderText () == SIVA_URL ? QString () : std::move (SIVA_URL));
157+ ui->txtSiVa ->setText (Settings::SIVA_URL);
188158 ui->wgtSiVaCert ->setDisabled (Settings::SIVA_CERT.isLocked ());
189159 ui->wgtSiVaCert ->setVisible (ui->rdSiVaCustom ->isChecked ());
190160 connect (ui->rdSiVaCustom , &QRadioButton::toggled, ui->txtSiVa , [this ](bool checked) {
0 commit comments