summaryrefslogtreecommitdiff
authorzecke <zecke>2004-07-13 14:01:44 (UTC)
committer zecke <zecke>2004-07-13 14:01:44 (UTC)
commit03930fa4871365efb6438b74b3a68f8f06aa7e4f (patch) (unidiff)
tree86c83a95b37fbde6e467b852393b66527383492e
parent74f19a502a513258f88a75e057a5998393e3c7f6 (diff)
downloadopie-03930fa4871365efb6438b74b3a68f8f06aa7e4f.zip
opie-03930fa4871365efb6438b74b3a68f8f06aa7e4f.tar.gz
opie-03930fa4871365efb6438b74b3a68f8f06aa7e4f.tar.bz2
Fix compiler warnings coming from static methods which are unused most of the
time in headers. Move isQWS and makeChannel to Opie::Core. Maybe we will move them to internal later
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp34
-rw-r--r--libopie2/opiecore/device/odevice.h21
2 files changed, 35 insertions, 20 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp
index 5b73e59..0068d88 100644
--- a/libopie2/opiecore/device/odevice.cpp
+++ b/libopie2/opiecore/device/odevice.cpp
@@ -55,15 +55,41 @@
55#include <sys/time.h> 55#include <sys/time.h>
56#include <unistd.h> 56#include <unistd.h>
57#ifndef QT_NO_SOUND 57#ifndef QT_NO_SOUND
58#include <linux/soundcard.h> 58#include <linux/soundcard.h>
59#endif 59#endif
60 60
61const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; 61namespace Opie {
62namespace Core {
62 63
63using namespace Opie::Core; 64static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo";
65
66
67/* STATIC and common implementation */
68/* EXPORT */ ODistribution distributions[] = {
69 { System_Familiar, "FamiliarLinux", "/etc/familiar-version" },
70 { System_OpenZaurus, "OpenZaurus", "/etc/oz_version" },
71 { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" },
72 { System_Unknown, "Linux", "/etc/issue" },
73};
74
75
76/* EXPORT */ bool isQWS(){
77 return qApp ? ( qApp->type() == QApplication::GuiServer ) : false;
78}
79
80/* EXPORT */ QCString makeChannel ( const char *str ){
81 if ( str && !::strchr ( str, '/' ))
82 return QCString ( "QPE/Application/" ) + str;
83 else
84 return str;
85}
86
87
88
89/* Now the default implementation of ODevice */
64 90
65struct default_button default_buttons [] = { 91struct default_button default_buttons [] = {
66 { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), 92 { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"),
67 "devicebuttons/z_calendar", 93 "devicebuttons/z_calendar",
68 "datebook", "nextView()", 94 "datebook", "nextView()",
69 "today", "raise()" }, 95 "today", "raise()" },
@@ -682,6 +708,10 @@ void ODevice::sendSuspendmsg()
682{ 708{
683 if ( isQWS() ) 709 if ( isQWS() )
684 return; 710 return;
685 711
686 QCopEnvelope ( "QPE/System", "aboutToSuspend()" ); 712 QCopEnvelope ( "QPE/System", "aboutToSuspend()" );
687} 713}
714
715
716}
717}
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index 474d792..0465d7e 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -131,20 +131,14 @@ enum OSystem {
131typedef struct { 131typedef struct {
132 OSystem system; 132 OSystem system;
133 char* sysstr; 133 char* sysstr;
134 char* sysvfile; 134 char* sysvfile;
135} ODistribution; 135} ODistribution;
136 136
137static ODistribution distributions[] = 137extern ODistribution distributions[];
138{
139 { System_Familiar, "FamiliarLinux", "/etc/familiar-version" },
140 { System_OpenZaurus, "OpenZaurus", "/etc/oz_version" },
141 { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" },
142 { System_Unknown, "Linux", "/etc/issue" },
143 138
144};
145 139
146enum OLedState { 140enum OLedState {
147 Led_Off, 141 Led_Off,
148 Led_On, 142 Led_On,
149 Led_BlinkSlow, 143 Led_BlinkSlow,
150 Led_BlinkFast 144 Led_BlinkFast
@@ -349,25 +343,16 @@ class ODeviceData {
349 343
350 QValueList <ODeviceButton> *m_buttons; 344 QValueList <ODeviceButton> *m_buttons;
351 uint m_holdtime; 345 uint m_holdtime;
352 QStrList *m_cpu_frequencies; 346 QStrList *m_cpu_frequencies;
353}; 347};
354 348
349extern bool isQWS();
350extern QCString makeChannel ( const char *str );
355} 351}
356} 352}
357 353
358static inline bool isQWS()
359{
360 return qApp ? ( qApp->type() == QApplication::GuiServer ) : false;
361}
362 354
363static QCString makeChannel ( const char *str )
364{
365 if ( str && !::strchr ( str, '/' ))
366 return QCString ( "QPE/Application/" ) + str;
367 else
368 return str;
369}
370 355
371 356
372#endif 357#endif
373 358