summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice.cpp
authoreilers <eilers>2004-08-29 12:42:03 (UTC)
committer eilers <eilers>2004-08-29 12:42:03 (UTC)
commitdd159675e6e3c361bc20eaa6994265e73b6599ef (patch) (unidiff)
tree70cf91b669307ae39e020ce4257b60b2de9acd42 /libopie2/opiecore/device/odevice.cpp
parent496157cb35b8f90e73770fc43c9a63534baebf33 (diff)
downloadopie-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 !
Diffstat (limited to 'libopie2/opiecore/device/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp4
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
@@ -752,19 +752,22 @@ 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
756void ODevice::playingStopped() { 756void 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
764void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { 766void 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 );
@@ -776,10 +779,11 @@ void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) {
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}