From 7ef8d11baeaf1847ba7f1df5d858f8cffea9300d Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 12 Aug 2020 21:03:34 +0000 Subject: coding style fixes git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9470 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/scrobbler/scrobblercache.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/plugins/General/scrobbler/scrobblercache.cpp') diff --git a/src/plugins/General/scrobbler/scrobblercache.cpp b/src/plugins/General/scrobbler/scrobblercache.cpp index f9ed95ed8..df405a51d 100644 --- a/src/plugins/General/scrobbler/scrobblercache.cpp +++ b/src/plugins/General/scrobbler/scrobblercache.cpp @@ -61,16 +61,12 @@ uint SongInfo::timeStamp() const return m_start_ts; } -ListenCache::ListenCache(const QString &filePath) -{ - m_filePath = filePath; -} +ListenCache::ListenCache(const QString &filePath) : m_filePath(filePath) +{} QList ListenCache::load() { QList songs; - int s = 0; - QString line, param, value; QFile file(m_filePath); if(!file.open(QIODevice::ReadOnly)) @@ -78,12 +74,13 @@ QList ListenCache::load() while (!file.atEnd()) { - line = QString::fromUtf8(file.readLine()).trimmed(); + int s; + QString line = QString::fromUtf8(file.readLine()).trimmed(); if ((s = line.indexOf("=")) < 0) continue; - param = line.left(s); - value = line.right(line.size() - s - 1); + QString param = line.left(s); + QString value = line.right(line.size() - s - 1); if (param == "title") { -- cgit v1.2.3-13-gbd6f