use new signals slots syntax

This commit is contained in:
2026-04-24 22:29:13 +02:00
parent 409ec93d7d
commit b21fc352b4
5 changed files with 35 additions and 34 deletions

View File

@@ -36,10 +36,10 @@ HeaderBar::HeaderBar(QWidget* parent)
layout->addWidget(btn);
m_speedButtons.push_back(btn);
mapper->setMapping(btn, i);
connect(btn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(btn, &QPushButton::clicked, mapper, qOverload<>(&QSignalMapper::map));
}
connect(mapper, SIGNAL(mapped(int)), this, SLOT(onSpeedButton(int)));
connect(mapper, qOverload<int>(&QSignalMapper::mapped), this, &HeaderBar::onSpeedButton);
setFixedHeight(sizeHint().height());
}
@@ -70,3 +70,4 @@ void HeaderBar::onSpeedButton(int index)
emit speedChanged(kSpeeds[index]);
}
}