mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-13 01:54:29 -04:00
[libcalamares] Code-format Retranslator, hide internal symbols
This commit is contained in:
parent
ad1a4b6479
commit
5f4e65bc77
1 changed files with 10 additions and 3 deletions
|
@ -19,6 +19,9 @@
|
|||
#include <QEvent>
|
||||
#include <QTranslator>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
static bool s_allowLocalTranslations = false;
|
||||
|
||||
/** @brief Helper class for loading translations
|
||||
|
@ -159,6 +162,8 @@ loadSingletonTranslator( TranslationLoader&& loader, QTranslator*& translator_p
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace CalamaresUtils
|
||||
{
|
||||
static QTranslator* s_brandingTranslator = nullptr;
|
||||
|
@ -211,13 +216,15 @@ Retranslator::eventFilter( QObject* obj, QEvent* e )
|
|||
return QObject::eventFilter( obj, e );
|
||||
}
|
||||
|
||||
Retranslator* Retranslator::instance()
|
||||
Retranslator*
|
||||
Retranslator::instance()
|
||||
{
|
||||
static Retranslator s_instance(nullptr);
|
||||
static Retranslator s_instance( nullptr );
|
||||
return &s_instance;
|
||||
}
|
||||
|
||||
void Retranslator::attach(QObject* o, std::function<void ()> f)
|
||||
void
|
||||
Retranslator::attach( QObject* o, std::function< void() > f )
|
||||
{
|
||||
connect( instance(), &Retranslator::languageChanged, o, f );
|
||||
f();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue