From 875f79b49faa3a5887359a5ae6f902c6d465e3f9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 25 Mar 2020 12:08:27 +0100 Subject: [PATCH] [libcalamares] Drop unused parameter - the `parent` when installing a translator was not used, so drop it from the API. Chase some uses of the API, but leave welcome-modules broken: there's a merge of those coming. --- src/calamares/CalamaresApplication.cpp | 2 +- src/libcalamares/utils/Retranslator.cpp | 2 +- src/libcalamares/utils/Retranslator.h | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index 2d36f5a49..e9083c225 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -83,7 +83,7 @@ CalamaresApplication::init() initQmlPath(); initBranding(); - CalamaresUtils::installTranslator( QLocale::system(), QString(), this ); + CalamaresUtils::installTranslator( QLocale::system(), QString() ); setQuitOnLastWindowClosed( false ); setWindowIcon( QIcon( Calamares::Branding::instance()->imagePath( Calamares::Branding::ProductIcon ) ) ); diff --git a/src/libcalamares/utils/Retranslator.cpp b/src/libcalamares/utils/Retranslator.cpp index 767d0581e..4cd618d97 100644 --- a/src/libcalamares/utils/Retranslator.cpp +++ b/src/libcalamares/utils/Retranslator.cpp @@ -197,7 +197,7 @@ static QTranslator* s_tztranslator = nullptr; static QString s_translatorLocaleName; void -installTranslator( const QLocale& locale, const QString& brandingTranslationsPrefix, QObject* ) +installTranslator( const QLocale& locale, const QString& brandingTranslationsPrefix ) { loadSingletonTranslator( BrandingLoader( locale, brandingTranslationsPrefix ), s_brandingTranslator ); loadSingletonTranslator( TZLoader( locale ), s_tztranslator ); diff --git a/src/libcalamares/utils/Retranslator.h b/src/libcalamares/utils/Retranslator.h index af322e5b5..d62a3b751 100644 --- a/src/libcalamares/utils/Retranslator.h +++ b/src/libcalamares/utils/Retranslator.h @@ -36,9 +36,8 @@ namespace CalamaresUtils * @brief installTranslator changes the application language. * @param locale the new locale. * @param brandingTranslationsPrefix the branding path prefix, from Calamares::Branding. - * @param parent the parent QObject. */ -DLLEXPORT void installTranslator( const QLocale& locale, const QString& brandingTranslationsPrefix, QObject* parent ); +DLLEXPORT void installTranslator( const QLocale& locale, const QString& brandingTranslationsPrefix ); DLLEXPORT QString translatorLocaleName();