From 15a009a6546ecf1a6667ab2aaef80126dcabdb24 Mon Sep 17 00:00:00 2001 From: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com> Date: Mon, 10 Aug 2015 12:00:32 -0400 Subject: [PATCH] settings: fix account being modified at load time Issue: #78824 Change-Id: Ifef04d3114e349dffe8037c4c81275dcf5940b45 --- accountdetails.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/accountdetails.cpp b/accountdetails.cpp index 7932b26..78a2532 100644 --- a/accountdetails.cpp +++ b/accountdetails.cpp @@ -53,11 +53,6 @@ AccountDetails::AccountDetails(QWidget *parent) : ui->lrcfg_username->setAlignment(Qt::AlignCenter); - connect(ui->audioCodecView, SIGNAL(cellChanged(int,int)), - this, SLOT(audio_codec_checked(int, int))); - connect(ui->videoCodecView, SIGNAL(cellChanged(int,int)), - this, SLOT(video_codec_checked(int,int))); - connect(ui->lrcfg_tlsCaListCertificate, SIGNAL(clicked(bool)), this, SLOT(onCertButtonClicked())); connect(ui->lrcfg_tlsCertificate, SIGNAL(clicked(bool)), this, SLOT(onCertButtonClicked())); connect(ui->lrcfg_tlsPrivateKeyCertificate, SIGNAL(clicked(bool)), this, SLOT(onCertButtonClicked())); @@ -71,6 +66,9 @@ AccountDetails::~AccountDetails() void AccountDetails::reloadCodec(CodecType type) { + ui->audioCodecView->disconnect(); + ui->videoCodecView->disconnect(); + auto selectedIdx = codecModel_->selectionModel()->currentIndex(); if (type != CodecType::VIDEO) { @@ -138,6 +136,10 @@ AccountDetails::reloadCodec(CodecType type) } } } + connect(ui->audioCodecView, SIGNAL(cellChanged(int,int)), + this, SLOT(audio_codec_checked(int, int))); + connect(ui->videoCodecView, SIGNAL(cellChanged(int,int)), + this, SLOT(video_codec_checked(int,int))); } void -- GitLab