diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-02-19 12:06:44 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-02-19 14:12:22 +0100 |
commit | a56f4425c6095073bb4e3c9f3970fd3a68b73f4c (patch) | |
tree | 892384a957c6c411fbba0960e20452c7f9bc9961 /rbutil | |
parent | f81100efd2b0f0281e8c78f195720ad8fa61dde1 (diff) |
Allow overriding filename for rockbox-info.txt.
This allows testing the class by using temporary files without the need of
constructing a special path.
Change-Id: Id5ccd37f05219f246b9bf9f8a26ec81342654f89
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/base/rockboxinfo.cpp | 6 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/rockboxinfo.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/rockboxinfo.cpp b/rbutil/rbutilqt/base/rockboxinfo.cpp index b595bbea8a..2f56a291c5 100644 --- a/rbutil/rbutilqt/base/rockboxinfo.cpp +++ b/rbutil/rbutilqt/base/rockboxinfo.cpp @@ -21,10 +21,10 @@ #include <QtCore> #include <QDebug> -RockboxInfo::RockboxInfo(QString mountpoint) +RockboxInfo::RockboxInfo(QString mountpoint, QString fname) { - qDebug() << "[RockboxInfo] trying to find rockbox-info at" << mountpoint; - QFile file(mountpoint + "/.rockbox/rockbox-info.txt"); + qDebug() << "[RockboxInfo] Getting version info from rockbox-info.txt"; + QFile file(mountpoint + "/" + fname); m_success = false; if(!file.exists()) return; diff --git a/rbutil/rbutilqt/base/rockboxinfo.h b/rbutil/rbutilqt/base/rockboxinfo.h index 6a22163ddf..9ea6e2011f 100644 --- a/rbutil/rbutilqt/base/rockboxinfo.h +++ b/rbutil/rbutilqt/base/rockboxinfo.h @@ -27,7 +27,7 @@ class RockboxInfo { public: - RockboxInfo(QString mountpoint); + RockboxInfo(QString mountpoint, QString fname = "/.rockbox/rockbox-info.txt"); QString version() {return m_version;} QString features(){return m_features;} |