Apply clang-format
This commit is contained in:
parent
710a092458
commit
e448ff04fa
|
@ -109,12 +109,11 @@ void PaletteEditor::setPalette(const QPalette &palette, const QPalette &parentPa
|
||||||
|
|
||||||
bool PaletteEditor::event(QEvent *event)
|
bool PaletteEditor::event(QEvent *event)
|
||||||
{
|
{
|
||||||
switch(event->type()) {
|
switch (event->type()) {
|
||||||
case QEvent::LanguageChange:
|
case QEvent::LanguageChange:
|
||||||
m_ui->retranslateUi(this);
|
m_ui->retranslateUi(this);
|
||||||
break;
|
break;
|
||||||
default:
|
default:;
|
||||||
;
|
|
||||||
}
|
}
|
||||||
return QDialog::event(event);
|
return QDialog::event(event);
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,9 +149,7 @@ template <class UiClass> QWidget *UiFileBasedOptionPage<UiClass>::setupWidget()
|
||||||
m_ui.reset(new UiClass);
|
m_ui.reset(new UiClass);
|
||||||
}
|
}
|
||||||
m_ui->setupUi(widget);
|
m_ui->setupUi(widget);
|
||||||
QObject::connect(widget, &OptionPageWidget::retranslationRequired, [this, widget] {
|
QObject::connect(widget, &OptionPageWidget::retranslationRequired, [this, widget] { m_ui->retranslateUi(widget); });
|
||||||
m_ui->retranslateUi(widget);
|
|
||||||
});
|
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.
|
* 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.
|
* - 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());
|
category->setDisplayName(translator());
|
||||||
connect(this, &SettingsDialog::retranslationRequired, category, [category, translator = std::move(translator)] {
|
connect(this, &SettingsDialog::retranslationRequired, category,
|
||||||
category->setDisplayName(translator());
|
[category, translator = std::move(translator)] { category->setDisplayName(translator()); });
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -67,12 +67,11 @@ PathSelection::PathSelection(QWidget *parent)
|
||||||
|
|
||||||
bool PathSelection::event(QEvent *event)
|
bool PathSelection::event(QEvent *event)
|
||||||
{
|
{
|
||||||
switch(event->type()) {
|
switch (event->type()) {
|
||||||
case QEvent::LanguageChange:
|
case QEvent::LanguageChange:
|
||||||
setTexts();
|
setTexts();
|
||||||
break;
|
break;
|
||||||
default:
|
default:;
|
||||||
;
|
|
||||||
}
|
}
|
||||||
return QWidget::event(event);
|
return QWidget::event(event);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue