author | zecke <zecke> | 2004-11-03 23:04:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-03 23:04:36 (UTC) |
commit | cd2d50799e087fad5b56df9d7fe9aa572a313e64 (patch) (side-by-side diff) | |
tree | 561df7f2fc260c9b4d3c8d9055698201e47939d3 | |
parent | a6adcd3869b9c9c7548290ea686bc4e78ed62fc3 (diff) | |
download | opie-cd2d50799e087fad5b56df9d7fe9aa572a313e64.zip opie-cd2d50799e087fad5b56df9d7fe9aa572a313e64.tar.gz opie-cd2d50799e087fad5b56df9d7fe9aa572a313e64.tar.bz2 |
-SIMpad crashes on QObject::connect() of the QCopChannel
-Luckily (I'm a cheater) OApplication can emit the signal for us
-Event more lucky, qpe and every quicklaunchable application
has a OApplication instance... so the signal is almost available
everywhere
-do not call initButtons from reloadButtonMappings if d->m_buttons
exists
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 67cae1c..e57cdef 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -631,37 +631,37 @@ uint ODevice::buttonHoldTime() const * @return The devicebutton or 0l * @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(); if(!d->m_initializedButtonQcop) { - QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); - connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), + connect(qApp,SIGNAL(systemMessageSignal(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 ); |