From 9a393bbcea4edb78e4bb40b0644ef4032c959abf Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Mon, 8 Feb 2016 18:25:40 +0300 Subject: [PATCH] Fix crash caused by AdvancedSettings::addRow() --- src/gui/advancedsettings.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gui/advancedsettings.cpp b/src/gui/advancedsettings.cpp index dd32deaaf..6c5af720d 100644 --- a/src/gui/advancedsettings.cpp +++ b/src/gui/advancedsettings.cpp @@ -312,14 +312,12 @@ void AdvancedSettings::addRow(int row, const QString &rowText, T* widget) setItem(row, PROPERTY, new QTableWidgetItem(rowText)); setCellWidget(row, VALUE, widget); - bool ok; if (std::is_same::value) - ok = connect(widget, SIGNAL(stateChanged(int)), SIGNAL(settingsChanged())); + connect(widget, SIGNAL(stateChanged(int)), SIGNAL(settingsChanged())); else if (std::is_same::value) - ok = connect(widget, SIGNAL(valueChanged(int)), SIGNAL(settingsChanged())); + connect(widget, SIGNAL(valueChanged(int)), SIGNAL(settingsChanged())); else if (std::is_same::value) - ok = connect(widget, SIGNAL(currentIndexChanged(int)), SIGNAL(settingsChanged())); + connect(widget, SIGNAL(currentIndexChanged(int)), SIGNAL(settingsChanged())); else if (std::is_same::value) - ok = connect(widget, SIGNAL(textChanged(QString)), SIGNAL(settingsChanged())); - Q_ASSERT(ok); + connect(widget, SIGNAL(textChanged(QString)), SIGNAL(settingsChanged())); }