[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/amarok/amarok
From: Christian Muehlhaeuser <chris () chris ! de>
Date: 2003-11-29 20:12:07
[Download RAW message or body]
CVS commit by muesli:
After removing playlist entries, searching caused a crash since I forgot to
remove the according linklist entries. Fixed.
M +4 -1 browserwin.cpp 1.28
M +13 -0 playlistwidget.cpp 1.41
M +2 -1 playlistwidget.h 1.15
--- kdenonbeta/amarok/amarok/browserwin.cpp #1.27:1.28
@@ -289,5 +289,8 @@ void BrowserWin::slotBrowserDrop()
if ( item1->isSelected() )
- delete item1;
+ {
+ PlaylistItem *pItem = static_cast<PlaylistItem*>( item1 );
+ m_pPlaylistWidget->removeItem(pItem);
+ }
}
--- kdenonbeta/amarok/amarok/playlistwidget.cpp #1.40:1.41
@@ -353,4 +353,17 @@ PlaylistItem* PlaylistWidget::addItem( P
+void PlaylistWidget::removeItem( PlaylistItem *item )
+{
+ int x;
+ if ((x = searchPtrs.find(item)))
+ {
+ searchTokens.remove(searchTokens.at(x));
+ searchPtrs.remove(searchPtrs.at(x));
+ }
+
+ delete item;
+}
+
+
bool PlaylistWidget::loadPlaylist( KURL url, QListViewItem *destination )
{
--- kdenonbeta/amarok/amarok/playlistwidget.h #1.14:1.15
@@ -63,4 +63,5 @@ class PlaylistWidget : public KListView
void triggerSignalPlay();
PlaylistItem* addItem( PlaylistItem *after, KURL url );
+ void removeItem( PlaylistItem *item );
void contentsDropEvent( QDropEvent* e);
bool loadPlaylist( KURL url, QListViewItem *destination );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic