[vlc-commits] [Git][videolan/vlc][master] 8 commits: qt: fix ambiguities in overloaded function calls

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Sep 4 12:34:37 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
12322c7b by Pierre Lamot at 2023-09-04T12:02:54+00:00
qt: fix ambiguities in overloaded function calls

- - - - -
cfef77dd by Fatih Uzunoglu at 2023-09-04T12:02:54+00:00
qt: use different overload for QDateTime::fromSecsSinceEpoch()

Before Qt 6.5, it is necessary to provide the timezone explicitly.

- - - - -
d3266799 by Fatih Uzunoglu at 2023-09-04T12:02:54+00:00
qt: use QRegularExpression instead of QRegex

Co-authored-by: Pierre Lamot <pierre at videolabs.io>

- - - - -
a8d3ae63 by Pierre Lamot at 2023-09-04T12:02:54+00:00
qt: fix ambiguous string construction

- - - - -
2628c7e0 by Pierre Lamot at 2023-09-04T12:02:54+00:00
qt: fix headers inclusions

- - - - -
d8dc8c72 by Fatih Uzunoglu at 2023-09-04T12:02:54+00:00
qt: use QStyleOptionHeader::initFrom() instead of QStyleOptionHeader::init()

- - - - -
bbb9f6a0 by Steve Lhomme at 2023-09-04T12:02:54+00:00
qt: fix UTF-8 string usage

- - - - -
59b5d044 by Fatih Uzunoglu at 2023-09-04T12:02:54+00:00
qml: prevent name collision for IconLabel

- - - - -


24 changed files:

- modules/gui/qt/dialogs/epg/EPGItem.cpp
- modules/gui/qt/dialogs/epg/EPGProgram.cpp
- modules/gui/qt/dialogs/epg/EPGWidget.cpp
- modules/gui/qt/dialogs/extended/extended_panels.cpp
- modules/gui/qt/dialogs/mediainfo/info_panels.cpp
- modules/gui/qt/dialogs/open/open.cpp
- modules/gui/qt/dialogs/open/open_panels.cpp
- modules/gui/qt/dialogs/plugins/plugins.cpp
- modules/gui/qt/dialogs/preferences/expert_model.cpp
- modules/gui/qt/dialogs/preferences/simple_preferences.cpp
- modules/gui/qt/dialogs/sout/profile_selector.cpp
- modules/gui/qt/dialogs/sout/sout_widgets.cpp
- modules/gui/qt/dialogs/vlm/vlm.cpp
- modules/gui/qt/medialibrary/medialib.cpp
- modules/gui/qt/medialibrary/mlrecentsmodel.cpp
- modules/gui/qt/medialibrary/mlurlmodel.cpp
- modules/gui/qt/menus/menus.cpp
- modules/gui/qt/menus/qml_menu_wrapper.cpp
- modules/gui/qt/network/networkdevicemodel.cpp
- modules/gui/qt/network/networkmediamodel.cpp
- modules/gui/qt/util/sortfilterproxymodel.cpp
- modules/gui/qt/widgets/qml/CSDWindowButton.qml
- modules/gui/qt/widgets/qml/CheckedDelegate.qml
- modules/gui/qt/widgets/qml/OverlayMenu.qml


Changes:

=====================================
modules/gui/qt/dialogs/epg/EPGItem.cpp
=====================================
@@ -28,6 +28,7 @@
 #include <QStyleOptionGraphicsItem>
 #include <QGraphicsSceneHoverEvent>
 #include <QStyle>
+#include <QTimeZone>
 
 #include "EPGItem.hpp"
 #include "EPGView.hpp"
@@ -151,7 +152,7 @@ uint16_t EPGItem::eventID() const
 
 bool EPGItem::setData( const vlc_epg_event_t *data )
 {
-    QDateTime newtime = QDateTime::fromSecsSinceEpoch( data->i_start );
+    QDateTime newtime = QDateTime::fromSecsSinceEpoch( data->i_start, QTimeZone::utc() );
     QString newname = qfu( data->psz_name );
     QString newdesc = qfu( data->psz_description );
     QString newshortdesc = qfu( data->psz_short_description );


=====================================
modules/gui/qt/dialogs/epg/EPGProgram.cpp
=====================================
@@ -21,6 +21,8 @@
 #include "EPGItem.hpp"
 #include "EPGView.hpp"
 
+#include <QTimeZone>
+
 EPGProgram::EPGProgram( EPGView *view_, const vlc_epg_t *p_epg ) : QObject( view_ )
 {
     name = QString(p_epg->psz_name);
@@ -96,7 +98,7 @@ void EPGProgram::updateEvents( const vlc_epg_event_t * const * pp_events, size_t
     for( size_t i=0; i<i_events; i++ )
     {
         const vlc_epg_event_t *p_event = pp_events[i];
-        QDateTime eventStart = QDateTime::fromSecsSinceEpoch( p_event->i_start );
+        QDateTime eventStart = QDateTime::fromSecsSinceEpoch( p_event->i_start, QTimeZone::utc() );
         if( !mindate->isValid() || eventStart < *mindate )
             *mindate = eventStart;
 


=====================================
modules/gui/qt/dialogs/epg/EPGWidget.cpp
=====================================
@@ -30,6 +30,7 @@
 #include <QScrollBar>
 #include <QLabel>
 #include <QDateTime>
+#include <QTimeZone>
 
 #include "EPGWidget.hpp"
 #include "EPGRuler.hpp"
@@ -108,7 +109,7 @@ void EPGWidget::updateEPG( input_item_t *p_input_item )
     vlc_mutex_lock(  & p_input_item->lock );
     m_epgView->updateEPG( p_input_item->pp_epg, p_input_item->i_epg );
     m_epgView->setEpgTime( ( p_input_item->i_epg_time ) ?
-                           QDateTime::fromSecsSinceEpoch( p_input_item->i_epg_time ) :
+                           QDateTime::fromSecsSinceEpoch( p_input_item->i_epg_time, QTimeZone::utc() ) :
                            QDateTime() );
     vlc_mutex_unlock( & p_input_item->lock );
 


=====================================
modules/gui/qt/dialogs/extended/extended_panels.cpp
=====================================
@@ -40,7 +40,7 @@
 #include <QFileDialog>
 #include <QGraphicsScene>
 #include <QPainter>
-#include <QRegExp>
+#include <QRegularExpression>
 #include <QApplication>
 #include <QScreen>
 
@@ -112,8 +112,8 @@ static QString OptionFromWidgetName( QObject *obj )
 {
     /* Gruik ? ... nah */
     return obj->objectName()
-        .remove( QRegExp( "Slider|Combo|Dial|Check|Spin|Text" ) )
-        .replace( QRegExp( "([A-Z])" ), "-\\1" )
+        .remove( QRegularExpression( "Slider|Combo|Dial|Check|Spin|Text" ) )
+        .replace( QRegularExpression( "([A-Z])" ), "-\\1" )
         .toLower();
 }
 


=====================================
modules/gui/qt/dialogs/mediainfo/info_panels.cpp
=====================================
@@ -48,6 +48,7 @@
 #include <QTextEdit>
 #include <QApplication>
 #include <QPushButton>
+#include <QRegularExpression>
 
 /************************************************************************
  * Single panels
@@ -258,7 +259,7 @@ void MetaPanel::update( const SharedInputItem& p_item )
         {
             currentURL = newURL;
             lblURL->setText( "<a href='" + currentURL + "'>" +
-                             currentURL.remove( QRegExp( ".*://") ) + "</a>" );
+                             currentURL.remove( QRegularExpression( ".*://") ) + "</a>" );
         }
     }
     free( psz_meta );


=====================================
modules/gui/qt/dialogs/open/open.cpp
=====================================
@@ -29,7 +29,7 @@
 #include "util/qt_dirs.hpp"
 #include "playlist/playlist_controller.hpp"
 
-#include <QRegExp>
+#include <QRegularExpression>
 #include <QMenu>
 
 #include <vlc_url.h>
@@ -473,7 +473,7 @@ QStringList OpenDialog::SeparateEntries( const QString& entries )
     int index = 0;
     while( index < entries.count() )
     {
-        int delim_pos = entries.indexOf( QRegExp( "\\s+|\"" ), index );
+        int delim_pos = entries.indexOf( QRegularExpression( "\\s+|\"" ), index );
         if( delim_pos < 0 ) delim_pos = entries.count() - 1;
         entry += entries.mid( index, delim_pos - index + 1 );
         index = delim_pos + 1;


=====================================
modules/gui/qt/dialogs/open/open_panels.cpp
=====================================
@@ -55,6 +55,7 @@
 #include <QUrl>
 #include <QMimeData>
 #include <QDropEvent>
+#include <QRegularExpression>
 
 #define I_DEVICE_TOOLTIP \
     I_DIR_OR_FOLDER( N_("Select a device or a VIDEO_TS directory"), \
@@ -70,7 +71,7 @@
         targetCombo ## StringList << QString( ppsz_devlist[ i ] ); \
     targetCombo->addItems( QDir( "/dev/" )\
         .entryList( targetCombo ## StringList, QDir::System )\
-        .replaceInStrings( QRegExp("^"), "/dev/" ) \
+        .replaceInStrings( QRegularExpression("^"), "/dev/" ) \
     );
 
 static const char psz_devModule[][8] = { "v4l2", "pvr", "dtv",
@@ -409,7 +410,7 @@ void DiscOpenPanel::onFocus()
                     displayName = displayName + " - "  + psz_title;
                 }
 
-                ui.deviceCombo->addItem( displayName, psz_drive );
+                ui.deviceCombo->addItem( displayName, qfu(psz_drive) );
                 free( psz_drive );
                 free( psz_title );
             }
@@ -421,7 +422,7 @@ void DiscOpenPanel::onFocus()
     }
 
     char *psz_config = config_GetPsz( "dvd" );
-    int temp = ui.deviceCombo->findData( psz_config, Qt::UserRole, Qt::MatchStartsWith );
+    int temp = ui.deviceCombo->findData( qfu(psz_config), Qt::UserRole, Qt::MatchStartsWith );
     free( psz_config );
     if( temp != -1 )
         ui.deviceCombo->setCurrentIndex( temp );
@@ -860,9 +861,9 @@ void CaptureOpenPanel::initialize()
 
         QStringList nodes = QDir( "/dev/snd" ).entryList( patterns,
                                                           QDir::System );
-        QStringList names = nodes.replaceInStrings( QRegExp("^pcmC"), "hw:" )
-                                 .replaceInStrings( QRegExp("c$"), "" )
-                                 .replaceInStrings( QRegExp("D"), "," );
+        QStringList names = nodes.replaceInStrings( QRegularExpression("^pcmC"), "hw:" )
+                                 .replaceInStrings( QRegularExpression("c$"), "" )
+                                 .replaceInStrings( QRegularExpression("D"), "," );
         v4l2AudioDevice->addItems( names );
     }
     v4l2AudioDevice->clearEditText();
@@ -1081,9 +1082,9 @@ void CaptureOpenPanel::initialize()
 
         QStringList nodes = QDir( "/dev/snd" ).entryList( patterns,
                                                           QDir::System );
-        QStringList names = nodes.replaceInStrings( QRegExp("^pcmC"), "hw:" )
-                                 .replaceInStrings( QRegExp("c$"), "" )
-                                 .replaceInStrings( QRegExp("D"), "," );
+        QStringList names = nodes.replaceInStrings( QRegularExpression("^pcmC"), "hw:" )
+                                 .replaceInStrings( QRegularExpression("c$"), "" )
+                                 .replaceInStrings( QRegularExpression("D"), "," );
         pvrAudioDevice->addItems( names );
     }
     pvrAudioDevice->clearEditText();


=====================================
modules/gui/qt/dialogs/plugins/plugins.cpp
=====================================
@@ -840,7 +840,7 @@ QVariant AddonsListModel::Addon::data( int role ) const
         returnval = QVariant( (int) p_entry->i_score );
         break;
     case VersionRole:
-        returnval = QVariant( p_entry->psz_version );
+        returnval = QVariant( qfu(p_entry->psz_version) );
         break;
     case AuthorRole:
         returnval = qfu( p_entry->psz_author );


=====================================
modules/gui/qt/dialogs/preferences/expert_model.cpp
=====================================
@@ -380,7 +380,7 @@ QVariant ExpertPrefsTableModel::data( const QModelIndex &index, int role ) const
                         return QString( "#%1" ).arg( item->cfg_item->value.i, 0, 16 );
                     return QString( "%1" ).arg( item->cfg_item->value.i );
                 case CONFIG_ITEM_STRING:
-                    return item->cfg_item->value.psz;
+                    return QVariant( qfu(item->cfg_item->value.psz) );
                 default:
                     break;
             }


=====================================
modules/gui/qt/dialogs/preferences/simple_preferences.cpp
=====================================
@@ -60,6 +60,7 @@
 #include <QFileDialog>
 #include <QTreeWidget>
 #include <QTreeWidgetItem>
+#include <QRegularExpression>
 
 #include <cassert>
 #include <math.h>
@@ -655,7 +656,7 @@ SPrefsPanel::SPrefsPanel( qt_intf_t *_p_intf, QWidget *_parent,
                     << "dvd*" << "scd*" << "sr*" << "sg*" << "cd*";
             ui.DVDDeviceComboBox->addItems( QDir( "/dev/" )
                     .entryList( DVDDeviceComboBoxStringList, QDir::System )
-                    .replaceInStrings( QRegExp("^"), "/dev/" )
+                    .replaceInStrings( QRegularExpression("^"), "/dev/" )
             );
 #endif
             configGeneric<StringConfigControl>( "dvd", ui.DVDLabel,
@@ -736,7 +737,7 @@ SPrefsPanel::SPrefsPanel( qt_intf_t *_p_intf, QWidget *_parent,
                 DWORD len = 256;
                 if( RegQueryValueEx( h_key, TEXT("Lang"), NULL, NULL, (LPBYTE) &szData, &len ) == ERROR_SUCCESS ) {
                     langReg = FromWide( szData );
-                    ui.langCombo->setCurrentIndex( ui.langCombo->findData(langReg) );
+                    ui.langCombo->setCurrentIndex( ui.langCombo->findData(qfu(langReg)) );
                 }
             }
             free( langReg);


=====================================
modules/gui/qt/dialogs/sout/profile_selector.cpp
=====================================
@@ -31,7 +31,7 @@
 #include <QLabel>
 #include <QMessageBox>
 #include <QRadioButton>
-#include <QRegExp>
+#include <QRegularExpression>
 #include <QButtonGroup>
 #include <QSpinBox>
 #include <QUrl>
@@ -200,9 +200,9 @@ void VLCProfileSelector::saveProfiles()
 void VLCProfileSelector::updateOptions( int i )
 {
     QString options = profileBox->itemData( i ).toString();
-    QRegExp rx(OLDFORMAT);
+    QRegularExpression rx(OLDFORMAT);
     if ( !options.contains( ";" ) ) return;
-    if ( rx.indexIn( options ) != -1 )
+    if ( rx.match( options ).hasMatch() )
         return updateOptionsOldFormat( i );
 
     transcode.clear();
@@ -655,8 +655,8 @@ void VLCProfileEditor::codecSelected()
 
 void VLCProfileEditor::fillProfile( const QString& qs )
 {
-    QRegExp rx(OLDFORMAT);
-    if ( rx.indexIn( qs ) != -1 ) return fillProfileOldFormat( qs );
+    QRegularExpression rx(OLDFORMAT);
+    if ( rx.match( qs ).hasMatch() ) return fillProfileOldFormat( qs );
 
     QStringList tuples = qs.split( ";" );
     foreach ( const QString &tuple, tuples )


=====================================
modules/gui/qt/dialogs/sout/sout_widgets.cpp
=====================================
@@ -36,6 +36,7 @@
 #include <QLineEdit>
 #include <QFileDialog>
 #include <QUrl>
+#include <QRegularExpression>
 
 #define I_FILE_SLASH_DIR \
     I_DIR_OR_FOLDER( N_("File/Directory"), N_("File/Folder") )
@@ -148,11 +149,11 @@ QString FileDestBox::getMRL( const QString& mux )
     QString outputfile = fileEdit->text();
     if( !mux.isEmpty() )
     {
-        if( outputfile.contains( QRegExp("\\..{2,4}$")) &&
+        if( outputfile.contains( QRegularExpression("\\..{2,4}$")) &&
             !outputfile.endsWith(mux) )
         {
            /* Replace the extension according to muxer */
-           outputfile.replace(QRegExp("\\..{2,4}$"),"."+mux);
+           outputfile.replace(QRegularExpression("\\..{2,4}$"),"."+mux);
         } else if (!outputfile.endsWith( mux ) )
         {
            m.option( "mux", mux );
@@ -218,7 +219,7 @@ QString HTTPDestBox::getMRL( const QString& mux )
     /* Path-extension is primary muxer to use if possible,
        otherwise check for mux-choise and see that it isn't mp4
        then fallback to flv*/
-    if ( !path.contains(QRegExp("\\..{2,3}$") ) )
+    if ( !path.contains(QRegularExpression("\\..{2,3}$") ) )
     {
         if( !mux.isEmpty() && mux.compare("mp4") )
            m.option( "mux", mux );


=====================================
modules/gui/qt/dialogs/vlm/vlm.cpp
=====================================
@@ -779,14 +779,14 @@ void VLMWrapper::EditSchedule( const QString& name, const QString& input,
 
     if( _scherepeatnumber > 0 )
     {
-       command = "setup \"" + name + "\" repeat \"" + _scherepeatnumber + "\"";
+       command = "setup \"" + name + "\" repeat \"" + QString::number(_scherepeatnumber) + "\"";
        vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
        vlm_MessageDelete( message );
     }
 
     if( _repeatDays > 0 )
     {
-       command = "setup \"" + name + "\" period \"" + _repeatDays + "\"";
+       command = "setup \"" + name + "\" period \"" + QString::number(_repeatDays) + "\"";
        vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
        vlm_MessageDelete( message );
     }


=====================================
modules/gui/qt/medialibrary/medialib.cpp
=====================================
@@ -212,13 +212,13 @@ void MediaLib::addAndPlay(const MLItemId & itemId, const QStringList &options )
 void MediaLib::addAndPlay(const QString& mrl, const QStringList &options)
 {
     vlc::playlist::Media media{ mrl, mrl, options };
-    m_intf->p_mainPlaylistController->append( {media}, true );
+    m_intf->p_mainPlaylistController->append( QVector<vlc::playlist::Media>{media}, true );
 }
 
 void MediaLib::addAndPlay(const QUrl& mrl, const QStringList &options)
 {
     vlc::playlist::Media media{ mrl.toString(QUrl::None), mrl.fileName(), options };
-    m_intf->p_mainPlaylistController->append( {media}, true );
+    m_intf->p_mainPlaylistController->append( QVector<vlc::playlist::Media>{media}, true );
 }
 
 


=====================================
modules/gui/qt/medialibrary/mlrecentsmodel.cpp
=====================================
@@ -17,14 +17,17 @@
  *****************************************************************************/
 
 #include "mlrecentsmodel.hpp"
+
 #include <QDateTime>
+#include <QTimeZone>
+
 #include "mlhelper.hpp"
 
 
 MLRecentMedia::MLRecentMedia( const vlc_ml_media_t *media )
     : MLItem( MLItemId( media->i_id, VLC_ML_PARENT_UNKNOWN ) )
     , m_url ( media->p_files->i_nb_items > 0 ? media->p_files->p_items[0].psz_mrl : "" )
-    , m_lastPlayedDate(QDateTime::fromSecsSinceEpoch( media->i_last_played_date ))
+    , m_lastPlayedDate(QDateTime::fromSecsSinceEpoch( media->i_last_played_date, QTimeZone::utc() ))
 {
 }
 


=====================================
modules/gui/qt/medialibrary/mlurlmodel.cpp
=====================================
@@ -19,6 +19,7 @@
 #include "mlurlmodel.hpp"
 
 #include <QDateTime>
+#include <QTimeZone>
 
 MLUrlModel::MLUrlModel(QObject *parent)
     : MLBaseModel(parent)
@@ -133,7 +134,7 @@ MLUrl::MLUrl(const vlc_ml_media_t *_data)
     : MLItem( MLItemId( _data->i_id, VLC_ML_PARENT_UNKNOWN ) )
     , m_url( _data->p_files->i_nb_items > 0 ? _data->p_files->p_items[0].psz_mrl : "" )
     , m_lastPlayedDate(
-          QDateTime::fromSecsSinceEpoch( _data->i_last_played_date ).toString( QLocale::system().dateFormat( QLocale::ShortFormat ) )
+          QDateTime::fromSecsSinceEpoch( _data->i_last_played_date, QTimeZone::utc() ).toString( QLocale::system().dateFormat( QLocale::ShortFormat ) )
           )
 {
 }


=====================================
modules/gui/qt/menus/menus.cpp
=====================================
@@ -946,7 +946,7 @@ void VLCMenuBar::updateAudioDevice( qt_intf_t * p_intf, QMenu *current )
     for( int i = 0; i < i_result; i++ )
     {
         action = new QAction( qfue( names[i] ), actionGroup );
-        action->setData( ids[i] );
+        action->setData( qfu(ids[i]) );
         action->setCheckable( true );
         if( (selected && !strcmp( ids[i], selected ) ) ||
             (selected == NULL && ids[i] && ids[i][0] == '\0' ) )


=====================================
modules/gui/qt/menus/qml_menu_wrapper.cpp
=====================================
@@ -31,6 +31,7 @@
 #include <QPainter>
 #include <QSignalMapper>
 #include <QScreen>
+#include <QActionGroup>
 
 namespace
 {
@@ -39,7 +40,7 @@ namespace
         assert(order == Qt::AscendingOrder || order == Qt::DescendingOrder);
 
         QStyleOptionHeader headerOption;
-        headerOption.init(widget);
+        headerOption.initFrom(widget);
         headerOption.sortIndicator = (order == Qt::AscendingOrder)
                 ? QStyleOptionHeader::SortDown
                 : QStyleOptionHeader::SortUp;


=====================================
modules/gui/qt/network/networkdevicemodel.cpp
=====================================
@@ -130,7 +130,7 @@ bool NetworkDeviceModel::addToPlaylist(int index)
         return false;
     auto item =  m_items[index];
     vlc::playlist::Media media{ item.inputItem.get() };
-    m_ctx->getIntf()->p_mainPlaylistController->append( { media }, false);
+    m_ctx->getIntf()->p_mainPlaylistController->append( QVector<vlc::playlist::Media>{ media }, false);
     return true;
 }
 
@@ -168,7 +168,7 @@ bool NetworkDeviceModel::addAndPlay(int index)
         return false;
     auto item =  m_items[index];
     vlc::playlist::Media media{ item.inputItem.get() };
-    m_ctx->getIntf()->p_mainPlaylistController->append( { media }, true);
+    m_ctx->getIntf()->p_mainPlaylistController->append(QVector<vlc::playlist::Media>{ media }, true);
     return true;
 }
 


=====================================
modules/gui/qt/network/networkmediamodel.cpp
=====================================
@@ -18,6 +18,8 @@
 
 #include "networkmediamodel.hpp"
 
+#include <QTimeZone>
+
 #include "medialibrary/mlhelper.hpp"
 
 #include "playlist/media.hpp"
@@ -257,7 +259,7 @@ bool NetworkMediaModel::addToPlaylist(const int index)
         return false;
     auto item =  m_items[index];
     vlc::playlist::Media media{ item.tree.media.get() };
-    m_ctx->getIntf()->p_mainPlaylistController->append( { media }, false);
+    m_ctx->getIntf()->p_mainPlaylistController->append( QVector<vlc::playlist::Media>{ media }, false);
     return true;
 }
 
@@ -300,7 +302,7 @@ bool NetworkMediaModel::addAndPlay(int index)
         return false;
     auto item =  m_items[index];
     vlc::playlist::Media media{ item.tree.media.get() };
-    m_ctx->getIntf()->p_mainPlaylistController->append( { media }, true);
+    m_ctx->getIntf()->p_mainPlaylistController->append( QVector<vlc::playlist::Media>{ media }, true);
     return true;
 }
 
@@ -601,7 +603,7 @@ void NetworkMediaModel::refreshMediaList( MediaTreePtr tree,
             free(str);
 
             if (ok)
-                item.fileModified = QDateTime::fromSecsSinceEpoch(time);
+                item.fileModified = QDateTime::fromSecsSinceEpoch(time, QTimeZone::utc());
         }
 
         if ( m_mediaLib && item.canBeIndexed == true )


=====================================
modules/gui/qt/util/sortfilterproxymodel.cpp
=====================================
@@ -18,8 +18,11 @@
 
 #include "sortfilterproxymodel.hpp"
 
+#include <QRegularExpression>
+
 #include <cassert>
 
+
 SortFilterProxyModel::SortFilterProxyModel( QObject *parent )
     : QSortFilterProxyModel( parent )
 {
@@ -36,12 +39,12 @@ SortFilterProxyModel::SortFilterProxyModel( QObject *parent )
 
 QString SortFilterProxyModel::searchPattern() const
 {
-    return filterRegExp().pattern();
+    return filterRegularExpression().pattern();
 }
 
 void SortFilterProxyModel::setSearchPattern( const QString &searchPattern )
 {
-    setFilterRegExp(searchPattern);
+    setFilterRegularExpression(searchPattern);
 }
 
 QByteArray SortFilterProxyModel::searchRole() const


=====================================
modules/gui/qt/widgets/qml/CSDWindowButton.qml
=====================================
@@ -20,6 +20,7 @@ import QtQuick.Controls 2.12
 import QtQuick.Templates 2.12 as T
 import QtQuick.Layouts 1.12
 
+import "."
 import "qrc:///style/"
 
 


=====================================
modules/gui/qt/widgets/qml/CheckedDelegate.qml
=====================================
@@ -21,6 +21,7 @@ import QtQuick.Controls 2.12
 import QtQuick.Templates 2.12 as T
 import org.videolan.vlc 0.1
 
+import "."
 import "qrc:///style/"
 
 T.ItemDelegate {


=====================================
modules/gui/qt/widgets/qml/OverlayMenu.qml
=====================================
@@ -21,6 +21,7 @@ import QtQuick.Templates 2.12 as T
 import QtQuick.Layouts 1.12
 import org.videolan.vlc 0.1
 
+import "."
 import "qrc:///style/"
 
 FocusScope {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ecb7532281db5f86a203567bb6461fa38835751c...59b5d0448c65ed60fddcd1af446a18e89e9cfb1b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ecb7532281db5f86a203567bb6461fa38835751c...59b5d0448c65ed60fddcd1af446a18e89e9cfb1b
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