Browse Source

Fix #1792

pull/1816/head
tux3 10 years ago
parent
commit
ac0beffd0c
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 2
      src/widget/form/settings/avform.cpp
  2. 2
      src/widget/form/settings/avform.h
  3. 1
      src/widget/form/settings/genericsettings.h
  4. 2
      src/widget/form/settings/privacyform.cpp
  5. 3
      src/widget/form/settings/privacyform.h
  6. 1
      src/widget/form/settingswidget.cpp

2
src/widget/form/settings/avform.cpp

@ -74,7 +74,7 @@ AVForm::~AVForm()
} }
} }
void AVForm::present() void AVForm::showEvent(QShowEvent*)
{ {
getAudioOutDevices(); getAudioOutDevices();
getAudioInDevices(); getAudioInDevices();

2
src/widget/form/settings/avform.h

@ -33,7 +33,6 @@ class AVForm : public GenericForm
public: public:
AVForm(); AVForm();
~AVForm(); ~AVForm();
virtual void present();
private: private:
void getAudioInDevices(); void getAudioInDevices();
@ -58,6 +57,7 @@ private slots:
void onResProbingFinished(QList<QSize> res); void onResProbingFinished(QList<QSize> res);
virtual void hideEvent(QHideEvent*); virtual void hideEvent(QHideEvent*);
virtual void showEvent(QShowEvent*);
protected: protected:
bool eventFilter(QObject *o, QEvent *e); bool eventFilter(QObject *o, QEvent *e);

1
src/widget/form/settings/genericsettings.h

@ -24,7 +24,6 @@ public:
GenericForm(const QString &name, const QPixmap &icon) : formName(name), formIcon(icon) {;} GenericForm(const QString &name, const QPixmap &icon) : formName(name), formIcon(icon) {;}
~GenericForm() {;} ~GenericForm() {;}
virtual void present() {}
QString getFormName() {return formName;} QString getFormName() {return formName;}
QPixmap getFormIcon() {return formIcon;} QPixmap getFormIcon() {return formIcon;}

2
src/widget/form/settings/privacyform.cpp

@ -65,7 +65,7 @@ void PrivacyForm::setNospam()
Core::getInstance()->setNospam(nospam); Core::getInstance()->setNospam(nospam);
} }
void PrivacyForm::present() void PrivacyForm::showEvent(QShowEvent*)
{ {
bodyUI->nospamLineEdit->setText(Core::getInstance()->getSelfId().noSpam); bodyUI->nospamLineEdit->setText(Core::getInstance()->getSelfId().noSpam);
bodyUI->cbTypingNotification->setChecked(Settings::getInstance().isTypingNotificationEnabled()); bodyUI->cbTypingNotification->setChecked(Settings::getInstance().isTypingNotificationEnabled());

3
src/widget/form/settings/privacyform.h

@ -28,14 +28,13 @@ public:
PrivacyForm(); PrivacyForm();
~PrivacyForm(); ~PrivacyForm();
virtual void present();
private slots: private slots:
void onEnableLoggingUpdated(); void onEnableLoggingUpdated();
void onTypingNotificationEnabledUpdated(); void onTypingNotificationEnabledUpdated();
void setNospam(); void setNospam();
void generateRandomNospam(); void generateRandomNospam();
void onNospamEdit(); void onNospamEdit();
virtual void showEvent(QShowEvent*);
private: private:
Ui::PrivacySettings* bodyUI; Ui::PrivacySettings* bodyUI;

1
src/widget/form/settingswidget.cpp

@ -83,7 +83,6 @@ void SettingsWidget::onTabChanged(int index)
{ {
this->settingsWidgets->setCurrentIndex(index); this->settingsWidgets->setCurrentIndex(index);
GenericForm* currentWidget = static_cast<GenericForm*>(this->settingsWidgets->widget(index)); GenericForm* currentWidget = static_cast<GenericForm*>(this->settingsWidgets->widget(index));
currentWidget->present();
nameLabel->setText(currentWidget->getFormName()); nameLabel->setText(currentWidget->getFormName());
imgLabel->setPixmap(currentWidget->getFormIcon().scaledToHeight(40, Qt::SmoothTransformation)); imgLabel->setPixmap(currentWidget->getFormIcon().scaledToHeight(40, Qt::SmoothTransformation));
} }

Loading…
Cancel
Save