From c7c9a0f069978135a5cf98e68d2c19586905720c Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 20 Mar 2022 20:14:21 +0100 Subject: [PATCH] rbutil: Minor code cleanup. Change-Id: Ia1b05747e64b2122cfe17ee0c2f7bf5477f3ba09 --- utils/rbutilqt/base/autodetection.cpp | 10 ++++++---- utils/rbutilqt/base/autodetection.h | 5 ++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/utils/rbutilqt/base/autodetection.cpp b/utils/rbutilqt/base/autodetection.cpp index 341f219c30..5021e1b3cc 100644 --- a/utils/rbutilqt/base/autodetection.cpp +++ b/utils/rbutilqt/base/autodetection.cpp @@ -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--) { diff --git a/utils/rbutilqt/base/autodetection.h b/utils/rbutilqt/base/autodetection.h index cdbb94d303..183f240bd0 100644 --- a/utils/rbutilqt/base/autodetection.h +++ b/utils/rbutilqt/base/autodetection.h @@ -55,12 +55,11 @@ public: QList 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 m_detected;