author | zecke <zecke> | 2004-11-04 22:03:38 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-04 22:03:38 (UTC) |
commit | 586ba5bb2842d80911ea22bf47eaa2f1b39362e1 (patch) (side-by-side diff) | |
tree | e8ee53bea0563e16d8bd2649a5846b8377f53be3 | |
parent | 2df2234beb066097c1c3bd899c21eff30abf4323 (diff) | |
download | opie-586ba5bb2842d80911ea22bf47eaa2f1b39362e1.zip opie-586ba5bb2842d80911ea22bf47eaa2f1b39362e1.tar.gz opie-586ba5bb2842d80911ea22bf47eaa2f1b39362e1.tar.bz2 |
Revert last commit and create a QCOP Channel for QPE/System in
ODevice again, as OApplication doesn't expose the signal anymore
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index e57cdef..39b37cd 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -632,36 +632,37 @@ uint ODevice::buttonHoldTime() const * @see ODeviceButton */ const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) { initButtons(); for ( QValueListConstIterator<ODeviceButton> it = d->m_buttons->begin(); it != d->m_buttons->end(); ++it ) { if ( (*it). keycode() == code ) return &(*it); } return 0; } void ODevice::reloadButtonMapping() { if(!d->m_buttons) - initButtons(); + initButtons(); if(!d->m_initializedButtonQcop) { - connect(qApp,SIGNAL(systemMessageSignal(const QCString&,const QByteArray&)), + QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); + connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), this,SLOT(systemMessage(const QCString&,const QByteArray&))); d->m_initializedButtonQcop = true; } Config cfg ( "ButtonSettings" ); for ( uint i = 0; i < d->m_buttons->count(); i++ ) { ODeviceButton &b = ( *d->m_buttons ) [i]; QString group = "Button" + QString::number ( i ); QCString pch, hch; QCString pm, hm; QByteArray pdata, hdata; if ( cfg. hasGroup ( group )) { cfg. setGroup ( group ); |