mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix #1792
This commit is contained in:
parent
9581be95dc
commit
ac0beffd0c
|
@ -74,7 +74,7 @@ AVForm::~AVForm()
|
|||
}
|
||||
}
|
||||
|
||||
void AVForm::present()
|
||||
void AVForm::showEvent(QShowEvent*)
|
||||
{
|
||||
getAudioOutDevices();
|
||||
getAudioInDevices();
|
||||
|
|
|
@ -33,7 +33,6 @@ class AVForm : public GenericForm
|
|||
public:
|
||||
AVForm();
|
||||
~AVForm();
|
||||
virtual void present();
|
||||
|
||||
private:
|
||||
void getAudioInDevices();
|
||||
|
@ -58,6 +57,7 @@ private slots:
|
|||
void onResProbingFinished(QList<QSize> res);
|
||||
|
||||
virtual void hideEvent(QHideEvent*);
|
||||
virtual void showEvent(QShowEvent*);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *o, QEvent *e);
|
||||
|
|
|
@ -24,7 +24,6 @@ public:
|
|||
GenericForm(const QString &name, const QPixmap &icon) : formName(name), formIcon(icon) {;}
|
||||
~GenericForm() {;}
|
||||
|
||||
virtual void present() {}
|
||||
QString getFormName() {return formName;}
|
||||
QPixmap getFormIcon() {return formIcon;}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ void PrivacyForm::setNospam()
|
|||
Core::getInstance()->setNospam(nospam);
|
||||
}
|
||||
|
||||
void PrivacyForm::present()
|
||||
void PrivacyForm::showEvent(QShowEvent*)
|
||||
{
|
||||
bodyUI->nospamLineEdit->setText(Core::getInstance()->getSelfId().noSpam);
|
||||
bodyUI->cbTypingNotification->setChecked(Settings::getInstance().isTypingNotificationEnabled());
|
||||
|
|
|
@ -28,14 +28,13 @@ public:
|
|||
PrivacyForm();
|
||||
~PrivacyForm();
|
||||
|
||||
virtual void present();
|
||||
|
||||
private slots:
|
||||
void onEnableLoggingUpdated();
|
||||
void onTypingNotificationEnabledUpdated();
|
||||
void setNospam();
|
||||
void generateRandomNospam();
|
||||
void onNospamEdit();
|
||||
virtual void showEvent(QShowEvent*);
|
||||
|
||||
private:
|
||||
Ui::PrivacySettings* bodyUI;
|
||||
|
|
|
@ -83,7 +83,6 @@ void SettingsWidget::onTabChanged(int index)
|
|||
{
|
||||
this->settingsWidgets->setCurrentIndex(index);
|
||||
GenericForm* currentWidget = static_cast<GenericForm*>(this->settingsWidgets->widget(index));
|
||||
currentWidget->present();
|
||||
nameLabel->setText(currentWidget->getFormName());
|
||||
imgLabel->setPixmap(currentWidget->getFormIcon().scaledToHeight(40, Qt::SmoothTransformation));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user