summaryrefslogtreecommitdiff
authorsandman <sandman>2002-07-27 22:45:04 (UTC)
committer sandman <sandman>2002-07-27 22:45:04 (UTC)
commit9cc89b6a54ee267953b0422c4607097d075ecab9 (patch) (unidiff)
tree4bde48d162a97ef74cf9e276c0194b8138fb4e0c
parentdac5c073c3e04ceb6900aeb72e53cf6d7350c3c9 (diff)
downloadopie-9cc89b6a54ee267953b0422c4607097d075ecab9.zip
opie-9cc89b6a54ee267953b0422c4607097d075ecab9.tar.gz
opie-9cc89b6a54ee267953b0422c4607097d075ecab9.tar.bz2
Small extension to read the system version
(currently only functional for familiar)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp16
-rw-r--r--libopie/odevice.h1
2 files changed, 16 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 9931684..bc8014a 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -39,2 +39,4 @@ public:
39 39
40 QString m_sysverstr;
41
40 OLedState m_leds [4]; // just for convenience ... 42 OLedState m_leds [4]; // just for convenience ...
@@ -101,2 +103,3 @@ ODevice::ODevice ( )
101 d-> m_system = OSYSTEM_Unknown; 103 d-> m_system = OSYSTEM_Unknown;
104 d-> m_sysverstr = "0.0";
102} 105}
@@ -142,2 +145,7 @@ OSystem ODevice::system ( )
142 145
146QString ODevice::systemVersionString ( )
147{
148 return d-> m_sysverstr;
149}
150
143void ODevice::alarmSound ( ) 151void ODevice::alarmSound ( )
@@ -228,5 +236,11 @@ void ODeviceIPAQ::init ( )
228 236
229 if ( QFile::exists ( "/etc/familiar-version" )) { 237 f. setName ( "/etc/familiar-version" );
238 if ( f. open ( IO_ReadOnly )) {
230 d-> m_systemstr = "Familiar"; 239 d-> m_systemstr = "Familiar";
231 d-> m_system = OSYSTEM_Familiar; 240 d-> m_system = OSYSTEM_Familiar;
241
242 QTextStream ts ( &f );
243 d-> m_sysverstr = ts. readLine ( ). mid ( 10 );
244
245 f. close ( );
232 } 246 }
diff --git a/libopie/odevice.h b/libopie/odevice.h
index b40abe7..b54e576 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -80,2 +80,3 @@ public:
80 80
81 QString systemVersionString ( );
81 82