[Kde-pim] [PATCH] Storing of free/busy URLs in contacts

Tobias Koenig tokoe at kde.org
Thu Feb 14 16:07:15 GMT 2008


On Thu, Feb 14, 2008 at 11:13:56AM +0100, Steve Wolter wrote:
> Tobias Koenig schrieb:
> 
> Hi Tobias,
Hej Steve,

> > > Thanks for the patch, Steve, I'll have a look at it today. :)
> > Please rename the methods in the KABC code to something meaningfull.
> 
> I've replaced the short RFC 2739 terms by the long ones.
> Patch is attached.
Yes, much better :)

> Index: kaddressbook/freebusywidget.cpp
> ===================================================================
> --- kaddressbook/freebusywidget.cpp	(revision 774118)
> +++ kaddressbook/freebusywidget.cpp	(working copy)
> @@ -60,7 +60,11 @@
>    if ( addr->preferredEmail().isEmpty() )
>      return;
>  
> -  mURL->setUrl( KCal::FreeBusyUrlStore::self()->readUrl( addr->preferredEmail() ) );
> +  if ( ! addr->freeBusyURI().isEmpty() )
> +    mURL->setUrl(addr->freeBusyURI());
                   ^^^ spaces between brackets, please

>  void FreeBusyWidget::storeContact( KABC::Addressee *addr )
> @@ -68,6 +72,8 @@
>    if ( addr->preferredEmail().isEmpty() )
>      return;
>  
> +  addr->setFreeBusyURI(mURL->url());
                        ^^^ dito

> --- korganizer/freebusymanager.cpp	(revision 774118)
> +++ korganizer/freebusymanager.cpp	(working copy)
> @@ -416,11 +416,17 @@
>    if ( !url.isEmpty() ) {
>      return KUrl( url );
>    }
> -  // Try with the url configurated by preferred email in kaddressbook
> +
> +  // Try with the url configurated by FBURL field or preferred email in kaddressbook
>    KABC::Addressee::List list= KABC::StdAddressBook::self( true )->findByEmail( email );
>    KABC::Addressee::List::Iterator it;
>    QString pref;
>    for ( it = list.begin(); it != list.end(); ++it ) {
> +    if ( ! (*it).fburi().isEmpty() ) {
                    ^^^ shouldn't it be renamed here as well?

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080214/111f7e6a/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list