[vlc-commits] qt: replace deprecated qVariantFromValue by QVariant::fromValue

Alexandre Janniaux git at videolan.org
Wed Jan 22 10:08:41 CET 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Thu Jan  9 00:56:34 2020 +0100| [f8aa7058fab0452024a0b769f549d9e663a9cde8] | committer: Thomas Guillem

qt: replace deprecated qVariantFromValue by QVariant::fromValue

They are warned as obsolete in Qt 5.14, and were historic workaround
for MSVC builds.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f8aa7058fab0452024a0b769f549d9e663a9cde8
---

 modules/gui/qt/dialogs/preferences/complete_preferences.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/dialogs/preferences/complete_preferences.cpp b/modules/gui/qt/dialogs/preferences/complete_preferences.cpp
index 42e83b25ba..20140271aa 100644
--- a/modules/gui/qt/dialogs/preferences/complete_preferences.cpp
+++ b/modules/gui/qt/dialogs/preferences/complete_preferences.cpp
@@ -131,7 +131,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent,
             current_item->setIcon( 0 , icon );
             //current_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
             current_item->setData( 0, Qt::UserRole,
-                                   qVariantFromValue( data ) );
+                                   QVariant::fromValue( data ) );
             addTopLevelItem( current_item );
             expandItem( current_item );
             break;
@@ -181,7 +181,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent,
             QTreeWidgetItem *subcat_item = new QTreeWidgetItem();
             subcat_item->setText( 0, data_sub->name );
             subcat_item->setData( 0, Qt::UserRole,
-                                  qVariantFromValue( data_sub ) );
+                                  QVariant::fromValue( data_sub ) );
             //subcat_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
 
             /* Add it to the parent */



More information about the vlc-commits mailing list