Apply clang-format

This commit is contained in:
Martchus 2023-07-03 00:26:25 +02:00
parent 710a092458
commit e448ff04fa
4 changed files with 8 additions and 13 deletions

View File

@ -109,12 +109,11 @@ void PaletteEditor::setPalette(const QPalette &palette, const QPalette &parentPa
bool PaletteEditor::event(QEvent *event)
{
switch(event->type()) {
switch (event->type()) {
case QEvent::LanguageChange:
m_ui->retranslateUi(this);
break;
default:
;
default:;
}
return QDialog::event(event);
}

View File

@ -149,9 +149,7 @@ template <class UiClass> QWidget *UiFileBasedOptionPage<UiClass>::setupWidget()
m_ui.reset(new UiClass);
}
m_ui->setupUi(widget);
QObject::connect(widget, &OptionPageWidget::retranslationRequired, [this, widget] {
m_ui->retranslateUi(widget);
});
QObject::connect(widget, &OptionPageWidget::retranslationRequired, [this, widget] { m_ui->retranslateUi(widget); });
return widget;
}

View File

@ -162,12 +162,11 @@ void SettingsDialog::showCategory(OptionCategory *category)
* locale. The \a translator is called immediately for the initial assignment and on language change events.
* - This function is experimental and might change or be removed completely in the next minor release.
*/
void SettingsDialog::translateCategory(OptionCategory *category, const std::function<QString ()> &translator)
void SettingsDialog::translateCategory(OptionCategory *category, const std::function<QString()> &translator)
{
category->setDisplayName(translator());
connect(this, &SettingsDialog::retranslationRequired, category, [category, translator = std::move(translator)] {
category->setDisplayName(translator());
});
connect(this, &SettingsDialog::retranslationRequired, category,
[category, translator = std::move(translator)] { category->setDisplayName(translator()); });
}
/*!

View File

@ -67,12 +67,11 @@ PathSelection::PathSelection(QWidget *parent)
bool PathSelection::event(QEvent *event)
{
switch(event->type()) {
switch (event->type()) {
case QEvent::LanguageChange:
setTexts();
break;
default:
;
default:;
}
return QWidget::event(event);
}