aboutsummaryrefslogtreecommitdiffstats
path: root/CollectionModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CollectionModel.cpp')
-rw-r--r--CollectionModel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/CollectionModel.cpp b/CollectionModel.cpp
index 2dc7f7c..dcad438 100644
--- a/CollectionModel.cpp
+++ b/CollectionModel.cpp
@@ -13,11 +13,12 @@
#include <QMimeData>
#include <QUrl>
-CollectionModel::CollectionModel(QList<Song*> songs, QObject* parent)
+CollectionModel::CollectionModel(QList<Song*> songs, Credentials* credentials, QObject* parent)
: QAbstractItemModel(parent)
, m_songs(songs)
, m_position(-1)
, m_fakeBoldState(false)
+ , m_credentials(credentials)
{}
QVariant CollectionModel::data(const QModelIndex &index, int role) const
@@ -117,7 +118,7 @@ QMimeData* CollectionModel::mimeData(const QModelIndexList& indexes) const
Q_FOREACH(QModelIndex index, indexes)
{
if(index.column() == 1)
- urls << PlayerWindow::credentials()->songUrl(m_songs[index.row()]->sha1()).toString();
+ urls << m_credentials->songUrl(m_songs[index.row()]->sha1()).toString();
};
ret->setData("text/uri-list", urls.join("\n").toUtf8());
return ret;