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

List:       kde-commits
Subject:    extragear/multimedia/amarok/src/dialogs
From:       Alejandro Daniel Wainzinger <aikawarazuni () gmail ! com>
Date:       2008-07-11 8:21:34
Message-ID: 1215764494.396523.5442.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 830783 by awainzinger:

TagDialog is doing a double-delete when, after editing a tag, the TreeView isn't \
updated and a second TagDialog instance tries to edit tags to an artist/album/track \
no longer there.  Now checking for m_tracks not being empty before double-deleting.  \
This is a hack to avoid the crash.  This should _not_ be happening.


 M  +17 -1     TagDialog.cpp  


--- trunk/extragear/multimedia/amarok/src/dialogs/TagDialog.cpp #830782:830783
@@ -131,7 +131,17 @@
     DEBUG_BLOCK
 
     Amarok::config( "TagDialog" ).writeEntry( "CurrentTab", \
                ui->kTabWidget->currentIndex() );
-    delete m_labelCloud;
+
+    // NOTE: temporary crash prevention.  TreeView should _always_ be updated
+    // if tags have changed.
+
+    if ( !m_tracks.isEmpty() )
+    {
+        delete m_labelCloud;
+    }
+    else
+        debug() << "Empty tracklist?  Must mean TreeView hasn't been updated!";
+
     delete ui;
 }
 
@@ -149,8 +159,14 @@
 void
 TagDialog::resultReady( const QString &collectionId, const Meta::TrackList &tracks )
 {
+    DEBUG_BLOCK
     Q_UNUSED( collectionId )
     m_tracks << tracks;
+    foreach( Meta::TrackPtr d_track, tracks )
+        {
+            if ( d_track )
+                debug() << "Artist is: " << d_track->artist()->name();
+        }
 }
 
 void


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

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