mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
Modernizes the signal/slot connect and solves the disambiguities of the remaining currentIndexChanged(int) connects via qOverload<int>, since
QComboBox::currentIndexChanged(QString) still exists pre-Qt6. TitleBlockTemplateLocationChooser: collections_ -> updateTemplates() (a virtual method; pointer-to-member dispatch still resolves to the TitleBlockTemplateLocationSaver override at runtime as expected) TitleBlockTemplateLocationSaver: templates_ -> updateNewName() TitleBlockPropertiesWidget: m_tbt_cb -> changeCurrentTitleBlockTemplate(int) XRefPropertiesWidget: m_type_cb -> typeChanged(), m_snap_to_cb ->enableOffsetSB(int), both connect (constructor) and disconnect(destructor)
This commit is contained in:
@@ -98,8 +98,7 @@ void TitleBlockTemplateLocationChooser::init()
|
||||
templates_ = new QComboBox();
|
||||
|
||||
updateCollections();
|
||||
connect(collections_, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(updateTemplates()));
|
||||
connect(collections_, qOverload<int>(&QComboBox::currentIndexChanged), this, &TitleBlockTemplateLocationChooser::updateTemplates);
|
||||
|
||||
form_layout_ = new QFormLayout();
|
||||
form_layout_ -> addRow(
|
||||
|
||||
@@ -80,7 +80,7 @@ void TitleBlockTemplateLocationSaver::setLocation(const TitleBlockTemplateLocati
|
||||
void TitleBlockTemplateLocationSaver::init()
|
||||
{
|
||||
new_name_ = new QLineEdit();
|
||||
connect(templates_, SIGNAL(currentIndexChanged(int)), this, SLOT(updateNewName()));
|
||||
connect(templates_, qOverload<int>(&QComboBox::currentIndexChanged), this, &TitleBlockTemplateLocationSaver::updateNewName);
|
||||
form_layout_ -> addRow(tr("ou nouveau nom", "used in save as form"), new_name_);
|
||||
updateTemplates();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user