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:
parent
f81100efd2
commit
a56f4425c6
2 changed files with 4 additions and 4 deletions
|
@ -21,10 +21,10 @@
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
RockboxInfo::RockboxInfo(QString mountpoint)
|
RockboxInfo::RockboxInfo(QString mountpoint, QString fname)
|
||||||
{
|
{
|
||||||
qDebug() << "[RockboxInfo] trying to find rockbox-info at" << mountpoint;
|
qDebug() << "[RockboxInfo] Getting version info from rockbox-info.txt";
|
||||||
QFile file(mountpoint + "/.rockbox/rockbox-info.txt");
|
QFile file(mountpoint + "/" + fname);
|
||||||
m_success = false;
|
m_success = false;
|
||||||
if(!file.exists())
|
if(!file.exists())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
class RockboxInfo
|
class RockboxInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RockboxInfo(QString mountpoint);
|
RockboxInfo(QString mountpoint, QString fname = "/.rockbox/rockbox-info.txt");
|
||||||
|
|
||||||
QString version() {return m_version;}
|
QString version() {return m_version;}
|
||||||
QString features(){return m_features;}
|
QString features(){return m_features;}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue