From 3dda9ab860f1d2aec92e505465f4bc1c97d6d664 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 14 Dec 2018 11:30:05 +0100 Subject: [PATCH] [libcalamaresui] LocaleLabel doesn't need to inherit QObject - Use static QObject::tr instead. --- src/libcalamaresui/utils/CalamaresUtilsGui.cpp | 2 +- src/libcalamaresui/utils/CalamaresUtilsGui.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp index 5e4b8e069..803e1b050 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp @@ -270,7 +270,7 @@ LocaleLabel::LocaleLabel( const QString& locale ) : m_locale( LocaleLabel::getLocale( locale ) ) , m_localeId( locale ) { - QString longFormat = tr( "%1 (%2)", "Language (Country)" ); + QString longFormat = QObject::tr( "%1 (%2)", "Language (Country)" ); QString sortKey = QLocale::languageToString( m_locale.language() ); QString languageName = m_locale.nativeLanguageName(); diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index 1e5f283b1..9cbc7a4a3 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -134,10 +134,8 @@ constexpr int windowPreferredHeight = 520; * translation system) into QLocales, and also into consistent * human-readable text labels. */ -class LocaleLabel : public QObject +class LocaleLabel { - Q_OBJECT - public: /** @brief Construct from a locale name. *