[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src
From: Nikolaj Hald Nielsen <nhnFreespirit () gmail ! com>
Date: 2009-07-18 12:45:11
Message-ID: 1247921111.495037.778.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 998734 by nhnielsen:
Add a ton of debug to try to track down a strange issue with the "copy to collection" \
action of the audio cd only triggereing some times and not consistently. Also add a \
potential fix that however does not make a lot of sense to me...
M +8 -0 browsers/CollectionTreeView.cpp
M +10 -0 collection/CollectionLocation.cpp
--- trunk/extragear/multimedia/amarok/src/browsers/CollectionTreeView.cpp \
#998733:998734 @@ -689,18 +689,23 @@
DEBUG_BLOCK
if( !destination->isWritable() )
{
+ warning() << "collection " << destination->prettyName() << " is not \
writable! Aborting"; return;
}
//copied from organizeTracks. create a method for this somewhere
if( !items.count() )
{
+ warning() << "No items to copy! Aborting";
return;
}
//Create query based upon items, ensuring that if a parent and child are both \
selected we ignore the child QueryMaker *qm = createMetaQueryFromItems( items, true \
); if( !qm )
+ {
+ warning() << "could not get qm!";
return;
+ }
CollectionTreeItem *item = items.toList().first();
while( item->isDataItem() )
@@ -720,10 +725,13 @@
delete qm;
return;
}
+
+ debug() << "starting source->prepareMove";
source->prepareMove( qm, dest );
}
else
{
+ debug() << "starting source->prepareCopy";
source->prepareCopy( qm, dest );
}
}
--- trunk/extragear/multimedia/amarok/src/collection/CollectionLocation.cpp \
#998733:998734 @@ -106,6 +106,7 @@
void
CollectionLocation::prepareCopy( QueryMaker *qm, CollectionLocation *destination )
{
+ DEBUG_BLOCK
if( !destination->isWritable() )
{
destination->deleteLater();
@@ -115,6 +116,7 @@
}
m_destination = destination;
m_removeSources = false;
+ m_isRemoveAction = false;
connect( qm, SIGNAL( newResultReady( QString, Meta::TrackList ) ), SLOT( \
resultReady( QString, Meta::TrackList ) ) ); connect( qm, SIGNAL( queryDone() ), \
SLOT( queryDone() ) ); qm->setQueryType( QueryMaker::Track );
@@ -154,6 +156,7 @@
return;
}
m_destination = destination;
+ m_isRemoveAction = false;
m_removeSources = true;
connect( qm, SIGNAL( newResultReady( QString, Meta::TrackList ) ), SLOT( \
resultReady( QString, Meta::TrackList ) ) ); connect( qm, SIGNAL( queryDone() ), \
SLOT( queryDone() ) ); @@ -185,6 +188,7 @@
}
m_isRemoveAction = true;
+ m_removeSources = false;
connect( qm, SIGNAL( newResultReady( QString, Meta::TrackList ) ), SLOT( \
resultReady( QString, Meta::TrackList ) ) ); connect( qm, SIGNAL( queryDone() ), \
SLOT( queryDone() ) ); @@ -386,6 +390,7 @@
void
CollectionLocation::resultReady( const QString &collectionId, const Meta::TrackList \
&tracks ) {
+ DEBUG_BLOCK
Q_UNUSED( collectionId )
m_sourceTracks << tracks;
}
@@ -393,6 +398,7 @@
void
CollectionLocation::queryDone()
{
+ DEBUG_BLOCK
QObject *obj = sender();
if( obj )
{
@@ -400,14 +406,17 @@
}
if( m_isRemoveAction )
{
+ debug() << "we were about to remove something, lets proceed";
prepareRemove( m_sourceTracks );
}
else if( m_removeSources )
{
+ debug() << "we were about to move something, lets proceed";
prepareMove( m_sourceTracks, m_destination );
}
else
{
+ debug() << "we were about to copy something, lets proceed";
prepareCopy( m_sourceTracks, m_destination );
}
}
@@ -438,6 +447,7 @@
void
CollectionLocation::startWorkflow( const Meta::TrackList &tracks, bool removeSources \
) {
+ DEBUG_BLOCK
m_removeSources = removeSources;
m_sourceTracks = tracks;
setupConnections();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic