author | eilers <eilers> | 2004-08-29 12:42:03 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-08-29 12:42:03 (UTC) |
commit | dd159675e6e3c361bc20eaa6994265e73b6599ef (patch) (unidiff) | |
tree | 70cf91b669307ae39e020ce4257b60b2de9acd42 /libopie2/opiecore/device | |
parent | 496157cb35b8f90e73770fc43c9a63534baebf33 (diff) | |
download | opie-dd159675e6e3c361bc20eaa6994265e73b6599ef.zip opie-dd159675e6e3c361bc20eaa6994265e73b6599ef.tar.gz opie-dd159675e6e3c361bc20eaa6994265e73b6599ef.tar.bz2 |
Minor but important changes in API. Improved SQL performance: contactsbackend now
supports look-ahead caching to speed up access.
Fixed and improved look-ahead cache in todo-backend.
Datebook backend will follow, soon !
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 26c6dca..129215b 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -746,40 +746,44 @@ void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter) | |||
746 | * of Keyfilters. Call this when you delete the KeyFilter! | 746 | * of Keyfilters. Call this when you delete the KeyFilter! |
747 | * | 747 | * |
748 | * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter | 748 | * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter |
749 | * @see Opie::Core::ODevice::addPreHandler | 749 | * @see Opie::Core::ODevice::addPreHandler |
750 | */ | 750 | */ |
751 | void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) | 751 | void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) |
752 | { | 752 | { |
753 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); | 753 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); |
754 | } | 754 | } |
755 | 755 | ||
756 | void ODevice::playingStopped() { | 756 | void ODevice::playingStopped() { |
757 | const_cast<QObject*>(sender())->disconnect( this ); | 757 | const_cast<QObject*>(sender())->disconnect( this ); |
758 | #ifndef QT_NO_SOUND | ||
758 | if ( d->m_sound >= 0 ) { | 759 | if ( d->m_sound >= 0 ) { |
759 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); | 760 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); |
760 | ::close ( d->m_sound ); | 761 | ::close ( d->m_sound ); |
761 | } | 762 | } |
763 | #endif | ||
762 | } | 764 | } |
763 | 765 | ||
764 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { | 766 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { |
767 | #ifndef QT_NO_SOUND | ||
765 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { | 768 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { |
766 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { | 769 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { |
767 | Config cfg ( "qpe" ); | 770 | Config cfg ( "qpe" ); |
768 | cfg. setGroup ( "Volume" ); | 771 | cfg. setGroup ( "Volume" ); |
769 | 772 | ||
770 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); | 773 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); |
771 | if ( volalarm < 0 ) | 774 | if ( volalarm < 0 ) |
772 | volalarm = 0; | 775 | volalarm = 0; |
773 | else if ( volalarm > 100 ) | 776 | else if ( volalarm > 100 ) |
774 | volalarm = 100; | 777 | volalarm = 100; |
775 | volalarm |= ( volalarm << 8 ); | 778 | volalarm |= ( volalarm << 8 ); |
776 | 779 | ||
777 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) | 780 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) |
778 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); | 781 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); |
779 | } | 782 | } |
780 | d->m_mixer = mixer; | 783 | d->m_mixer = mixer; |
781 | } | 784 | } |
785 | #endif | ||
782 | } | 786 | } |
783 | 787 | ||
784 | } | 788 | } |
785 | } | 789 | } |