1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Dominik Riebeling 2012-02-19 12:06:44 +01:00
parent f81100efd2
commit a56f4425c6
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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;}