-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 13 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 1 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 4 |
6 files changed, 11 insertions, 17 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 8b64c41..67cae1c 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -177,6 +177,9 @@ ODevice::ODevice() | |||
177 | 177 | ||
178 | /* mixer */ | 178 | /* mixer */ |
179 | d->m_sound = d->m_vol = d->m_mixer = -1; | 179 | d->m_sound = d->m_vol = d->m_mixer = -1; |
180 | |||
181 | /* System QCopChannel created */ | ||
182 | d->m_initializedButtonQcop = false; | ||
180 | 183 | ||
181 | // New distribution detection code first checks for legacy distributions, | 184 | // New distribution detection code first checks for legacy distributions, |
182 | // identified by /etc/familiar-version or /etc/oz_version. | 185 | // identified by /etc/familiar-version or /etc/oz_version. |
@@ -233,9 +236,6 @@ void ODevice::initButtons() | |||
233 | } | 236 | } |
234 | 237 | ||
235 | reloadButtonMapping(); | 238 | reloadButtonMapping(); |
236 | |||
237 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); | ||
238 | connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); | ||
239 | } | 239 | } |
240 | 240 | ||
241 | ODevice::~ODevice() | 241 | ODevice::~ODevice() |
@@ -645,6 +645,13 @@ const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) | |||
645 | void ODevice::reloadButtonMapping() | 645 | void ODevice::reloadButtonMapping() |
646 | { | 646 | { |
647 | initButtons(); | 647 | initButtons(); |
648 | |||
649 | if(!d->m_initializedButtonQcop) { | ||
650 | QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); | ||
651 | connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), | ||
652 | this,SLOT(systemMessage(const QCString&,const QByteArray&))); | ||
653 | d->m_initializedButtonQcop = true; | ||
654 | } | ||
648 | 655 | ||
649 | Config cfg ( "ButtonSettings" ); | 656 | Config cfg ( "ButtonSettings" ); |
650 | 657 | ||
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 6f0d036..21fcc3f 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -357,6 +357,7 @@ class ODeviceData { | |||
357 | QValueList <ODeviceButton> *m_buttons; | 357 | QValueList <ODeviceButton> *m_buttons; |
358 | uint m_holdtime; | 358 | uint m_holdtime; |
359 | QStrList *m_cpu_frequencies; | 359 | QStrList *m_cpu_frequencies; |
360 | boolm_initializedButtonQcop : 1; | ||
360 | 361 | ||
361 | /* values for changeMixerForAlarm */ | 362 | /* values for changeMixerForAlarm */ |
362 | int m_sound, m_vol, m_mixer; | 363 | int m_sound, m_vol, m_mixer; |
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 6193ddc..9e01a0c 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp | |||
@@ -189,9 +189,6 @@ void iPAQ::initButtons() | |||
189 | } | 189 | } |
190 | } | 190 | } |
191 | reloadButtonMapping(); | 191 | reloadButtonMapping(); |
192 | |||
193 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); | ||
194 | connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); | ||
195 | } | 192 | } |
196 | 193 | ||
197 | QValueList <OLed> iPAQ::ledList() const | 194 | QValueList <OLed> iPAQ::ledList() const |
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp index 2cab0c8..8141f1c 100644 --- a/libopie2/opiecore/device/odevice_jornada.cpp +++ b/libopie2/opiecore/device/odevice_jornada.cpp | |||
@@ -140,9 +140,6 @@ void Jornada::initButtons() | |||
140 | } | 140 | } |
141 | } | 141 | } |
142 | reloadButtonMapping(); | 142 | reloadButtonMapping(); |
143 | |||
144 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); | ||
145 | connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); | ||
146 | } | 143 | } |
147 | 144 | ||
148 | int Jornada::displayBrightnessResolution() const | 145 | int Jornada::displayBrightnessResolution() const |
diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp index a06d7ec..8f22514 100644 --- a/libopie2/opiecore/device/odevice_yopy.cpp +++ b/libopie2/opiecore/device/odevice_yopy.cpp | |||
@@ -109,10 +109,6 @@ void Yopy::initButtons() | |||
109 | d->m_buttons->append ( b ); | 109 | d->m_buttons->append ( b ); |
110 | } | 110 | } |
111 | reloadButtonMapping(); | 111 | reloadButtonMapping(); |
112 | |||
113 | QCopChannel *sysch = new QCopChannel( "QPE/System", this ); | ||
114 | connect( sysch, SIGNAL( received(const QCString&,const QByteArray&) ), | ||
115 | this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); | ||
116 | } | 112 | } |
117 | 113 | ||
118 | 114 | ||
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 733479e..ebe1949 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -238,10 +238,6 @@ void Zaurus::initButtons() | |||
238 | } | 238 | } |
239 | 239 | ||
240 | reloadButtonMapping(); | 240 | reloadButtonMapping(); |
241 | |||
242 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); | ||
243 | connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), | ||
244 | this, SLOT( systemMessage(const QCString&,const QByteArray&))); | ||
245 | } | 241 | } |
246 | 242 | ||
247 | #include <unistd.h> | 243 | #include <unistd.h> |