/*! \internal */ void DialerControl::removeCachedCall( const QPhoneCall &call ) { QSettings setting( "Trolltech", "qpe" ); setting.beginGroup( "CallControl" ); setting.remove( call.identifier() ); setting.sync(); ::sync(); }
/*! \internal */ void DialerControl::updateCachedCall( const QPhoneCall &call ) { QSettings setting( "Trolltech", "qpe" ); setting.beginGroup( "CallControl" ); setting.beginGroup( call.identifier() ); setting.setValue( "CallType", call.dialed() ? QCallListItem::Dialed : QCallListItem::Received ); setting.setValue( "EndTime", QDateTime::currentDateTime() ); setting.endGroup(); setting.endGroup(); setting.sync(); ::sync(); }
/*! \internal */ void DialerControl::cacheCall( const QPhoneCall &call ) { // cache call info to perserve data when battery runs out QSettings setting( "Trolltech", "qpe" ); setting.beginGroup( "CallControl" ); setting.beginGroup( call.identifier() ); setting.setValue( "CallType", call.dialing() ? QCallListItem::Dialed : QCallListItem::Missed ); setting.setValue( "FullNumber", call.fullNumber() ); setting.setValue( "StartTime", call.startTime() ); setting.setValue( "EndTime", QDateTime() ); setting.setValue( "Contact", call.contact().toString() ); setting.setValue( "ServiceType", call.callType() ); setting.endGroup(); setting.endGroup(); setting.sync(); // make sure the data is written to disk ::sync(); }