summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-08-08 12:12:49 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-08-08 12:12:49 +0000
commitbd5b744a6daa17f99a528bd62fdc45203d17233e (patch)
treeb9754a63b5033093a975c12d0b353d54a9a33c38
parentc8e39403f414814d07129f9c7dc0f0c04edbf45f (diff)
downloadrockbox-bd5b744a6daa17f99a528bd62fdc45203d17233e.tar.gz
rockbox-bd5b744a6daa17f99a528bd62fdc45203d17233e.zip
Clean up some debug output, kill some trailing spaces and break some overly long lines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22204 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/base/autodetection.cpp35
-rw-r--r--rbutil/rbutilqt/base/detect.cpp15
-rw-r--r--rbutil/rbutilqt/configure.cpp8
-rw-r--r--rbutil/rbutilqt/configure.h6
4 files changed, 37 insertions, 27 deletions
diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp
index 30651077f2..386b39057a 100644
--- a/rbutil/rbutilqt/base/autodetection.cpp
+++ b/rbutil/rbutilqt/base/autodetection.cpp
@@ -74,7 +74,7 @@ bool Autodetection::detect()
{
// do the file checking
QDir dir(mounts.at(i));
- qDebug() << "paths to check for player specific files:" << mounts;
+ qDebug() << "[Autodetect] paths to check:" << mounts;
if(dir.exists())
{
// check logfile first.
@@ -85,7 +85,7 @@ bool Autodetection::detect()
if(m_device.isEmpty())
m_device = log.value("platform").toString();
m_mountpoint = mounts.at(i);
- qDebug() << "rbutil.log detected:" << m_device << m_mountpoint;
+ qDebug() << "[Autodetect] rbutil.log detected:" << m_device << m_mountpoint;
return true;
}
}
@@ -97,12 +97,13 @@ bool Autodetection::detect()
if(m_device.isEmpty())
{
m_device = info.target();
- }
+ }
m_mountpoint = mounts.at(i);
- qDebug() << "rockbox-info.txt detected:" << m_device << m_mountpoint;
+ qDebug() << "[Autodetect] rockbox-info.txt detected:"
+ << m_device << m_mountpoint;
return true;
}
-
+
// check for some specific files in root folder
QDir root(mounts.at(i));
QStringList rootentries = root.entryList(QDir::Files);
@@ -129,10 +130,10 @@ bool Autodetection::detect()
}
if(rootentries.contains("ajbrec.ajz", Qt::CaseInsensitive))
{
- qDebug() << "ajbrec.ajz found. Trying detectAjbrec()";
+ qDebug() << "[Autodetect] ajbrec.ajz found. Trying detectAjbrec()";
if(detectAjbrec(mounts.at(i))) {
m_mountpoint = mounts.at(i);
- qDebug() << m_device;
+ qDebug() << "[Autodetect]" << m_device;
return true;
}
}
@@ -167,13 +168,13 @@ bool Autodetection::detect()
struct ipod_t ipod;
n = ipod_scan(&ipod);
if(n == 1) {
- qDebug() << "Ipod found:" << ipod.modelstr << "at" << ipod.diskname;
+ qDebug() << "[Autodetect] Ipod found:" << ipod.modelstr << "at" << ipod.diskname;
m_device = ipod.targetname;
m_mountpoint = resolveMountPoint(ipod.diskname);
return true;
}
else {
- qDebug() << "ipodpatcher: no Ipod found." << n;
+ qDebug() << "[Autodetect] ipodpatcher: no Ipod found." << n;
}
free(ipod_sectorbuf);
ipod_sectorbuf = NULL;
@@ -185,13 +186,13 @@ bool Autodetection::detect()
struct sansa_t sansa;
n = sansa_scan(&sansa);
if(n == 1) {
- qDebug() << "Sansa found:" << sansa.targetname << "at" << sansa.diskname;
+ qDebug() << "[Autodetect] Sansa found:" << sansa.targetname << "at" << sansa.diskname;
m_device = QString("sansa%1").arg(sansa.targetname);
m_mountpoint = resolveMountPoint(sansa.diskname);
return true;
}
else {
- qDebug() << "sansapatcher: no Sansa found." << n;
+ qDebug() << "[Autodetect] sansapatcher: no Sansa found." << n;
}
free(sansa_sectorbuf);
sansa_sectorbuf = NULL;
@@ -246,7 +247,7 @@ QStringList Autodetection::mountpoints()
*/
QString Autodetection::resolveMountPoint(QString device)
{
- qDebug() << "Autodetection::resolveMountPoint(QString)" << device;
+ qDebug() << "[Autodetect] resolving mountpoint:" << device;
#if defined(Q_OS_LINUX)
FILE *mn = setmntent("/etc/mtab", "r");
@@ -302,7 +303,7 @@ QString Autodetection::resolveMountPoint(QString device)
break;
}
}
- qDebug() << "Autodetection::resolveMountPoint(QString)" << "->" << result;
+ qDebug() << "[Autodetect] resolved mountpoint is:" << result;
if(!result.isEmpty())
return result + ":/";
#endif
@@ -316,7 +317,7 @@ QString Autodetection::resolveMountPoint(QString device)
*/
QString Autodetection::resolveDevicename(QString path)
{
- qDebug() << __func__;
+ qDebug() << "[Autodetect] resolving device name" << path;
#if defined(Q_OS_LINUX)
FILE *mn = setmntent("/etc/mtab", "r");
if(!mn)
@@ -377,7 +378,7 @@ QString Autodetection::resolveDevicename(QString path)
if(DeviceIoControl(h, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
NULL, 0, extents, sizeof(buffer), &written, NULL)) {
if(extents->NumberOfDiskExtents > 1) {
- qDebug() << "volume spans multiple disks!";
+ qDebug() << "[Autodetect] resolving device name: volume spans multiple disks!";
return "";
}
//qDebug() << "Disk:" << extents->Extents[0].DiskNumber;
@@ -441,8 +442,8 @@ bool Autodetection::detectAjbrec(QString root)
// recorder v1 has the binary length in the first 4 bytes, so check
// for them first.
int len = (header[0]<<24) | (header[1]<<16) | (header[2]<<8) | header[3];
- qDebug() << "possible bin length:" << len;
- qDebug() << "file len:" << f.size();
+ qDebug() << "[Autodetect] ABJREC possible bin length:" << len
+ << "file len:" << f.size();
if((f.size() - 6) == len)
m_device = "recorder";
diff --git a/rbutil/rbutilqt/base/detect.cpp b/rbutil/rbutilqt/base/detect.cpp
index 70f2de6f41..d471c98273 100644
--- a/rbutil/rbutilqt/base/detect.cpp
+++ b/rbutil/rbutilqt/base/detect.cpp
@@ -198,9 +198,7 @@ QMap<uint32_t, QString> Detect::listUsbDevices(void)
b = usb_busses;
while(b) {
- qDebug() << "bus:" << b->dirname << b->devices;
if(b->devices) {
- qDebug() << "devices present.";
struct usb_device *u;
u = b->devices;
while(u) {
@@ -214,12 +212,14 @@ QMap<uint32_t, QString> Detect::listUsbDevices(void)
dev = usb_open(u);
if(dev) {
if(u->descriptor.iManufacturer) {
- res = usb_get_string_simple(dev, u->descriptor.iManufacturer, string, sizeof(string));
+ res = usb_get_string_simple(dev, u->descriptor.iManufacturer,
+ string, sizeof(string));
if(res > 0)
name += QString::fromAscii(string) + " ";
}
if(u->descriptor.iProduct) {
- res = usb_get_string_simple(dev, u->descriptor.iProduct, string, sizeof(string));
+ res = usb_get_string_simple(dev, u->descriptor.iProduct,
+ string, sizeof(string));
if(res > 0)
name += QString::fromAscii(string);
}
@@ -227,7 +227,10 @@ QMap<uint32_t, QString> Detect::listUsbDevices(void)
usb_close(dev);
if(name.isEmpty()) name = QObject::tr("(no description available)");
- if(id) usbids.insert(id, name);
+ if(id) {
+ usbids.insert(id, name);
+ qDebug() << "[Detect] USB:" << QString("0x%1").arg(id, 8, 16) << name;
+ }
u = u->next;
}
}
@@ -300,7 +303,7 @@ QMap<uint32_t, QString> Detect::listUsbDevices(void)
uint32_t id;
id = vid << 16 | pid;
usbids.insert(id, description);
- qDebug("VID: %04x, PID: %04x", vid, pid);
+ qDebug("[Detect] USB VID: %04x, PID: %04x", vid, pid);
}
if(buffer) free(buffer);
}
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index b4c71cf32a..e32cccb00f 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -90,6 +90,7 @@ Config::Config(QWidget *parent,int index) : QDialog(parent)
setDevices();
}
+
void Config::accept()
{
qDebug() << "[Config] checking configuration";
@@ -115,7 +116,8 @@ void Config::accept()
RbSettings::setValue(RbSettings::ProxyType, proxyType);
// language
- if(RbSettings::value(RbSettings::Language).toString() != language && !language.isEmpty()) {
+ if(RbSettings::value(RbSettings::Language).toString() != language
+ && !language.isEmpty()) {
QMessageBox::information(this, tr("Language changed"),
tr("You need to restart the application for the changed language to take effect."));
RbSettings::setValue(RbSettings::Language, language);
@@ -196,6 +198,7 @@ void Config::abort()
this->close();
}
+
void Config::setUserSettings()
{
// set proxy
@@ -391,6 +394,7 @@ void Config::updateEncState()
}
}
+
void Config::setNoProxy(bool checked)
{
bool i = !checked;
@@ -519,6 +523,7 @@ void Config::browseCache()
}
+
void Config::setMountpoint(QString m)
{
ui.mountPoint->setText(m);
@@ -623,6 +628,7 @@ void Config::autodetect()
ui.treeDevices->setEnabled(true);
}
+
void Config::cacheClear()
{
if(QMessageBox::critical(this, tr("Really delete cache?"),
diff --git a/rbutil/rbutilqt/configure.h b/rbutil/rbutilqt/configure.h
index 6ae92b5b04..2ca54af5f5 100644
--- a/rbutil/rbutilqt/configure.h
+++ b/rbutil/rbutilqt/configure.h
@@ -31,7 +31,7 @@ class Config : public QDialog
Q_OBJECT
public:
Config(QWidget *parent = 0,int index=0);
-
+
signals:
void settingsUpdated(void);
@@ -42,9 +42,9 @@ class Config : public QDialog
private:
void setUserSettings();
void setDevices();
-
+
Ui::ConfigForm ui;
-
+
QStringList findLanguageFiles(void);
QString languageName(const QString&);
QMap<QString, QString> lang;