@@ -240,21 +240,20 @@ void DesktopFileAMParser::updateActions()
240240 auto actionNames = m_applicationInterface->actionName ();
241241
242242 for (auto action : actions) {
243- auto localeName = getLocaleName (currentLanguageCode,actionNames.value (action));
243+ auto localeName = getLocaleName (currentLanguageCode, actionNames.value (action));
244244 auto fallbackDefaultName = actionNames.value (action).value (DEFAULT_KEY);
245245 m_actions.append ({action, localeName.isEmpty () ? fallbackDefaultName : localeName});
246246 }
247247}
248248
249- QString DesktopFileAMParser::getLocaleName (const QString& currentLanguageCode,const QStringMap& names)
249+ QString DesktopFileAMParser::getLocaleName (const QString& currentLanguageCode, const QStringMap& names)
250250{
251251 auto localeName = names.value (currentLanguageCode);
252- if (currentLanguageCode.contains (' _' ) &&
253- !(names.contains (currentLanguageCode)))
252+ if ( currentLanguageCode.contains (' _' ) && !(names.contains (currentLanguageCode))) {
254253 {
255254 auto prefix = currentLanguageCode.split (' _' )[0 ];
256- if (names.contains (prefix)){
257- localeName =names.value (prefix);
255+ if (names.contains (prefix)) {
256+ localeName = names.value (prefix);
258257 }
259258 }
260259 return localeName;
@@ -264,7 +263,7 @@ void DesktopFileAMParser::updateLocalName()
264263{
265264 QString currentLanguageCode = QLocale::system ().name ();
266265 auto names = m_applicationInterface->name ();
267- auto localeName = getLocaleName (currentLanguageCode,names);
266+ auto localeName = getLocaleName (currentLanguageCode, names);
268267 auto fallbackName = names.value (DEFAULT_KEY);
269268
270269 m_name = localeName.isEmpty () ? fallbackName : localeName;
@@ -279,7 +278,7 @@ void DesktopFileAMParser::updateLocalGenericName()
279278{
280279 QString currentLanguageCode = QLocale::system ().name ();
281280 auto genericNames = m_applicationInterface->genericName ();
282- auto localeGenericName = getLocaleName (currentLanguageCode,genericNames);
281+ auto localeGenericName = getLocaleName (currentLanguageCode, genericNames);
283282 auto fallBackGenericName = genericNames.value (DEFAULT_KEY);
284283
285284 m_genericName = localeGenericName.isEmpty () ? fallBackGenericName : localeGenericName;
0 commit comments