[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: rename private methods with the same name as ExpertPrefsTable slots

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Oct 5 09:14:17 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f6fb549e by Steve Lhomme at 2025-10-05T08:59:15+00:00
qt: rename private methods with the same name as ExpertPrefsTable slots

We don't need QOverload<>::of() to access the slot anymore.

- - - - -
aea23ddc by Steve Lhomme at 2025-10-05T08:59:15+00:00
qt: rename private methods with the same name as VLCProfileSelector slots

We don't need QOverload<>::of() to access the slot anymore.

- - - - -


4 changed files:

- modules/gui/qt/dialogs/preferences/expert_view.cpp
- modules/gui/qt/dialogs/preferences/expert_view.hpp
- modules/gui/qt/dialogs/sout/profile_selector.cpp
- modules/gui/qt/dialogs/sout/profile_selector.hpp


Changes:

=====================================
modules/gui/qt/dialogs/preferences/expert_view.cpp
=====================================
@@ -68,8 +68,8 @@ ExpertPrefsTable::ExpertPrefsTable( QWidget *parent ) :
     copy_value_action = new QAction( qtr( "Copy &value" ), this );
 
     connect( reset_action, &QAction::triggered, this, &ExpertPrefsTable::resetItem );
-    connect( toggle_action, &QAction::triggered, this, QOverload<>::of(&ExpertPrefsTable::toggleItem) );
-    connect( modify_action, &QAction::triggered, this, QOverload<>::of(&ExpertPrefsTable::modifyItem) );
+    connect( toggle_action, &QAction::triggered, this, &ExpertPrefsTable::toggleItem );
+    connect( modify_action, &QAction::triggered, this, &ExpertPrefsTable::modifyItem );
     connect( copy_name_action, &QAction::triggered, this, &ExpertPrefsTable::copyItemName );
     connect( copy_value_action, &QAction::triggered, this, &ExpertPrefsTable::copyItemValue );
 }
@@ -136,11 +136,11 @@ void ExpertPrefsTable::resetItem()
 
 void ExpertPrefsTable::toggleItem()
 {
-    toggleItem( currentIndex() );
+    toggleItemPrivate( currentIndex() );
 }
 
 /* this obviously only applies to boolean options! */
-void ExpertPrefsTable::toggleItem( const QModelIndex &index )
+void ExpertPrefsTable::toggleItemPrivate( const QModelIndex &index )
 {
     if( !index.isValid() )
         return;
@@ -152,10 +152,10 @@ void ExpertPrefsTable::modifyItem()
     QModelIndex index = currentIndex();
     if( !index.isValid() )
         return;
-    modifyItem( index );
+    modifyItemPrivate( index );
 }
 
-void ExpertPrefsTable::modifyItem( const QModelIndex &index )
+void ExpertPrefsTable::modifyItemPrivate( const QModelIndex &index )
 {
     ExpertPrefsTableItem *item = myModel()->itemAt( index );
     module_config_t *cfg_item = item->getConfig();
@@ -207,11 +207,11 @@ void ExpertPrefsTable::doubleClicked( const QModelIndex &index )
 {
     if( index.data( ExpertPrefsTableModel::TypeClassRole ).toInt() == CONFIG_ITEM_BOOL )
     {
-        toggleItem( index );
+        toggleItemPrivate( index );
         myModel()->notifyUpdatedRow( index.row() );
     }
     else
-        modifyItem( index );
+        modifyItemPrivate( index );
 }
 
 /*********************************************************************


=====================================
modules/gui/qt/dialogs/preferences/expert_view.hpp
=====================================
@@ -60,8 +60,8 @@ protected:
 #endif // QT_NO_CONTEXTMENU
 
 private:
-    void modifyItem( const QModelIndex & );
-    void toggleItem( const QModelIndex & );
+    void modifyItemPrivate( const QModelIndex & );
+    void toggleItemPrivate( const QModelIndex & );
     QAction *reset_action;
     QAction *toggle_action;
     QAction *modify_action;


=====================================
modules/gui/qt/dialogs/sout/profile_selector.cpp
=====================================
@@ -71,7 +71,7 @@ VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent )
     layout->addWidget(newButton);
 
     BUTTONACT( newButton, &VLCProfileSelector::newProfile );
-    BUTTONACT( editButton, QOverload<>::of(&VLCProfileSelector::editProfile) );
+    BUTTONACT( editButton, &VLCProfileSelector::editProfile );
     BUTTONACT( deleteButton, &VLCProfileSelector::deleteProfile );
     fillProfilesCombo();
 
@@ -130,16 +130,16 @@ inline void VLCProfileSelector::fillProfilesCombo()
 
 void VLCProfileSelector::newProfile()
 {
-    editProfile( "", "" );
+    editProfilePrivate( "", "" );
 }
 
 void VLCProfileSelector::editProfile()
 {
-    editProfile( profileBox->currentText(),
+    editProfilePrivate( profileBox->currentText(),
                  profileBox->itemData( profileBox->currentIndex() ).toString() );
 }
 
-void VLCProfileSelector::editProfile( const QString& qs, const QString& value )
+void VLCProfileSelector::editProfilePrivate( const QString& qs, const QString& value )
 {
     /* Create the Profile Editor */
     QWidget* windowWidget = window();


=====================================
modules/gui/qt/dialogs/sout/profile_selector.hpp
=====================================
@@ -49,7 +49,7 @@ public:
 private:
     QComboBox *profileBox;
     void fillProfilesCombo();
-    void editProfile( const QString&, const QString& );
+    void editProfilePrivate( const QString&, const QString& );
     void saveProfiles();
     QString mux;
     SoutChain transcode;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9d2d8f0136730fb81d1de130680796f6f512aad3...aea23ddc2a48b3c5b4a6b88af6821fbb66598909

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9d2d8f0136730fb81d1de130680796f6f512aad3...aea23ddc2a48b3c5b4a6b88af6821fbb66598909
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