aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/scrobbler/scrobblercache.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-08-12 21:03:34 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-08-12 21:03:34 +0000
commit7ef8d11baeaf1847ba7f1df5d858f8cffea9300d (patch)
treea741fb49db8834efd4b46d760b89082547eb2a9d /src/plugins/General/scrobbler/scrobblercache.cpp
parent6f301f5880f7efce76ed46e7b502830642b87370 (diff)
downloadqmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.gz
qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.bz2
qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.zip
coding style fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9470 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/scrobbler/scrobblercache.cpp')
-rw-r--r--src/plugins/General/scrobbler/scrobblercache.cpp15
1 files changed, 6 insertions, 9 deletions
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<SongInfo> ListenCache::load()
{
QList<SongInfo> songs;
- int s = 0;
- QString line, param, value;
QFile file(m_filePath);
if(!file.open(QIODevice::ReadOnly))
@@ -78,12 +74,13 @@ QList<SongInfo> 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")
{