From 03930fa4871365efb6438b74b3a68f8f06aa7e4f Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 13 Jul 2004 14:01:44 +0000 Subject: 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 --- 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 @@ -58,9 +58,35 @@ #include #endif -const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; +namespace Opie { +namespace Core { -using namespace Opie::Core; +static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; + + +/* STATIC and common implementation */ +/* EXPORT */ ODistribution distributions[] = { + { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, + { System_OpenZaurus, "OpenZaurus", "/etc/oz_version" }, + { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, + { System_Unknown, "Linux", "/etc/issue" }, +}; + + +/* EXPORT */ bool isQWS(){ + return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; +} + +/* EXPORT */ QCString makeChannel ( const char *str ){ + if ( str && !::strchr ( str, '/' )) + return QCString ( "QPE/Application/" ) + str; + else + return str; +} + + + +/* Now the default implementation of ODevice */ struct default_button default_buttons [] = { { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), @@ -685,3 +711,7 @@ void ODevice::sendSuspendmsg() QCopEnvelope ( "QPE/System", "aboutToSuspend()" ); } + + +} +} 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 @@ -134,14 +134,8 @@ typedef struct { char* sysvfile; } ODistribution; -static ODistribution distributions[] = -{ - { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, - { System_OpenZaurus, "OpenZaurus", "/etc/oz_version" }, - { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, - { System_Unknown, "Linux", "/etc/issue" }, +extern ODistribution distributions[]; -}; enum OLedState { Led_Off, @@ -352,21 +346,12 @@ class ODeviceData { QStrList *m_cpu_frequencies; }; +extern bool isQWS(); +extern QCString makeChannel ( const char *str ); } } -static inline bool isQWS() -{ - return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; -} -static QCString makeChannel ( const char *str ) -{ - if ( str && !::strchr ( str, '/' )) - return QCString ( "QPE/Application/" ) + str; - else - return str; -} #endif -- cgit v0.9.0.2