summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice.cpp
authorzecke <zecke>2004-05-01 18:13:29 (UTC)
committer zecke <zecke>2004-05-01 18:13:29 (UTC)
commit7a2cac7a65be07c1e82508e00c2d3d61e0823dc1 (patch) (side-by-side diff)
tree70381a30c784957b22d9e644272ac96a0fced5a4 /libopie2/opiecore/device/odevice.cpp
parentec6a887d8abddbab085a0a3aecae5760ff85dbe8 (diff)
downloadopie-7a2cac7a65be07c1e82508e00c2d3d61e0823dc1.zip
opie-7a2cac7a65be07c1e82508e00c2d3d61e0823dc1.tar.gz
opie-7a2cac7a65be07c1e82508e00c2d3d61e0823dc1.tar.bz2
Pass on the Hardware line of proc/cpuinfo so we don't need to parse the file again..
only adjusted iPAQ backend to use it Beginning of hh22xx Linux2.6 support
Diffstat (limited to 'libopie2/opiecore/device/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp
index 62a2e03..cef7f63 100644
--- a/libopie2/opiecore/device/odevice.cpp
+++ b/libopie2/opiecore/device/odevice.cpp
@@ -90,6 +90,7 @@ ODevice *ODevice::inst()
static ODevice *dev = 0;
// rewrite this to only use /proc/cpuinfo or so
+ QString cpu_info;
if ( !dev )
{
@@ -104,6 +105,7 @@ ODevice *ODevice::inst()
if ( line.startsWith( "Hardware" ) )
{
qDebug( "ODevice() - found '%s'", (const char*) line );
+ cpu_info = line;
if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus();
else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ();
else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad();
@@ -119,7 +121,7 @@ ODevice *ODevice::inst()
qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO );
}
if ( !dev ) dev = new ODevice();
- dev->init();
+ dev->init(cpu_info);
}
return dev;
}
@@ -150,7 +152,7 @@ void ODevice::systemMessage ( const QCString &msg, const QByteArray & )
}
}
-void ODevice::init()
+void ODevice::init(const QString&)
{
}