Browse Source

Move signal connections to appropriate place

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
79eb9a4990
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 9
      src/gui/advancedsettings.cpp

9
src/gui/advancedsettings.cpp

@ -151,11 +151,6 @@ AdvancedSettings::AdvancedSettings(QWidget *parent)
setAlternatingRowColors(true); setAlternatingRowColors(true);
setSelectionMode(QAbstractItemView::NoSelection); setSelectionMode(QAbstractItemView::NoSelection);
setEditTriggers(QAbstractItemView::NoEditTriggers); setEditTriggers(QAbstractItemView::NoEditTriggers);
// Signals
connect(&m_comboBoxInterface, qOverload<int>(&QComboBox::currentIndexChanged)
, this, &AdvancedSettings::updateInterfaceAddressCombo);
connect(&m_spinBoxSaveResumeDataInterval, qOverload<int>(&QSpinBox::valueChanged)
, this, &AdvancedSettings::updateSaveResumeDataIntervalSuffix);
// Load settings // Load settings
loadAdvancedSettings(); loadAdvancedSettings();
resizeColumnToContents(0); resizeColumnToContents(0);
@ -503,6 +498,8 @@ void AdvancedSettings::loadAdvancedSettings()
m_spinBoxSaveResumeDataInterval.setMinimum(0); m_spinBoxSaveResumeDataInterval.setMinimum(0);
m_spinBoxSaveResumeDataInterval.setMaximum(std::numeric_limits<int>::max()); m_spinBoxSaveResumeDataInterval.setMaximum(std::numeric_limits<int>::max());
m_spinBoxSaveResumeDataInterval.setValue(session->saveResumeDataInterval()); m_spinBoxSaveResumeDataInterval.setValue(session->saveResumeDataInterval());
connect(&m_spinBoxSaveResumeDataInterval, qOverload<int>(&QSpinBox::valueChanged)
, this, &AdvancedSettings::updateSaveResumeDataIntervalSuffix);
updateSaveResumeDataIntervalSuffix(m_spinBoxSaveResumeDataInterval.value()); updateSaveResumeDataIntervalSuffix(m_spinBoxSaveResumeDataInterval.value());
addRow(SAVE_RESUME_DATA_INTERVAL, tr("Save resume data interval", "How often the fastresume file is saved."), &m_spinBoxSaveResumeDataInterval); addRow(SAVE_RESUME_DATA_INTERVAL, tr("Save resume data interval", "How often the fastresume file is saved."), &m_spinBoxSaveResumeDataInterval);
// Outgoing port Min // Outgoing port Min
@ -573,6 +570,8 @@ void AdvancedSettings::loadAdvancedSettings()
m_comboBoxInterface.addItem(session->networkInterfaceName(), currentInterface); m_comboBoxInterface.addItem(session->networkInterfaceName(), currentInterface);
m_comboBoxInterface.setCurrentIndex(i); m_comboBoxInterface.setCurrentIndex(i);
} }
connect(&m_comboBoxInterface, qOverload<int>(&QComboBox::currentIndexChanged)
, this, &AdvancedSettings::updateInterfaceAddressCombo);
addRow(NETWORK_IFACE, tr("Network Interface"), &m_comboBoxInterface); addRow(NETWORK_IFACE, tr("Network Interface"), &m_comboBoxInterface);
// Network interface address // Network interface address
updateInterfaceAddressCombo(); updateInterfaceAddressCombo();

Loading…
Cancel
Save