-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 6 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 7 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 52 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ramses.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ramses.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 2 |
14 files changed, 44 insertions, 43 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 @@ -92,2 +92,3 @@ ODevice *ODevice::inst() // rewrite this to only use /proc/cpuinfo or so + QString cpu_info; @@ -106,2 +107,3 @@ ODevice *ODevice::inst() qDebug( "ODevice() - found '%s'", (const char*) line ); + cpu_info = line; if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); @@ -121,3 +123,3 @@ ODevice *ODevice::inst() if ( !dev ) dev = new ODevice(); - dev->init(); + dev->init(cpu_info); } @@ -152,3 +154,3 @@ void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) -void ODevice::init() +void ODevice::init(const QString&) { diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 0ba58f0..aaebde3 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -62,3 +62,4 @@ enum OModel { Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), - Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000011 ), + Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000020 ), + Model_iPAQ_H22xx = ( Model_iPAQ | 0x000040 ), @@ -162,3 +163,3 @@ enum OHingeStatus { -/* default button for qvfb or such +/* default button for qvfb or such * see odevice.cpp for details. @@ -197,3 +198,3 @@ protected: ODevice(); - virtual void init(); + virtual void init(const QString&); virtual void initButtons(); diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 98e2ffa..efe35e7 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -116,3 +116,3 @@ struct i_button ipaq_buttons [] = { -void iPAQ::init() +void iPAQ::init(const QString& model) { @@ -121,26 +121,22 @@ void iPAQ::init() - QFile f ( "/proc/hal/model" ); + d->m_modelstr = model.mid(model.findRev('H')); + + if ( d->m_modelstr == "H3100" ) + d->m_model = Model_iPAQ_H31xx; + else if ( d->m_modelstr == "H3600" ) + d->m_model = Model_iPAQ_H36xx; + else if ( d->m_modelstr == "H3700" ) + d->m_model = Model_iPAQ_H37xx; + else if ( d->m_modelstr == "H3800" ) + d->m_model = Model_iPAQ_H38xx; + else if ( d->m_modelstr == "H3900" ) + d->m_model = Model_iPAQ_H39xx; + else if ( d->m_modelstr == "H5400" ) + d->m_model = Model_iPAQ_H5xxx; + else if ( d->m_modelstr == "H2200" ) + d->m_model = Model_iPAQ_H22xx; + else + d->m_model = Model_Unknown; - if ( f. open ( IO_ReadOnly )) { - QTextStream ts ( &f ); - d->m_modelstr = "H" + ts. readLine(); - - if ( d->m_modelstr == "H3100" ) - d->m_model = Model_iPAQ_H31xx; - else if ( d->m_modelstr == "H3600" ) - d->m_model = Model_iPAQ_H36xx; - else if ( d->m_modelstr == "H3700" ) - d->m_model = Model_iPAQ_H37xx; - else if ( d->m_modelstr == "H3800" ) - d->m_model = Model_iPAQ_H38xx; - else if ( d->m_modelstr == "H3900" ) - d->m_model = Model_iPAQ_H39xx; - else if ( d->m_modelstr == "H5400" ) - d->m_model = Model_iPAQ_H5xxx; - else - d->m_model = Model_Unknown; - - f. close(); - } @@ -151,2 +147,6 @@ void iPAQ::init() break; + case Model_iPAQ_H5xxx: + case Model_iPAQ_H22xx: + d->m_rotation = Rot0; + break; case Model_iPAQ_H36xx: @@ -154,3 +154,2 @@ void iPAQ::init() case Model_iPAQ_H39xx: - default: @@ -158,7 +157,6 @@ void iPAQ::init() break; - case Model_iPAQ_H5xxx: - d->m_rotation = Rot0; + } - f. setName ( "/etc/familiar-version" ); + QFile f( "/etc/familiar-version" ); if ( f. open ( IO_ReadOnly )) { diff --git a/libopie2/opiecore/device/odevice_ipaq.h b/libopie2/opiecore/device/odevice_ipaq.h index 968f715..cc0b8ac 100644 --- a/libopie2/opiecore/device/odevice_ipaq.h +++ b/libopie2/opiecore/device/odevice_ipaq.h @@ -45,3 +45,3 @@ class iPAQ : public ODevice, public QWSServer::KeyboardFilter protected: - virtual void init(); + virtual void init(const QString&); virtual void initButtons(); diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp index eaa93ca..ad2f830 100644 --- a/libopie2/opiecore/device/odevice_jornada.cpp +++ b/libopie2/opiecore/device/odevice_jornada.cpp @@ -81,3 +81,3 @@ using namespace Opie::Core::Internal; -void Jornada::init() +void Jornada::init(const QString&) { diff --git a/libopie2/opiecore/device/odevice_jornada.h b/libopie2/opiecore/device/odevice_jornada.h index e2e67af..fddfe34 100644 --- a/libopie2/opiecore/device/odevice_jornada.h +++ b/libopie2/opiecore/device/odevice_jornada.h @@ -41,3 +41,3 @@ class Jornada : public ODevice protected: - virtual void init(); + virtual void init(const QString&); diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp index 10b7b61..32467f1 100644 --- a/libopie2/opiecore/device/odevice_ramses.cpp +++ b/libopie2/opiecore/device/odevice_ramses.cpp @@ -71,3 +71,3 @@ struct r_button ramses_buttons [] = { -void Ramses::init() +void Ramses::init(const QString&) { diff --git a/libopie2/opiecore/device/odevice_ramses.h b/libopie2/opiecore/device/odevice_ramses.h index aea9e2a..3cf5e92 100644 --- a/libopie2/opiecore/device/odevice_ramses.h +++ b/libopie2/opiecore/device/odevice_ramses.h @@ -43,3 +43,3 @@ class Ramses : public ODevice, public QWSServer::KeyboardFilter protected: - virtual void init(); + virtual void init(const QString&); diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index e9481bb..6630763 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp @@ -114,3 +114,3 @@ struct s_button simpad_buttons [] = { -void SIMpad::init() +void SIMpad::init(const QString&) { diff --git a/libopie2/opiecore/device/odevice_simpad.h b/libopie2/opiecore/device/odevice_simpad.h index 3d5acb5..0f4e66f 100644 --- a/libopie2/opiecore/device/odevice_simpad.h +++ b/libopie2/opiecore/device/odevice_simpad.h @@ -44,3 +44,3 @@ class SIMpad : public ODevice, public QWSServer::KeyboardFilter protected: - virtual void init(); + virtual void init(const QString&); virtual void initButtons(); diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp index 4e9f227..493ed25 100644 --- a/libopie2/opiecore/device/odevice_yopy.cpp +++ b/libopie2/opiecore/device/odevice_yopy.cpp @@ -73,3 +73,3 @@ struct yopy_button yopy_buttons [] = { -void Yopy::init() +void Yopy::init(const QString&) { diff --git a/libopie2/opiecore/device/odevice_yopy.h b/libopie2/opiecore/device/odevice_yopy.h index 6e1db88..f6bf061 100644 --- a/libopie2/opiecore/device/odevice_yopy.h +++ b/libopie2/opiecore/device/odevice_yopy.h @@ -41,3 +41,3 @@ class Yopy : public ODevice - virtual void init(); + virtual void init(const QString&); virtual void initButtons(); diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 1434e69..e8b813e 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -117,3 +117,3 @@ struct z_button z_buttons_c700 [] = { -void Zaurus::init() +void Zaurus::init(const QString&) { diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index a0b1787..76a40d6 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h @@ -55,3 +55,3 @@ class Zaurus : public ODevice protected: - virtual void init(); + virtual void init(const QString&); virtual void initButtons(); |