From 96cfa27dc27e4dc81385df243215fd516b043673 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 2 Feb 2015 14:57:42 +0000 Subject: reduced number of template compilation git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4716 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Ui/skinned/popupwidget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/plugins/Ui/skinned/popupwidget.cpp') diff --git a/src/plugins/Ui/skinned/popupwidget.cpp b/src/plugins/Ui/skinned/popupwidget.cpp index 63cfc7142..daaa383c0 100644 --- a/src/plugins/Ui/skinned/popupwidget.cpp +++ b/src/plugins/Ui/skinned/popupwidget.cpp @@ -53,6 +53,7 @@ PopupWidget::PopupWidget(QWidget *parent) setWindowOpacity(settings.value("popup_opacity", 1.0).toDouble()); m_coverSize = settings.value("popup_cover_size", 48).toInt(); m_template = settings.value("popup_template",DEFAULT_TEMPLATE).toString(); + m_formatter.setPattern(m_template); int delay = settings.value("popup_delay", 2500).toInt(); bool show_cover = settings.value("popup_show_cover",true).toBool(); settings.endGroup(); @@ -93,10 +94,7 @@ void PopupWidget::prepare(PlayListTrack *item, QPoint pos) return; } - QString title = m_template; - MetaDataFormatter f(title); - title = f.format(item); - m_label1->setText(title); + m_label1->setText(m_formatter.format(item)); qApp->processEvents(); updateGeometry (); resize(sizeHint()); -- cgit v1.2.3-13-gbd6f