diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2022-03-20 20:14:21 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2022-03-20 20:14:21 +0100 |
commit | c7c9a0f069978135a5cf98e68d2c19586905720c (patch) | |
tree | 254a59c6b09cae4f6a76ffc20a164cb09a653eda | |
parent | 04e22d8719dabb33de38eea5cdf4199d147b7b28 (diff) | |
download | rockbox-c7c9a0f069.tar.gz rockbox-c7c9a0f069.zip |
rbutil: Minor code cleanup.
Change-Id: Ia1b05747e64b2122cfe17ee0c2f7bf5477f3ba09
-rw-r--r-- | utils/rbutilqt/base/autodetection.cpp | 10 | ||||
-rw-r--r-- | 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<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; |