From 5491273f86cdd30017148f0d26578c3f409a79ba Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Wed, 15 Oct 2008 18:37:26 +0000 Subject: Don't export includes unless needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18815 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/base/autodetection.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'rbutil/rbutilqt/base/autodetection.cpp') diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp index 67e95b998d..2a82bf319f 100644 --- a/rbutil/rbutilqt/base/autodetection.cpp +++ b/rbutil/rbutilqt/base/autodetection.cpp @@ -20,6 +20,9 @@ #include #include "autodetection.h" +#include "../ipodpatcher/ipodpatcher.h" +#include "../sansapatcher/sansapatcher.h" + #if defined(Q_OS_LINUX) || defined(Q_OS_MACX) #include #include @@ -47,7 +50,6 @@ Autodetection::Autodetection(QObject* parent): QObject(parent) { - } bool Autodetection::detect() @@ -190,7 +192,8 @@ bool Autodetection::detect() free(sansa_sectorbuf); sansa_sectorbuf = NULL; - if(m_mountpoint.isEmpty() && m_device.isEmpty() && m_errdev.isEmpty() && m_incompat.isEmpty()) + if(m_mountpoint.isEmpty() && m_device.isEmpty() + && m_errdev.isEmpty() && m_incompat.isEmpty()) return false; return true; } @@ -362,17 +365,17 @@ bool Autodetection::detectAjbrec(QString root) qDebug() << "file len:" << f.size(); if((f.size() - 6) == len) m_device = "recorder"; - + // size didn't match, now we need to assume we have a headerlength of 24. switch(header[11]) { case 2: m_device = "recorderv2"; break; - + case 4: m_device = "fmrecorder"; break; - + case 8: m_device = "ondiofm"; break; @@ -385,7 +388,8 @@ bool Autodetection::detectAjbrec(QString root) break; } f.close(); - + if(m_device.isEmpty()) return false; return true; } + -- cgit v1.2.3