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

Alexandre Janniaux ajanni at videolabs.io
Thu Jan 9 13:17:10 CET 2020


They are warned as obsolete in Qt 5.14, and were historic workaround
for MSVC builds.
---
 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 */
-- 
2.24.1



More information about the vlc-devel mailing list