[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src
From:       Gábor Lehel <illissius () gmail ! com>
Date:       2005-08-31 11:28:02
Message-ID: 1125487682.254819.1823.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 455392 by illissius:

speedup


 M  +6 -8      playlistloader.cpp  


--- trunk/extragear/multimedia/amarok/src/playlistloader.cpp #455391:455392
@@ -353,23 +353,21 @@
 
     const PLItemList oldQueue = Playlist::instance()->m_nextTracks;
     NodeList nodes;
-    TagsEvent *e = new TagsEvent;
+    TagsEvent e;
     const QString ITEM( "item" ); //so we don't construct this QString all the time
     for( QDomNode n = d.namedItem( "playlist" ).firstChild(); !n.isNull(); n = n.nextSibling() )
     {
         if( n.nodeName() != ITEM ) continue;
 
         if( !n.toElement().isNull() )
-            e->nodes += n;
+            e.nodes += n;
 
-        if( e->nodes.count() == OPTIMUM_BUNDLE_COUNT ) {
-            QApplication::sendEvent( this, e );
-            delete e;
-            e = new TagsEvent;
+        if( e.nodes.count() == OPTIMUM_BUNDLE_COUNT ) {
+            QApplication::sendEvent( this, &e );
+            e = TagsEvent();
         }
     }
-    QApplication::sendEvent( this, e );
-    delete e;
+    QApplication::sendEvent( this, &e );
 
     const PLItemList &newQueue = Playlist::instance()->m_nextTracks;
     QPtrListIterator<PlaylistItem> it( newQueue );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic