[Kde-pim] KDE/kdepim/runtime

Kevin Krammer kevin.krammer at gmx.at
Tue Jun 1 09:03:19 BST 2010


On Tuesday, 2010-06-01, Casey Link wrote:
> SVN commit 1133037 by link:
> 
> Make the IMAP resource store its encryption setting as a string, rather
> then an integer representation of an enum.
> 
> THIS WILL BREAK YOUR CURRENT IMAP SETUPS!
> 
> Short rationale: "SSL" is more understandable than "1"
> Longer rationale:  There are two enums used to
> represent encryption settings in kdepim, each with different values and
> orders. The result was hell whenever you had to reference the enum by
> integer value (like in javascript). Storing it as a String makes it
> easier and removes all ambiguity as to what the value represents.
> 
> CCMAIL: kde-pim at kde.org
> 
>  M  +3 -3      migration/kmail/kmailmigrator.cpp
>  M  +7 -1      resources/imap/imapaccount.cpp
>  M  +2 -2      resources/imap/imapresource.kcfg
>  M  +24 -2     resources/imap/setupserver.cpp
>  M  +7 -5      resources/imap/wizard/imapwizard.js
> 
> 
> --- trunk/KDE/kdepim/runtime/migration/kmail/kmailmigrator.cpp
> #1133036:1133037 @@ -353,11 +353,11 @@
>    iface->setImapPort( config.readEntry( "port", 143 ) );
>    iface->setUserName( config.readEntry( "login" ) );
>    if ( config.readEntry( "use-ssl" ).toLower() == "true" )
> -    iface->setSafety( KIMAP::LoginJob::AnySslVersion );
> +    iface->setSafety( "SSL" );
>    else if ( config.readEntry( "use-tls" ).toLower() == "true" )
> -    iface->setSafety( KIMAP::LoginJob::TlsV1 );
> +    iface->setSafety( "STARTTLS" );


Aside from the things already noted by the other guys, why the inconsistency?
Why not STARTSSL orTLS?

And doing string<->enum mappings in several places manually instead of 
converter methods in LoginJob or an util namespace?

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100601/bfe8d3ec/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