From 9053b9cecf900590e81332e6325c9791325fe018 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 30 Aug 2019 06:20:45 -0400 Subject: [PATCH] [libcalamares] Fix Qt 5.9 compatibility - not really sure why I went for the Qt 5.10 STL-style iterators FIXES #1236 --- src/libcalamares/locale/TranslatableConfiguration.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/locale/TranslatableConfiguration.cpp b/src/libcalamares/locale/TranslatableConfiguration.cpp index 7493c836c..bc39c398e 100644 --- a/src/libcalamares/locale/TranslatableConfiguration.cpp +++ b/src/libcalamares/locale/TranslatableConfiguration.cpp @@ -40,9 +40,9 @@ TranslatedString::TranslatedString( const QVariantMap& map, const QString& key ) QString value = CalamaresUtils::getString( map, key ); m_strings[ QString() ] = value; - for ( auto it = map.constKeyValueBegin(); it != map.constKeyValueEnd(); ++it ) + for ( auto it = map.constBegin(); it != map.constEnd(); ++it ) { - QString subkey = ( *it ).first; + QString subkey = it.key(); if ( subkey == key ) { // Already obtained, above @@ -53,7 +53,7 @@ TranslatedString::TranslatedString( const QVariantMap& map, const QString& key ) if ( subkey.indexOf( QRegularExpression( "\\[([a-zA-Z_@]*)\\]" ), 0, &match ) > 0 ) { QString language = match.captured( 1 ); - m_strings[ language ] = ( *it ).second.toString(); + m_strings[ language ] = it.value().toString(); } } }