author | mickeyl <mickeyl> | 2004-09-08 21:05:17 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-09-08 21:05:17 (UTC) |
commit | 189f40847bbaaed928cb99d64f51f708c96a967b (patch) (unidiff) | |
tree | f0f1b7fac675e960be2472dcd7ea4b64034630a0 | |
parent | dbab81a4311ab27fd991a7f56f7804d2212d057d (diff) | |
download | opie-189f40847bbaaed928cb99d64f51f708c96a967b.zip opie-189f40847bbaaed928cb99d64f51f708c96a967b.tar.gz opie-189f40847bbaaed928cb99d64f51f708c96a967b.tar.bz2 |
remove things like \n and \l from the system version string
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 129215b..280b0c5 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -162,65 +162,65 @@ ODevice::ODevice() | |||
162 | d->m_model = Model_Unknown; | 162 | d->m_model = Model_Unknown; |
163 | d->m_vendorstr = "Unknown"; | 163 | d->m_vendorstr = "Unknown"; |
164 | d->m_vendor = Vendor_Unknown; | 164 | d->m_vendor = Vendor_Unknown; |
165 | d->m_systemstr = "Unknown"; | 165 | d->m_systemstr = "Unknown"; |
166 | d->m_system = System_Unknown; | 166 | d->m_system = System_Unknown; |
167 | d->m_sysverstr = "0.0"; | 167 | d->m_sysverstr = "0.0"; |
168 | d->m_rotation = Rot0; | 168 | d->m_rotation = Rot0; |
169 | d->m_direction = CW; | 169 | d->m_direction = CW; |
170 | 170 | ||
171 | d->m_holdtime = 1000; // 1000ms | 171 | d->m_holdtime = 1000; // 1000ms |
172 | d->m_buttons = 0; | 172 | d->m_buttons = 0; |
173 | d->m_cpu_frequencies = new QStrList; | 173 | d->m_cpu_frequencies = new QStrList; |
174 | 174 | ||
175 | 175 | ||
176 | /* mixer */ | 176 | /* mixer */ |
177 | d->m_sound = d->m_vol = d->m_mixer = -1; | 177 | d->m_sound = d->m_vol = d->m_mixer = -1; |
178 | 178 | ||
179 | // New distribution detection code first checks for legacy distributions, | 179 | // New distribution detection code first checks for legacy distributions, |
180 | // identified by /etc/familiar-version or /etc/oz_version. | 180 | // identified by /etc/familiar-version or /etc/oz_version. |
181 | // Then check for OpenEmbedded and lastly, read /etc/issue | 181 | // Then check for OpenEmbedded and lastly, read /etc/issue |
182 | 182 | ||
183 | for ( unsigned int i = 0; i < sizeof distributions; ++i ) | 183 | for ( unsigned int i = 0; i < sizeof distributions; ++i ) |
184 | { | 184 | { |
185 | if ( QFile::exists( distributions[i].sysvfile ) ) | 185 | if ( QFile::exists( distributions[i].sysvfile ) ) |
186 | { | 186 | { |
187 | d->m_systemstr = distributions[i].sysstr; | 187 | d->m_systemstr = distributions[i].sysstr; |
188 | d->m_system = distributions[i].system; | 188 | d->m_system = distributions[i].system; |
189 | d->m_sysverstr = "<Unknown>"; | 189 | d->m_sysverstr = "<Unknown>"; |
190 | QFile f( distributions[i].sysvfile ); | 190 | QFile f( distributions[i].sysvfile ); |
191 | if ( f.open( IO_ReadOnly ) ) | 191 | if ( f.open( IO_ReadOnly ) ) |
192 | { | 192 | { |
193 | QTextStream ts( &f ); | 193 | QTextStream ts( &f ); |
194 | d->m_sysverstr = ts.readLine(); | 194 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); |
195 | } | 195 | } |
196 | break; | 196 | break; |
197 | } | 197 | } |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) | 201 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) |
202 | { | 202 | { |
203 | if ( msg == "deviceButtonMappingChanged()" ) { | 203 | if ( msg == "deviceButtonMappingChanged()" ) { |
204 | reloadButtonMapping(); | 204 | reloadButtonMapping(); |
205 | } | 205 | } |
206 | } | 206 | } |
207 | 207 | ||
208 | void ODevice::init(const QString&) | 208 | void ODevice::init(const QString&) |
209 | { | 209 | { |
210 | } | 210 | } |
211 | 211 | ||
212 | /** | 212 | /** |
213 | * This method initialises the button mapping | 213 | * This method initialises the button mapping |
214 | */ | 214 | */ |
215 | void ODevice::initButtons() | 215 | void ODevice::initButtons() |
216 | { | 216 | { |
217 | if ( d->m_buttons ) | 217 | if ( d->m_buttons ) |
218 | return; | 218 | return; |
219 | 219 | ||
220 | qDebug ( "init Buttons" ); | 220 | qDebug ( "init Buttons" ); |
221 | d->m_buttons = new QValueList <ODeviceButton>; | 221 | d->m_buttons = new QValueList <ODeviceButton>; |
222 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { | 222 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { |
223 | default_button *db = default_buttons + i; | 223 | default_button *db = default_buttons + i; |
224 | ODeviceButton b; | 224 | ODeviceButton b; |
225 | b. setKeycode ( db->code ); | 225 | b. setKeycode ( db->code ); |
226 | b. setUserText ( QObject::tr ( "Button", db->utext )); | 226 | b. setUserText ( QObject::tr ( "Button", db->utext )); |