Diffstat (limited to 'libopie2/opiecore/device/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 13 |
1 files changed, 10 insertions, 3 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 | ||