summaryrefslogtreecommitdiffstats
path: root/src/library/basesqltablemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/basesqltablemodel.cpp')
-rw-r--r--src/library/basesqltablemodel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/library/basesqltablemodel.cpp b/src/library/basesqltablemodel.cpp
index 177c045203..bea29d4dd3 100644
--- a/src/library/basesqltablemodel.cpp
+++ b/src/library/basesqltablemodel.cpp
@@ -943,16 +943,20 @@ TrackPointer BaseSqlTableModel::getTrack(const QModelIndex& index) const {
return m_pTrackCollectionManager->internalCollection()->getTrackById(getTrackId(index));
}
+TrackPointer BaseSqlTableModel::getTrackByRef(
+ const TrackRef& trackRef) const {
+ return m_pTrackCollectionManager->internalCollection()->getTrackByRef(trackRef);
+}
+
QString BaseSqlTableModel::getTrackLocation(const QModelIndex& index) const {
if (!index.isValid()) {
- return "";
+ return QString();
}
QString nativeLocation =
index.sibling(index.row(),
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION))
.data().toString();
- QString location = QDir::fromNativeSeparators(nativeLocation);
- return location;
+ return QDir::fromNativeSeparators(nativeLocation);
}
void BaseSqlTableModel::trackLoaded(QString group, TrackPointer pTrack) {