From 908de607e2f3de2fd50517a9752cf66bddd16582 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 2 Feb 2015 11:09:14 +0000 Subject: using one formatter for all tracks git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4712 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlisttrack.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/qmmpui/playlisttrack.cpp') diff --git a/src/qmmpui/playlisttrack.cpp b/src/qmmpui/playlisttrack.cpp index 756dfcaab..b9262c72b 100644 --- a/src/qmmpui/playlisttrack.cpp +++ b/src/qmmpui/playlisttrack.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -17,9 +17,9 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include + #include -#include "metadataformatter.h" +#include #include "qmmpuisettings.h" #include "playlisttrack.h" @@ -166,8 +166,7 @@ const QString PlayListTrack::url() const void PlayListTrack::formatTitle() { - MetaDataFormatter f(m_settings->titleFormat()); - m_formattedTitle = f.format(this); + m_formattedTitle = m_settings->titleFormatter()->format(this); if (m_formattedTitle.isEmpty()) m_formattedTitle = value(Qmmp::URL).section('/',-1); if (m_formattedTitle.isEmpty()) @@ -185,8 +184,7 @@ void PlayListTrack::formatGroup() m_group = qApp->translate("PlayListTrack", "Streams"); return; } - MetaDataFormatter f(m_settings->groupFormat()); - m_group = f.format(this); + m_group = m_settings->groupFormatter()->format(this); if (m_group.isEmpty()) m_group = qApp->translate("PlayListTrack", "Empty group"); if (m_settings->convertUnderscore()) -- cgit v1.2.3-13-gbd6f