mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(widget): make PrivacyForm use signals for clearAllReceipts()
This commit is contained in:
parent
20979744c9
commit
adab063a49
|
@ -59,7 +59,7 @@ void PrivacyForm::on_cbKeepHistory_stateChanged()
|
||||||
{
|
{
|
||||||
Settings::getInstance().setEnableLogging(bodyUI->cbKeepHistory->isChecked());
|
Settings::getInstance().setEnableLogging(bodyUI->cbKeepHistory->isChecked());
|
||||||
if (!bodyUI->cbKeepHistory->isChecked()) {
|
if (!bodyUI->cbKeepHistory->isChecked()) {
|
||||||
Widget::getInstance()->clearAllReceipts();
|
emit clearAllReceipts();
|
||||||
QMessageBox::StandardButton dialogDelHistory;
|
QMessageBox::StandardButton dialogDelHistory;
|
||||||
dialogDelHistory =
|
dialogDelHistory =
|
||||||
QMessageBox::question(nullptr, tr("Confirmation"),
|
QMessageBox::question(nullptr, tr("Confirmation"),
|
||||||
|
|
|
@ -37,6 +37,9 @@ public:
|
||||||
return tr("Privacy");
|
return tr("Privacy");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void clearAllReceipts();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_cbKeepHistory_stateChanged();
|
void on_cbKeepHistory_stateChanged();
|
||||||
void on_cbTypingNotification_stateChanged();
|
void on_cbTypingNotification_stateChanged();
|
||||||
|
|
|
@ -62,6 +62,8 @@ SettingsWidget::SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio, W
|
||||||
|
|
||||||
std::unique_ptr<UserInterfaceForm> uifrm(new UserInterfaceForm(this));
|
std::unique_ptr<UserInterfaceForm> uifrm(new UserInterfaceForm(this));
|
||||||
std::unique_ptr<PrivacyForm> pfrm(new PrivacyForm());
|
std::unique_ptr<PrivacyForm> pfrm(new PrivacyForm());
|
||||||
|
connect(pfrm.get(), &PrivacyForm::clearAllReceipts, parent, &Widget::clearAllReceipts);
|
||||||
|
|
||||||
AVForm* rawAvfrm = new AVForm(audio, coreAV, camera, audioSettings, videoSettings);
|
AVForm* rawAvfrm = new AVForm(audio, coreAV, camera, audioSettings, videoSettings);
|
||||||
std::unique_ptr<AVForm> avfrm(rawAvfrm);
|
std::unique_ptr<AVForm> avfrm(rawAvfrm);
|
||||||
std::unique_ptr<AdvancedForm> expfrm(new AdvancedForm());
|
std::unique_ptr<AdvancedForm> expfrm(new AdvancedForm());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user