aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/scrobbler/scrobblercache.cpp
diff options
context:
space:
mode:
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")
{