]> git.sesse.net Git - vlc/commitdiff
Qt: use count() iso size() on Qt Containers
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 16 Aug 2011 15:05:02 +0000 (17:05 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 16 Aug 2011 15:32:15 +0000 (17:32 +0200)
18 files changed:
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/playlist/ml_item.cpp
modules/gui/qt4/components/playlist/ml_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/sout/profile_selector.cpp
modules/gui/qt4/dialogs/bookmarks.cpp
modules/gui/qt4/dialogs/ml_configuration.cpp
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/plugins.cpp
modules/gui/qt4/dialogs/vlm.cpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/menus.cpp
modules/gui/qt4/recents.cpp
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/input_slider.cpp

index 78d7b18a5ae0c383f515d4a1d119b64ce4e1c987..1a64014bdc29c307bca22dfd1cf80f6a9526e532 100644 (file)
@@ -112,10 +112,10 @@ void AbstractController::parseAndCreate( const QString& config,
                                          QBoxLayout *controlLayout )
 {
     QStringList list = config.split( ";", QString::SkipEmptyParts ) ;
-    for( int i = 0; i < list.size(); i++ )
+    for( int i = 0; i < list.count(); i++ )
     {
         QStringList list2 = list.at( i ).split( "-" );
-        if( list2.size() < 1 )
+        if( list2.count() < 1 )
         {
             msg_Warn( p_intf, "Parsing error 1. Please, report this." );
             continue;
@@ -130,7 +130,7 @@ void AbstractController::parseAndCreate( const QString& config,
             continue;
         }
 
-        if( list2.size() > 1 )
+        if( list2.count() > 1 )
         {
             i_option = list2.at( 1 ).toInt( &ok );
             if( !ok )
@@ -471,7 +471,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
         if( frame )
         {
             QList<QToolButton *> allTButtons = frame->findChildren<QToolButton *>();
-            for( int i = 0; i < allTButtons.size(); i++ )
+            for( int i = 0; i < allTButtons.count(); i++ )
                 applyAttributes( allTButtons[i], b_flat, b_big );
         }
         else
index d8ec051a64996bd4ae8125908d37cde16dd2463d..57137d25ff26bc2fabd57e614f711fc0b604415e 100644 (file)
@@ -596,7 +596,7 @@ NetOpenPanel::~NetOpenPanel()
     if( !mrlList ) return;
 
     QStringList tempL = mrlList->stringList();
-    while( tempL.size() > 8 ) tempL.removeFirst();
+    while( tempL.count() > 8 ) tempL.removeFirst();
 
     getSettings()->setValue( "Open/netMRL", tempL );
 
@@ -1303,7 +1303,7 @@ void CaptureOpenPanel::advancedDialog()
     if( adv->exec() )
     {
         QString tempMRL = "";
-        for( int i = 0; i < controls.size(); i++ )
+        for( int i = 0; i < controls.count(); i++ )
         {
             ConfigControl *control = controls[i];
 
index 8e72f7e3982da7b236b5fc77df92bb7676ac803b..3dd7db944caeb7d83685bfd15904e70f9819e93e 100644 (file)
@@ -124,14 +124,14 @@ MLItem* MLItem::child( int row ) const
 void MLItem::addChild( MLItem *child, int row )
 {
     assert( child );
-    children.insert( row==-1 ? children.size() : row, child );
+    children.insert( row==-1 ? children.count() : row, child );
 }
 
 void MLItem::delChild( int row )
 {
     if( !childCount() ) return; // assert ?
     MLItem *item =
-            children.takeAt( ( row!=-1 ) ? row : ( children.size()-1 ) );
+            children.takeAt( ( row!=-1 ) ? row : ( children.count()-1 ) );
     assert( item );
     delete item;
 }
@@ -143,7 +143,7 @@ int MLItem::rowOfChild( MLItem *item ) const
 
 int MLItem::childCount() const
 {
-    return children.size();
+    return children.count();
 }
 
 MLItem* MLItem::parent() const
index a8e7a359ce3121c88ab0b36ef65ba3bef1bf3dff..b8486b77d0f34103e6f4b6df6464f994606c80e8 100644 (file)
@@ -235,7 +235,7 @@ void MLModel::remove( MLItem *item )
 
 void MLModel::doDelete( QModelIndexList list )
 {
-    for (int i = 0; i < list.size(); ++i)
+    for (int i = 0; i < list.count(); ++i)
     {
         int id = getId( list.at(i) );
         ml_DeleteSimple( p_ml, id );
@@ -562,7 +562,7 @@ void MLModel::popupInfo()
 QStringList MLModel::selectedURIs()
 {
     QStringList list;
-    for( int i = 0; i < current_selection.size(); i++ )
+    for( int i = 0; i < current_selection.count(); i++ )
     {
         QModelIndex idx = current_selection.value(i);
         MLItem *item = static_cast< MLItem* >( idx.internalPointer() );
index 606069fb697e1a760a0616eb3419fb7966a917bc..54b4fbbe8adaabe544b10c3cc675d7104357bef2 100644 (file)
@@ -232,7 +232,7 @@ void PLModel::dropMove( const PlMimeData * plMimeData, PLItem *target, int row )
 {
     QList<input_item_t*> inputItems = plMimeData->inputItems();
     QList<PLItem*> model_items;
-    playlist_item_t *pp_items[inputItems.size()];
+    playlist_item_t *pp_items[inputItems.count()];
 
     PL_LOCK;
 
@@ -510,7 +510,7 @@ int PLModel::rowCount( const QModelIndex &parent ) const
 QStringList PLModel::selectedURIs()
 {
     QStringList lst;
-    for( int i = 0; i < current_selection.size(); i++ )
+    for( int i = 0; i < current_selection.count(); i++ )
     {
         const PLItem *item = getItem( current_selection[i] );
         if( item )
@@ -690,7 +690,7 @@ void PLModel::takeItem( PLItem *item )
 void PLModel::insertChildren( PLItem *node, QList<PLItem*>& items, int i_pos )
 {
     assert( node );
-    int count = items.size();
+    int count = items.count();
     if( !count ) return;
     printf( "Here I am\n");
     beginInsertRows( index( node, 0 ), i_pos, i_pos + count - 1 );
@@ -783,7 +783,7 @@ void PLModel::doDelete( QModelIndexList selected )
 
 void PLModel::recurseDelete( QList<PLItem*> children, QModelIndexList *fullList )
 {
-    for( int i = children.size() - 1; i >= 0 ; i-- )
+    for( int i = children.count() - 1; i >= 0 ; i-- )
     {
         PLItem *item = children[i];
         if( item->childCount() )
index 4f1a5deb91907c2c32d06be8c88a0e4b80b4743f..5e9d5e1793d930b76b11957d0a284cbff452c31a 100644 (file)
@@ -1450,7 +1450,7 @@ void KeyInputDialog::checkForConflicts( int i_vlckey )
          table->findItems( VLCKeyToString( i_vlckey ), Qt::MatchExactly,
                            b_global ? 2 : 1 );
 
-    if( conflictList.size() &&
+    if( conflictList.count() &&
         conflictList[0]->data( b_global ? 2 : 1, Qt::UserRole ).toInt() > 1 )
         /* Avoid 0 or -1 that are the "Unset" states */
     {
index e279c6bf3dfb330be87826d1bfbe75158281427e..111cabcca69696b515bece2922288b3299eeff8e 100644 (file)
@@ -168,7 +168,7 @@ void VLCProfileSelector::saveProfiles()
 void VLCProfileSelector::updateOptions( int i )
 {
     QStringList options = profileBox->itemData( i ).toString().split( ";" );
-    if( options.size() < 16 )
+    if( options.count() < 16 )
         return;
 
     mux = options[0];
@@ -317,7 +317,7 @@ inline void VLCProfileEditor::registerCodecs()
 void VLCProfileEditor::fillProfile( const QString& qs )
 {
     QStringList options = qs.split( ";" );
-    if( options.size() < 16 )
+    if( options.count() < 16 )
         return;
 
     const QString mux = options[0];
index 7fb54ddd308f9cd0f47898e35455ffcbeb5caced..fa0ccd09022fe6c90f22af4e30b0775be4f27853 100644 (file)
@@ -218,11 +218,11 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
     else if( column == 2 )
     {
         fields = item->text( column ).split( ":", QString::SkipEmptyParts );
-        if( fields.size() == 1 )
+        if( fields.count() == 1 )
             p_seekpoint->i_time_offset = 1000000 * ( fields[0].toInt() );
-        else if( fields.size() == 2 )
+        else if( fields.count() == 2 )
             p_seekpoint->i_time_offset = 1000000 * ( fields[0].toInt() * 60 + fields[1].toInt() );
-        else if( fields.size() == 3 )
+        else if( fields.count() == 3 )
             p_seekpoint->i_time_offset = 1000000 * ( fields[0].toInt() * 3600 + fields[1].toInt() * 60 + fields[2].toInt() );
         else
         {
index 191f4707a17f9077d91f26a4ee337f405910d8b9..f3f8b994cfbc317d812be786bec5e3c6b733dc0c 100644 (file)
@@ -49,7 +49,7 @@ Qt::ItemFlags MLDirModel::flags( const QModelIndex &index ) const
     flags |= Qt::ItemIsUserCheckable;
     if( b_recursive )
     {
-        for( int i = 0; i < monitoredDirs.size(); i++ )
+        for( int i = 0; i < monitoredDirs.count(); i++ )
         {
             if( filePath( index ).startsWith( monitoredDirs.at( i ) ) )
             {
@@ -70,7 +70,7 @@ QVariant MLDirModel::data( const QModelIndex &index, int role ) const
             return itemCheckState.value( filePath( index ) );
         else if( b_recursive )
         {
-            for( int i = 0; i < monitoredDirs.size(); i++ )
+            for( int i = 0; i < monitoredDirs.count(); i++ )
             {
                 if( filePath( index ).startsWith( monitoredDirs.at( i ) ) )
                     return Qt::Checked;
@@ -108,7 +108,7 @@ bool MLDirModel::setData( const QModelIndex &index, const QVariant &value,
                in recursive mode */
             if( b_recursive )
             {
-                for( int i = 0; i < monitoredDirs.size()-1; i++ )
+                for( int i = 0; i < monitoredDirs.count()-1; i++ )
                 {
                     if( monitoredDirs.at( i ).startsWith( filePath( index ) ) )
                     {
@@ -126,13 +126,13 @@ bool MLDirModel::setData( const QModelIndex &index, const QVariant &value,
                if index is his only child */
             for( idx = index.parent(); idx != QModelIndex(); idx = idx.parent() )
             {
-                if( monitoredDirs.size() == 0 )
+                if( monitoredDirs.count() == 0 )
                 {
                     itemCheckState.take( filePath(idx) );
                     topLeft = idx;
                     continue;
                 }
-                for( int i = 0; i < monitoredDirs.size(); i++ )
+                for( int i = 0; i < monitoredDirs.count(); i++ )
                 {
                     if( monitoredDirs.at( i ).startsWith( filePath( idx ) ) )
                         break;
@@ -173,9 +173,9 @@ void MLDirModel::setRecursivity( bool _b_recursive )
        monitoredDirs some directories  */
     if( !b_recursive && _b_recursive )
     {
-        for( int i = 0; i < monitoredDirs.size(); i++ )
+        for( int i = 0; i < monitoredDirs.count(); i++ )
         {
-            for( int j = i+1; j < monitoredDirs.size(); j++ )
+            for( int j = i+1; j < monitoredDirs.count(); j++ )
             {
                 if( monitoredDirs.at( i ).startsWith( monitoredDirs.at( j ) ) )
                 {
@@ -271,11 +271,11 @@ void MLConfDialog::save()
         }
     }
 
-    for( int i = 0; i < toDelete.size(); i++ )
+    for( int i = 0; i < toDelete.count(); i++ )
     {
         ml_Control( p_ml, ML_DEL_MONITORED, qtu( toDelete.at( i ) ) );
     }
-    for( int i = 0; i < newDirs.size(); i++ )
+    for( int i = 0; i < newDirs.count(); i++ )
     {
         ml_Control( p_ml, ML_ADD_MONITORED, qtu( newDirs.at( i ) ) );
     }
index 4cc1c7b33d4d1fa792ce6285d2fed699627aa4e8..9e5fe59faf7ac873be7207011b89df1edc6536a0 100644 (file)
@@ -198,7 +198,7 @@ OpenDialog::~OpenDialog()
 /* Used by VLM dialog and inputSlave selection */
 QString OpenDialog::getMRL( bool b_all )
 {
-    if( itemsMRL.size() == 0 ) return "";
+    if( itemsMRL.count() == 0 ) return "";
     return b_all ? itemsMRL[0] + ui.advancedLineInput->text()
                  : itemsMRL[0];
 }
@@ -359,7 +359,7 @@ void OpenDialog::finish( bool b_enqueue = false )
     itemsMRL.sort();
 
     /* Go through the item list */
-    for( int i = 0; i < itemsMRL.size(); i++ )
+    for( int i = 0; i < itemsMRL.count(); i++ )
     {
         bool b_start = !i && !b_enqueue;
 
@@ -374,7 +374,7 @@ void OpenDialog::finish( bool b_enqueue = false )
             QStringList optionsList = ui.advancedLineInput->text().split( " :" );
 
             /* Insert options */
-            for( int j = 0; j < optionsList.size(); j++ )
+            for( int j = 0; j < optionsList.count(); j++ )
             {
                 QString qs = colon_unescape( optionsList[j] );
                 if( !qs.isEmpty() )
@@ -461,10 +461,10 @@ QStringList OpenDialog::SeparateEntries( const QString& entries )
     QString entry;
 
     int index = 0;
-    while( index < entries.size() )
+    while( index < entries.count() )
     {
         int delim_pos = entries.indexOf( QRegExp( "\\s+|\"" ), index );
-        if( delim_pos < 0 ) delim_pos = entries.size() - 1;
+        if( delim_pos < 0 ) delim_pos = entries.count() - 1;
         entry += entries.mid( index, delim_pos - index + 1 );
         index = delim_pos + 1;
 
@@ -473,22 +473,22 @@ QStringList OpenDialog::SeparateEntries( const QString& entries )
         if( !b_quotes_mode && entry.endsWith( "\"" ) )
         {
             /* Enters quotes mode */
-            entry.truncate( entry.size() - 1 );
+            entry.truncate( entry.count() - 1 );
             b_quotes_mode = true;
         }
         else if( b_quotes_mode && entry.endsWith( "\"" ) )
         {
             /* Finished the quotes mode */
-            entry.truncate( entry.size() - 1 );
+            entry.truncate( entry.count() - 1 );
             b_quotes_mode = false;
         }
         else if( !b_quotes_mode && !entry.endsWith( "\"" ) )
         {
             /* we found a non-quoted standalone string */
-            if( index < entries.size() ||
+            if( index < entries.count() ||
                 entry.endsWith( " " ) || entry.endsWith( "\t" ) ||
                 entry.endsWith( "\r" ) || entry.endsWith( "\n" ) )
-                entry.truncate( entry.size() - 1 );
+                entry.truncate( entry.count() - 1 );
             if( !entry.isEmpty() ) entries_array.append( entry );
             entry.clear();
         }
index 2e99fb7048143c118d773c9b6ab24277d2736b3f..906fe3c04ddad57476081344305f141821437180 100644 (file)
@@ -380,7 +380,7 @@ QModelIndex ExtensionListModel::index( int row, int column,
 {
     if( column != 0 )
         return QModelIndex();
-    if( row < 0 || row >= extensions.size() )
+    if( row < 0 || row >= extensions.count() )
         return QModelIndex();
 
     return createIndex( row, 0, extensions.at( row ) );
index 44f3f77c439c1354b96096eaab827daf989d51fd..02ba86de2f7113c4e55b9a3646766bc32703c4c3 100644 (file)
@@ -186,7 +186,7 @@ void VLMDialog::selectVLMItem( int i )
 
 bool VLMDialog::isNameGenuine( const QString& name )
 {
-    for( int i = 0; i < vlmItems.size(); i++ )
+    for( int i = 0; i < vlmItems.count(); i++ )
     {
         if( vlmItems.at( i )->name == name )
             return false;
@@ -196,7 +196,7 @@ bool VLMDialog::isNameGenuine( const QString& name )
 
 void VLMDialog::addVLMItem()
 {
-    int vlmItemCount = vlmItems.size();
+    int vlmItemCount = vlmItems.count();
 
     /* Take the name and Check it */
     QString name = ui.nameLedit->text();
@@ -295,7 +295,7 @@ void VLMDialog::mediasPopulator()
         for( int i = 0; i < i_nMedias; i++ )
         {
             VLMAWidget * vlmAwidget;
-            vlmItemCount = vlmItems.size();
+            vlmItemCount = vlmItems.count();
 
             QString mediaName = qfu( (*ppp_dsc)[i]->psz_name );
             /* It may have several inputs, we take the first one by default
@@ -694,7 +694,7 @@ void VLMWrapper::EditBroadcast( const QString& name, const QString& input,
         vlm_MessageDelete( message );
 
         QStringList options = inputOptions.split( " :", QString::SkipEmptyParts );
-        for( int i = 0; i < options.size(); i++ )
+        for( int i = 0; i < options.count(); i++ )
         {
             command = "setup \"" + name + "\" option \"" + options[i].trimmed() + "\"";
             vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
@@ -781,7 +781,7 @@ void VLMWrapper::EditVod( const QString& name, const QString& input,
         vlm_MessageDelete( message );
 
         QStringList options = inputOptions.split( " :", QString::SkipEmptyParts );
-        for( int i = 0; i < options.size(); i++ )
+        for( int i = 0; i < options.count(); i++ )
         {
             command = "setup \"" + name + "\" option \"" + options[i].trimmed() + "\"";
             vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
@@ -840,7 +840,7 @@ void VLMWrapper::EditSchedule( const QString& name, const QString& input,
         vlm_MessageDelete( message );
 
         QStringList options = inputOptions.split( " :", QString::SkipEmptyParts );
-        for( int i = 0; i < options.size(); i++ )
+        for( int i = 0; i < options.count(); i++ )
         {
             command = "setup \"" + name + "\" option \"" + options[i].trimmed() + "\"";
             vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
index 5cad0869128a4f7ce42dad9e7d1928fe3eb648bf..7be9a63b5c887009bec4b7bc07f5848d0bd439c9 100644 (file)
@@ -640,7 +640,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
         p_input = input_item_New( qtu( mrl ), _("Streaming") );
 
         /* Add normal Options */
-        for( int j = 0; j < options.size(); j++ )
+        for( int j = 0; j < options.count(); j++ )
         {
             QString qs = colon_unescape( options[j] );
             if( !qs.isEmpty() )
index a45bf4d91ba42b10e81b561f72be57f7881761c9..d9bd7ea20fa0379fac805e1aac6ccc569db296a6 100644 (file)
@@ -1160,7 +1160,7 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
     const QMimeData *mimeData = event->mimeData();
 
     /* D&D of a subtitles file, add it on the fly */
-    if( mimeData->urls().size() == 1 && THEMIM->getIM()->hasInput() )
+    if( mimeData->urls().count() == 1 && THEMIM->getIM()->hasInput() )
     {
         if( !input_AddSubtitle( THEMIM->getInput(),
                  qtu( toNativeSeparators( mimeData->urls()[0].toLocalFile() ) ),
index e3de67b8211afd6de0e2c47b64c29730d6e4a6ad..0ce2c2efba03421ce7c8d75c75d638a0ff9231a3 100644 (file)
@@ -154,7 +154,7 @@ void EnableStaticEntries( QMenu *menu, bool enable = true )
     if( !menu ) return;
 
     QList< QAction* > actions = menu->actions();
-    for( int i = 0; i < actions.size(); ++i )
+    for( int i = 0; i < actions.count(); ++i )
     {
         actions[i]->setEnabled( actions[i]->data().toString()
                                 == ENTRY_ALWAYS_ENABLED ||
@@ -173,7 +173,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
     int i_ret = 0;
 
     QList< QAction* > actions = menu->actions();
-    for( int i = 0; i < actions.size(); ++i )
+    for( int i = 0; i < actions.count(); ++i )
     {
         if( actions[i]->data().toString() != STATIC_ENTRY )
             delete actions[i];
@@ -189,7 +189,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
 static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
 {
     QList< QAction* > actions = menu->actions();
-    for( int i = 0; i < actions.size(); ++i )
+    for( int i = 0; i < actions.count(); ++i )
     {
         if( actions[i]->data().toString() == psz_var )
             return actions[i];
@@ -1113,7 +1113,7 @@ QMenu * QVLCMenu::Populate( intf_thread_t *p_intf,
 
     currentGroup = NULL;
 
-    for( int i = 0; i < (int)objects.size() ; i++ )
+    for( int i = 0; i < (int)objects.count() ; i++ )
     {
         if( !varnames[i] || !*varnames[i] )
         {
@@ -1478,14 +1478,14 @@ void QVLCMenu::updateRecents( intf_thread_t *p_intf )
 
         recentsMenu->clear();
 
-        if( !l.size() )
+        if( !l.count() )
         {
             action = recentsMenu->addAction( qtr(" - Empty - ") );
             action->setEnabled( false );
         }
         else
         {
-            for( int i = 0; i < l.size(); ++i )
+            for( int i = 0; i < l.count(); ++i )
             {
                 char *psz_temp = decode_URI_duplicate( qtu( l.at( i ) ) );
 
index 5112c99f7f0d09efb9d7c36a8067b4707bfbaad7..a0bcd43bdd76bdc4557059197a70ba2f1788ccc0 100644 (file)
@@ -100,7 +100,7 @@ void RecentsMRL::addRecent( const QString &mrl )
     else
     {
         stack->prepend( mrl );
-        if( stack->size() > RECENTS_LIST_SIZE )
+        if( stack->count() > RECENTS_LIST_SIZE )
             stack->takeLast();
     }
     QVLCMenu::updateRecents( p_intf );
@@ -128,7 +128,7 @@ void RecentsMRL::load()
     QStringList list = getSettings()->value( "RecentsMRL/list" ).toStringList();
 
     /* And filter the regexp on the list */
-    for( int i = 0; i < list.size(); ++i )
+    for( int i = 0; i < list.count(); ++i )
     {
         if ( !filter || filter->indexIn( list.at(i) ) == -1 )
             stack->append( list.at(i) );
index 12f99319257ec6f0fade5c1e7f5538982a667735..dd40e46814728d3825bc5bfc30dd6e46c525c7c6 100644 (file)
@@ -327,7 +327,7 @@ void AnimatedIcon::addFrame( const QPixmap &pxm, int index )
         return;
     }
     QPixmap *copy = new QPixmap( pxm );
-    mFrames.insert( ( index < 0 || index > mFrames.size() ) ? mFrames.size() :
+    mFrames.insert( ( index < 0 || index > mFrames.count() ) ? mFrames.count() :
                     index, copy );
     if( !pixmap() )
         setPixmap( *copy );
@@ -374,7 +374,7 @@ void AnimatedIcon::play( int loops, int interval )
 void AnimatedIcon::onTimerTick()
 {
     //assert( !mFrames.empty() );
-    if( ++mCurrentFrame > mFrames.size() )
+    if( ++mCurrentFrame > mFrames.count() )
     {
         if( mRemainingLoops != -1 )
         {
@@ -387,7 +387,7 @@ void AnimatedIcon::onTimerTick()
         }
         mCurrentFrame = 1;
     }
-    //assert( mCurrentFrame >= 1 && mCurrentFrame <= mFrames.size() );
+    //assert( mCurrentFrame >= 1 && mCurrentFrame <= mFrames.count() );
     setPixmap( *mFrames.at( mCurrentFrame - 1 ) );
 }
 
index 1c54a15d4eba3c8ca860b8ad297f62906ba445a1..5e2268c193ba58bd8a4387f509c5a7a116fe8a1e 100644 (file)
@@ -504,8 +504,8 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step, bool b_hard,
     free( psz_colors );
 
     /* Fill with 255 if the list is too short */
-    if( colorList.size() < 12 )
-        for( int i = colorList.size(); i < 12; i++)
+    if( colorList.count() < 12 )
+        for( int i = colorList.count(); i < 12; i++)
             colorList.append( "255" );
 
     /* Regular colors */