[vlc-devel] [PATCH 6/6] qt: using QMap as mutlimap is deprecated in Qt5.15

Alexandre Janniaux ajanni at videolabs.io
Thu May 28 18:05:11 CEST 2020


Hi,

Typo in the commit title :)

Regards,
--
Alexandre Janniaux
Videolabs

On Thu, May 28, 2020 at 02:41:57PM +0200, Pierre Lamot wrote:
> ---
>  modules/gui/qt/dialogs/preferences/preferences_widgets.cpp | 4 ++--
>  modules/gui/qt/util/navigation_history.cpp                 | 4 +++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/modules/gui/qt/dialogs/preferences/preferences_widgets.cpp b/modules/gui/qt/dialogs/preferences/preferences_widgets.cpp
> index bce11569da..53c05171e0 100644
> --- a/modules/gui/qt/dialogs/preferences/preferences_widgets.cpp
> +++ b/modules/gui/qt/dialogs/preferences/preferences_widgets.cpp
> @@ -1201,7 +1201,7 @@ void KeySelectorControl::finish()
>
>      p_config = module_config_get (p_main, &confsize);
>
> -    QMap<QString, QString> global_keys;
> +    QMultiMap<QString, QString> global_keys;
>      for (size_t i = 0; i < confsize; i++)
>      {
>          module_config_t *p_config_item = p_config + i;
> @@ -1236,7 +1236,7 @@ void KeySelectorControl::finish()
>           && !EMPTY_STR( p_config_item->psz_text )
>           && !EMPTY_STR( p_config_item->value.psz ) )
>          {
> -            global_keys.insertMulti( qtr( p_config_item->psz_text ), qfu( p_config_item->value.psz ) );
> +            global_keys.insert( qtr( p_config_item->psz_text ), qfu( p_config_item->value.psz ) );
>          }
>      }
>
> diff --git a/modules/gui/qt/util/navigation_history.cpp b/modules/gui/qt/util/navigation_history.cpp
> index 7952f7829b..a3cedb876f 100644
> --- a/modules/gui/qt/util/navigation_history.cpp
> +++ b/modules/gui/qt/util/navigation_history.cpp
> @@ -55,7 +55,9 @@ static void pushListRec(QVariantMap& itemMap, QVariantList::const_iterator it, Q
>      }
>      else if ( it->canConvert<QVariantMap>() )
>      {
> -        itemMap.unite( it->toMap() );
> +        QVariantMap varMap = it->toMap();
> +        for (auto kv = varMap.constBegin(); kv != varMap.constEnd(); ++kv )
> +            itemMap[kv.key()] = kv.value();
>          pushListRec(itemMap, ++it, end);
>      }
>  }
> --
> 2.25.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list