[vlc-commits] [Git][videolan/vlc][3.0.x] 5 commits: qt: fix warning about ambiguous operators

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Dec 14 21:23:03 UTC 2025



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
d87c28fe by Steve Lhomme at 2025-12-14T22:01:09+01:00
qt: fix warning about ambiguous operators

- - - - -
548e797d by Steve Lhomme at 2025-12-14T22:01:09+01:00
qt: remove unused DialogEventTypeOffset

- - - - -
f1f9e073 by Steve Lhomme at 2025-12-14T22:01:09+01:00
qt: fix missing override on customEvent()

'customEvent' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]

- - - - -
085a10f9 by Steve Lhomme at 2025-12-14T22:01:09+01:00
qt: fix index type in ARRAY_SIZE loop

- - - - -
b5ec4940 by Steve Lhomme at 2025-12-14T22:01:09+01:00
qt: remove unused BUTTON_SET_ACT

- - - - -


8 changed files:

- modules/gui/qt/components/simple_preferences.cpp
- modules/gui/qt/dialogs/help.hpp
- modules/gui/qt/dialogs/messages.hpp
- modules/gui/qt/dialogs_provider.hpp
- modules/gui/qt/input_manager.hpp
- modules/gui/qt/managers/addons_manager.hpp
- modules/gui/qt/menus.cpp
- modules/gui/qt/qt.hpp


Changes:

=====================================
modules/gui/qt/components/simple_preferences.cpp
=====================================
@@ -740,7 +740,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 #ifndef _WIN32
             ui.langBox->hide();
 #else
-            for( int i = 0; i < ARRAY_SIZE( language_map ); i++)
+            for( size_t i = 0; i < ARRAY_SIZE( language_map ); i++)
                 ui.langCombo->addItem( qfu( language_map[i].name ), language_map[i].iso );
             CONNECT( ui.langCombo, currentIndexChanged( int ), this, langChanged( int ) );
 


=====================================
modules/gui/qt/dialogs/help.hpp
=====================================
@@ -89,7 +89,7 @@ private:
 
     Ui::updateWidget ui;
     update_t *p_update;
-    void customEvent( QEvent * );
+    void customEvent( QEvent * ) override;
     bool b_checked;
 
 private slots:


=====================================
modules/gui/qt/dialogs/messages.hpp
=====================================
@@ -43,7 +43,7 @@ private:
 
     Ui::messagesPanelWidget ui;
     static void sinkMessage( void *, vlc_log_t *, unsigned );
-    void customEvent( QEvent * );
+    void customEvent( QEvent * ) override;
     void sinkMessage( const MsgEvent * );
     bool matchFilter( const QString& );
 


=====================================
modules/gui/qt/dialogs_provider.hpp
=====================================
@@ -105,7 +105,7 @@ public:
 protected:
     QSignalMapper *menusMapper;
     QSignalMapper *menusUpdateMapper;
-    void customEvent( QEvent *);
+    void customEvent( QEvent *) override;
 
 private:
     DialogsProvider( intf_thread_t *);


=====================================
modules/gui/qt/input_manager.hpp
=====================================
@@ -158,7 +158,7 @@ private:
     bool            b_video;
     vlc_tick_t      timeA, timeB;
 
-    void customEvent( QEvent * );
+    void customEvent( QEvent * ) override;
 
     void addCallbacks();
     void delCallbacks();
@@ -288,7 +288,7 @@ private:
     MainInputManager( intf_thread_t * );
     virtual ~MainInputManager();
 
-    void customEvent( QEvent * );
+    void customEvent( QEvent * ) override;
 
     InputManager            *im;
     input_thread_t          *p_input;


=====================================
modules/gui/qt/managers/addons_manager.hpp
=====================================
@@ -68,7 +68,7 @@ public:
     static void addonFoundCallback( addons_manager_t *, addon_entry_t * );
     static void addonsDiscoveryEndedCallback( addons_manager_t * );
     static void addonChangedCallback( addons_manager_t *, addon_entry_t * );
-    void customEvent( QEvent * );
+    void customEvent( QEvent * ) override;
     void install( QByteArray id );
     void remove( QByteArray id );
     static QString getAddonType( int );


=====================================
modules/gui/qt/menus.cpp
=====================================
@@ -147,9 +147,9 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf,
     {
         action = menu->addAction( text, THEMIM, member );
     }
-    action->setData( VLCMenuBar::ACTION_STATIC |
-                     ( bStatic ) ? VLCMenuBar::ACTION_ALWAYS_ENABLED
-                                 : VLCMenuBar::ACTION_NONE
+    action->setData( static_cast<int>( VLCMenuBar::ACTION_STATIC |
+                     ( bStatic ? VLCMenuBar::ACTION_ALWAYS_ENABLED
+                               : VLCMenuBar::ACTION_NONE ) )
                    );
     return action;
 }
@@ -1249,7 +1249,7 @@ static bool IsMenuEmpty( const char *psz_var, vlc_object_t *p_object )
 
 #define TEXT_OR_VAR qfue ( text.psz_string ? text.psz_string : psz_var )
 
-void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
+void VLCMenuBar::UpdateItem( intf_thread_t *, QMenu *menu,
         const char *psz_var, vlc_object_t *p_object, bool b_submenu )
 {
     vlc_value_t val, text;


=====================================
modules/gui/qt/qt.hpp
=====================================
@@ -52,7 +52,6 @@
 #define HAS_QT510 ( QT_VERSION >= 0x051000 )
 
 enum {
-    DialogEventTypeOffset = 0,
     IMEventTypeOffset     = 100,
     PLEventTypeOffset     = 200,
     MsgEventTypeOffset    = 300,
@@ -130,10 +129,6 @@ struct vlc_playlist_locker {
     button->setText( text );                 \
     button->setToolTip( tooltip );
 
-#define BUTTON_SET_ACT( button, text, tooltip, thisslot ) \
-    BUTTON_SET( button, text, tooltip );                  \
-    BUTTONACT( button, thisslot );
-
 #define BUTTON_SET_IMG( button, text, image, tooltip )    \
     BUTTON_SET( button, text, tooltip );                  \
     button->setIcon( QIcon( ":/"#image ".svg") );



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ce0c8b05f97fd126ee1cd1b668b8403b84828db6...b5ec4940a4a643d5abbe88b0c729fab7f7f2e9ca

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ce0c8b05f97fd126ee1cd1b668b8403b84828db6...b5ec4940a4a643d5abbe88b0c729fab7f7f2e9ca
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list