rbutil: Minor code cleanup.

Change-Id: Ia1b05747e64b2122cfe17ee0c2f7bf5477f3ba09
This commit is contained in:
Dominik Riebeling 2022-03-20 20:14:21 +01:00
parent 04e22d8719
commit c7c9a0f069
2 changed files with 8 additions and 7 deletions

View file

@ -92,7 +92,8 @@ void Autodetection::detectUsb()
int i = attached.size();
while(i--) {
QStringList a = PlayerBuildInfo::instance()->value(PlayerBuildInfo::UsbIdTargetList, attached.at(i)).toStringList();
QStringList a = PlayerBuildInfo::instance()->value(
PlayerBuildInfo::UsbIdTargetList, attached.at(i)).toStringList();
if(a.size() > 0) {
struct Detected d;
d.status = PlayerOk;
@ -100,7 +101,8 @@ void Autodetection::detectUsb()
m_detected.append(d);
LOG_INFO() << "[USB] detected supported player" << d.usbdevices;
}
QStringList b = PlayerBuildInfo::instance()->value(PlayerBuildInfo::UsbIdErrorList, attached.at(i)).toStringList();
QStringList b = PlayerBuildInfo::instance()->value(
PlayerBuildInfo::UsbIdErrorList, attached.at(i)).toStringList();
if(b.size() > 0) {
struct Detected d;
d.status = PlayerMtpMode;
@ -310,7 +312,7 @@ void Autodetection::mergePatcher(void)
}
QString Autodetection::detectAjbrec(QString root)
QString Autodetection::detectAjbrec(const QString& root)
{
QFile f(root + "/ajbrec.ajz");
char header[24];
@ -347,7 +349,7 @@ QString Autodetection::detectAjbrec(QString root)
}
int Autodetection::findDetectedDevice(QString device)
int Autodetection::findDetectedDevice(const QString& device)
{
int i = m_detected.size();
while(i--) {

View file

@ -55,12 +55,11 @@ public:
QList<struct Detected> detected(void) { return m_detected; }
private:
QString resolveMountPoint(QString);
void detectUsb(void);
void mergeMounted(void);
void mergePatcher(void);
QString detectAjbrec(QString);
int findDetectedDevice(QString device);
QString detectAjbrec(const QString&);
int findDetectedDevice(const QString& device);
void updateDetectedDevice(struct Detected& entry);
QList<struct Detected> m_detected;