-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 | |||
@@ -91,4 +91,5 @@ ODevice *ODevice::inst() | |||
91 | 91 | ||
92 | // rewrite this to only use /proc/cpuinfo or so | 92 | // rewrite this to only use /proc/cpuinfo or so |
93 | QString cpu_info; | ||
93 | 94 | ||
94 | if ( !dev ) | 95 | if ( !dev ) |
@@ -105,4 +106,5 @@ ODevice *ODevice::inst() | |||
105 | { | 106 | { |
106 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 107 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
108 | cpu_info = line; | ||
107 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); | 109 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); |
108 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); | 110 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); |
@@ -120,5 +122,5 @@ ODevice *ODevice::inst() | |||
120 | } | 122 | } |
121 | if ( !dev ) dev = new ODevice(); | 123 | if ( !dev ) dev = new ODevice(); |
122 | dev->init(); | 124 | dev->init(cpu_info); |
123 | } | 125 | } |
124 | return dev; | 126 | return dev; |
@@ -151,5 +153,5 @@ void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) | |||
151 | } | 153 | } |
152 | 154 | ||
153 | void ODevice::init() | 155 | void ODevice::init(const QString&) |
154 | { | 156 | { |
155 | } | 157 | } |
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 | |||
@@ -61,5 +61,6 @@ enum OModel { | |||
61 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), | 61 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), |
62 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), | 62 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), |
63 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000011 ), | 63 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000020 ), |
64 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x000040 ), | ||
64 | 65 | ||
65 | Model_Jornada = ( 6 << 24 ), | 66 | Model_Jornada = ( 6 << 24 ), |
@@ -161,5 +162,5 @@ enum OHingeStatus { | |||
161 | }; | 162 | }; |
162 | 163 | ||
163 | /* default button for qvfb or such | 164 | /* default button for qvfb or such |
164 | * see odevice.cpp for details. | 165 | * see odevice.cpp for details. |
165 | * hint: manage a user defined button for qvfb? | 166 | * hint: manage a user defined button for qvfb? |
@@ -196,5 +197,5 @@ private: | |||
196 | protected: | 197 | protected: |
197 | ODevice(); | 198 | ODevice(); |
198 | virtual void init(); | 199 | virtual void init(const QString&); |
199 | virtual void initButtons(); | 200 | virtual void initButtons(); |
200 | static void sendSuspendmsg(); | 201 | static void sendSuspendmsg(); |
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 | |||
@@ -115,33 +115,29 @@ struct i_button ipaq_buttons [] = { | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | void iPAQ::init() | 117 | void iPAQ::init(const QString& model) |
118 | { | 118 | { |
119 | d->m_vendorstr = "HP"; | 119 | d->m_vendorstr = "HP"; |
120 | d->m_vendor = Vendor_HP; | 120 | d->m_vendor = Vendor_HP; |
121 | 121 | ||
122 | QFile f ( "/proc/hal/model" ); | 122 | d->m_modelstr = model.mid(model.findRev('H')); |
123 | |||
124 | if ( d->m_modelstr == "H3100" ) | ||
125 | d->m_model = Model_iPAQ_H31xx; | ||
126 | else if ( d->m_modelstr == "H3600" ) | ||
127 | d->m_model = Model_iPAQ_H36xx; | ||
128 | else if ( d->m_modelstr == "H3700" ) | ||
129 | d->m_model = Model_iPAQ_H37xx; | ||
130 | else if ( d->m_modelstr == "H3800" ) | ||
131 | d->m_model = Model_iPAQ_H38xx; | ||
132 | else if ( d->m_modelstr == "H3900" ) | ||
133 | d->m_model = Model_iPAQ_H39xx; | ||
134 | else if ( d->m_modelstr == "H5400" ) | ||
135 | d->m_model = Model_iPAQ_H5xxx; | ||
136 | else if ( d->m_modelstr == "H2200" ) | ||
137 | d->m_model = Model_iPAQ_H22xx; | ||
138 | else | ||
139 | d->m_model = Model_Unknown; | ||
123 | 140 | ||
124 | if ( f. open ( IO_ReadOnly )) { | ||
125 | QTextStream ts ( &f ); | ||
126 | 141 | ||
127 | d->m_modelstr = "H" + ts. readLine(); | ||
128 | |||
129 | if ( d->m_modelstr == "H3100" ) | ||
130 | d->m_model = Model_iPAQ_H31xx; | ||
131 | else if ( d->m_modelstr == "H3600" ) | ||
132 | d->m_model = Model_iPAQ_H36xx; | ||
133 | else if ( d->m_modelstr == "H3700" ) | ||
134 | d->m_model = Model_iPAQ_H37xx; | ||
135 | else if ( d->m_modelstr == "H3800" ) | ||
136 | d->m_model = Model_iPAQ_H38xx; | ||
137 | else if ( d->m_modelstr == "H3900" ) | ||
138 | d->m_model = Model_iPAQ_H39xx; | ||
139 | else if ( d->m_modelstr == "H5400" ) | ||
140 | d->m_model = Model_iPAQ_H5xxx; | ||
141 | else | ||
142 | d->m_model = Model_Unknown; | ||
143 | |||
144 | f. close(); | ||
145 | } | ||
146 | 142 | ||
147 | switch ( d->m_model ) { | 143 | switch ( d->m_model ) { |
@@ -150,16 +146,18 @@ void iPAQ::init() | |||
150 | d->m_rotation = Rot90; | 146 | d->m_rotation = Rot90; |
151 | break; | 147 | break; |
148 | case Model_iPAQ_H5xxx: | ||
149 | case Model_iPAQ_H22xx: | ||
150 | d->m_rotation = Rot0; | ||
151 | break; | ||
152 | case Model_iPAQ_H36xx: | 152 | case Model_iPAQ_H36xx: |
153 | case Model_iPAQ_H37xx: | 153 | case Model_iPAQ_H37xx: |
154 | case Model_iPAQ_H39xx: | 154 | case Model_iPAQ_H39xx: |
155 | |||
156 | default: | 155 | default: |
157 | d->m_rotation = Rot270; | 156 | d->m_rotation = Rot270; |
158 | break; | 157 | break; |
159 | case Model_iPAQ_H5xxx: | 158 | |
160 | d->m_rotation = Rot0; | ||
161 | } | 159 | } |
162 | 160 | ||
163 | f. setName ( "/etc/familiar-version" ); | 161 | QFile f( "/etc/familiar-version" ); |
164 | if ( f. open ( IO_ReadOnly )) { | 162 | if ( f. open ( IO_ReadOnly )) { |
165 | d->m_systemstr = "Familiar"; | 163 | d->m_systemstr = "Familiar"; |
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 | |||
@@ -44,5 +44,5 @@ class iPAQ : public ODevice, public QWSServer::KeyboardFilter | |||
44 | 44 | ||
45 | protected: | 45 | protected: |
46 | virtual void init(); | 46 | virtual void init(const QString&); |
47 | virtual void initButtons(); | 47 | virtual void initButtons(); |
48 | 48 | ||
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 | |||
@@ -80,5 +80,5 @@ typedef struct { | |||
80 | using namespace Opie::Core::Internal; | 80 | using namespace Opie::Core::Internal; |
81 | 81 | ||
82 | void Jornada::init() | 82 | void Jornada::init(const QString&) |
83 | { | 83 | { |
84 | d->m_vendorstr = "HP"; | 84 | d->m_vendorstr = "HP"; |
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 | |||
@@ -40,5 +40,5 @@ class Jornada : public ODevice | |||
40 | 40 | ||
41 | protected: | 41 | protected: |
42 | virtual void init(); | 42 | virtual void init(const QString&); |
43 | 43 | ||
44 | public: | 44 | public: |
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 | |||
@@ -70,5 +70,5 @@ struct r_button ramses_buttons [] = { | |||
70 | }; | 70 | }; |
71 | 71 | ||
72 | void Ramses::init() | 72 | void Ramses::init(const QString&) |
73 | { | 73 | { |
74 | d->m_vendorstr = "M und N"; | 74 | d->m_vendorstr = "M und N"; |
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 | |||
@@ -42,5 +42,5 @@ class Ramses : public ODevice, public QWSServer::KeyboardFilter | |||
42 | { | 42 | { |
43 | protected: | 43 | protected: |
44 | virtual void init(); | 44 | virtual void init(const QString&); |
45 | 45 | ||
46 | public: | 46 | public: |
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 | |||
@@ -113,5 +113,5 @@ struct s_button simpad_buttons [] = { | |||
113 | }; | 113 | }; |
114 | 114 | ||
115 | void SIMpad::init() | 115 | void SIMpad::init(const QString&) |
116 | { | 116 | { |
117 | d->m_vendorstr = "SIEMENS"; | 117 | d->m_vendorstr = "SIEMENS"; |
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 | |||
@@ -43,5 +43,5 @@ class SIMpad : public ODevice, public QWSServer::KeyboardFilter | |||
43 | { | 43 | { |
44 | protected: | 44 | protected: |
45 | virtual void init(); | 45 | virtual void init(const QString&); |
46 | virtual void initButtons(); | 46 | virtual void initButtons(); |
47 | 47 | ||
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 | |||
@@ -72,5 +72,5 @@ struct yopy_button yopy_buttons [] = { | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | void Yopy::init() | 74 | void Yopy::init(const QString&) |
75 | { | 75 | { |
76 | d->m_vendorstr = "G.Mate"; | 76 | d->m_vendorstr = "G.Mate"; |
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 | |||
@@ -40,5 +40,5 @@ class Yopy : public ODevice | |||
40 | protected: | 40 | protected: |
41 | 41 | ||
42 | virtual void init(); | 42 | virtual void init(const QString&); |
43 | virtual void initButtons(); | 43 | virtual void initButtons(); |
44 | 44 | ||
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 | |||
@@ -116,5 +116,5 @@ struct z_button z_buttons_c700 [] = { | |||
116 | // Comments? - mickeyl. | 116 | // Comments? - mickeyl. |
117 | 117 | ||
118 | void Zaurus::init() | 118 | void Zaurus::init(const QString&) |
119 | { | 119 | { |
120 | d->m_vendorstr = "Sharp"; | 120 | d->m_vendorstr = "Sharp"; |
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 | |||
@@ -54,5 +54,5 @@ class Zaurus : public ODevice | |||
54 | 54 | ||
55 | protected: | 55 | protected: |
56 | virtual void init(); | 56 | virtual void init(const QString&); |
57 | virtual void initButtons(); | 57 | virtual void initButtons(); |
58 | 58 | ||