qt: fix bitfield added values set in QVariant
authorSteve Lhomme <robux4@ycbcr.xyz>
Mon, 16 Dec 2024 14:48:41 +0000 (15:48 +0100)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 14 Jan 2025 22:09:47 +0000 (23:09 +0100)
It's checked with actions[i]->data().toInt() anyway.

The code was removed in 4.0 with e1c82853965d44b4390af78d9184bd0b60ccc3fb
but was never fixed.

Gbp-Pq: Name 0117-qt-fix-bitfield-added-values-set-in-QVariant.patch

modules/gui/qt/menus.cpp

index 460653c93e2fb5a37bacea47b174b69a8941d7ef..70a475fb37b047980a54735b834bc3a42b097c7d 100644 (file)
@@ -846,20 +846,20 @@ void VLCMenuBar::PopupMenuPlaylistEntries( QMenu *menu,
     action = addMIMStaticEntry( p_intf, menu, qtr( "Pre&vious" ),
             ":/toolbar/previous_b.svg", SLOT( prev() ), true );
     action->setEnabled( !bPlaylistEmpty );
-    action->setData( ACTION_NO_CLEANUP + ACTION_DELETE_ON_REBUILD );
+    action->setData( static_cast<int>(ACTION_NO_CLEANUP | ACTION_DELETE_ON_REBUILD) );
     CONNECT( THEMIM, playlistNotEmpty(bool), action, setEnabled(bool) );
 
     action = addMIMStaticEntry( p_intf, menu, qtr( "Ne&xt" ),
             ":/toolbar/next_b.svg", SLOT( next() ), true );
     action->setEnabled( !bPlaylistEmpty );
-    action->setData( ACTION_NO_CLEANUP + ACTION_DELETE_ON_REBUILD );
+    action->setData( static_cast<int>(ACTION_NO_CLEANUP | ACTION_DELETE_ON_REBUILD) );
     CONNECT( THEMIM, playlistNotEmpty(bool), action, setEnabled(bool) );
 
     action = menu->addAction( qtr( "Record" ), THEAM, SLOT( record() ) );
     action->setIcon( QIcon( ":/toolbar/record.svg" ) );
     if( !p_input )
         action->setEnabled( false );
-    action->setData( ACTION_NO_CLEANUP + ACTION_DELETE_ON_REBUILD );
+    action->setData( static_cast<int>(ACTION_NO_CLEANUP | ACTION_DELETE_ON_REBUILD) );
     menu->addSeparator();
 }