[libcalamaresui] Run clang-format on TranslationFix.cpp
This commit is contained in:
parent
d9f7726f7d
commit
aa332477fd
@ -10,10 +10,10 @@
|
||||
#include "TranslationFix.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QPushButton>
|
||||
#include <QCoreApplication>
|
||||
#include <QMessageBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
|
||||
namespace Calamares
|
||||
{
|
||||
@ -25,10 +25,11 @@ static std::pair< decltype( QMessageBox::Ok ), const char* > maps[] = {
|
||||
{ QMessageBox::No, QT_TRANSLATE_NOOP( "StandardButtons", "&No" ) },
|
||||
{ QMessageBox::Cancel, QT_TRANSLATE_NOOP( "StandardButtons", "&Cancel" ) },
|
||||
{ QMessageBox::Close, QT_TRANSLATE_NOOP( "StandardButtons", "&Close" ) },
|
||||
};
|
||||
};
|
||||
|
||||
template<typename TButtonBox>
|
||||
void fixButtonLabels ( TButtonBox* box )
|
||||
template < typename TButtonBox >
|
||||
void
|
||||
fixButtonLabels( TButtonBox* box )
|
||||
{
|
||||
if ( !box )
|
||||
{
|
||||
@ -37,7 +38,7 @@ void fixButtonLabels ( TButtonBox* box )
|
||||
|
||||
for ( auto [ sb, label ] : maps )
|
||||
{
|
||||
auto* button = box->button( static_cast<typename TButtonBox::StandardButton>(int(sb)) );
|
||||
auto* button = box->button( static_cast< typename TButtonBox::StandardButton >( int( sb ) ) );
|
||||
if ( button )
|
||||
{
|
||||
button->setText( QCoreApplication::translate( "StandardButtons", label ) );
|
||||
@ -48,13 +49,13 @@ void fixButtonLabels ( TButtonBox* box )
|
||||
void
|
||||
fixButtonLabels( QMessageBox* box )
|
||||
{
|
||||
fixButtonLabels<QMessageBox>(box);
|
||||
fixButtonLabels< QMessageBox >( box );
|
||||
}
|
||||
|
||||
void
|
||||
fixButtonLabels(QDialogButtonBox *box)
|
||||
fixButtonLabels( QDialogButtonBox* box )
|
||||
{
|
||||
fixButtonLabels<QDialogButtonBox>(box);
|
||||
fixButtonLabels< QDialogButtonBox >( box );
|
||||
}
|
||||
|
||||
} // namespace Calamares
|
||||
|
Loading…
Reference in New Issue
Block a user