preferences: replace SIGNAL/SLOT by function pointers

This give compile time checking. In fact, one of the connections was
not working (currentIndexChanged(QString) doesn't exist in newer(?)
Qt versions).

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-09 09:22:34 +01:00 committed by Michael Keller
parent 8980d61786
commit 857148efd6
5 changed files with 4 additions and 8 deletions

View file

@ -30,8 +30,8 @@ PreferencesLanguage::PreferencesLanguage() : AbstractPreferencesWidget(tr("Langu
foreach (QString format, dateFormatShortMap.keys())
ui->dateFormatEntry->addItem(format);
ui->dateFormatEntry->completer()->setCaseSensitivity(Qt::CaseSensitive);
connect(ui->dateFormatEntry, SIGNAL(currentIndexChanged(const QString&)),
this, SLOT(dateFormatChanged(const QString&)));
connect(ui->dateFormatEntry, &QComboBox::currentTextChanged,
this, &PreferencesLanguage::dateFormatChanged);
ui->timeFormatEntry->addItem("hh:mm");
ui->timeFormatEntry->addItem("h:mm AP");