[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [Amarok] 65b1b9e: Correctly use mapToSource when getting mime data f
From: Nikolaj Hald Nielsen <nhn () kde ! org>
Date: 2010-03-15 8:30:02
Message-ID: 201003150830.o2F8U2o4032403 () kore ! kollide ! net
[Download RAW message or body]
commit 65b1b9e2044a87fb8bedd03b73628bbe07258045
Author: Nikolaj Hald Nielsen <nhn@kde.org>
Date: Mon Mar 15 09:29:40 2010 +0100
Correctly use mapToSource when getting mime data from a Playlist proxy model.
This fixes the issues with the wrong track getting added to a stored playlist or \
dragged to an external app when sorting and/or filtering is active. ~lart Teo' for \
not fixing this _very_ obvious TODO ~lart nhn for not noticing and lart'ing Teo' \
sooner.
BUG: 226503
diff --git a/src/playlist/proxymodels/ProxyBase.cpp \
b/src/playlist/proxymodels/ProxyBase.cpp index 2e182ac..9fb933c 100644
--- a/src/playlist/proxymodels/ProxyBase.cpp
+++ b/src/playlist/proxymodels/ProxyBase.cpp
@@ -198,7 +198,15 @@ ProxyBase::idAt( const int row ) const
QMimeData *
ProxyBase::mimeData( const QModelIndexList &indexes ) const
{
- return m_belowModel->mimeData( indexes ); //TODO: probably needs mapToSource!
+
+ QModelIndexList sourceIndexes;
+ foreach( QModelIndex index, indexes )
+ {
+ sourceIndexes << mapToSource( index );
+ }
+
+ return m_belowModel->mimeData( sourceIndexes );
+
}
QStringList
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic