diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2020-05-21 10:19:07 +0200 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2020-05-21 10:32:09 +0200 |
commit | 4a8a9f58323115a1860e6ea77819bcd9396b8e09 (patch) | |
tree | dd7700b0088d30f36a050e57da80da5c1927181c /src/track | |
parent | 5264547b755e41049f5ae1adc494bd527f2ddf65 (diff) |
Define artist/title separator for track info as constant
Diffstat (limited to 'src/track')
-rw-r--r-- | src/track/track.cpp | 9 | ||||
-rw-r--r-- | src/track/track.h | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/track/track.cpp b/src/track/track.cpp index 24781b18df..546c1e41a4 100644 --- a/src/track/track.cpp +++ b/src/track/track.cpp @@ -57,6 +57,13 @@ inline mixxx::Bpm getActualBpm( } // anonymous namespace +// Don't change this string without an entry in the CHANGELOG! +// Otherwise 3rd party software that picks up the currently +// playing track from the main window and relies on this +// formatting would stop working. +//static +const QString Track::kArtistTitleSeparator = QStringLiteral(" - "); + Track::Track( TrackFile fileInfo, SecurityTokenPointer pSecurityToken, @@ -369,7 +376,7 @@ QString Track::getInfo() const { } } else { return m_record.getMetadata().getTrackInfo().getArtist() + - QStringLiteral(" - ") + + kArtistTitleSeparator + m_record.getMetadata().getTrackInfo().getTitle(); } } diff --git a/src/track/track.h b/src/track/track.h index 7d7c0c6ba7..1047b6e4a9 100644 --- a/src/track/track.h +++ b/src/track/track.h @@ -235,7 +235,12 @@ class Track : public QObject { // Set URL for track void setURL(const QString& url); - /// Formatted string with artist and title. + /// Separator between artist and title string that is + /// used for composing the track info. + static const QString kArtistTitleSeparator; + + /// Formatted string with artist and title, separated by + /// kArtistTitleSeparator. QString getInfo() const; /// The filename if BOTH artist AND title are empty, e.g. for tracks without |