[Kde-pim] [patch] kdepim fixes for msvc 2k3+

Marc Mutz marc at klaralvdalens-datakonsult.se
Sat Dec 8 10:31:58 GMT 2007


On Saturday 08 December 2007 01:42, Jarosław Staniek wrote:
> -    mResult = GpgME::KeyListResult( 0, err );
> +    mResult = GpgME::KeyListResult( 0, err.toErrorCode() );
>      return err;

Please make GpgME::*Result take a GpgME::Error instead, to minimize the 
changes to external code.

> Index: libkleo/backends/chiasmus/chiasmusjob.cpp
> ===================================================================
> --- libkleo/backends/chiasmus/chiasmusjob.cpp   (revision 746135)
> +++ libkleo/backends/chiasmus/chiasmusjob.cpp   (working copy)
> @@ -103,7 +103,8 @@
>  
>    LaterDeleter d( this );
>  
> -  if ( const GpgME::Error err = setup() )
> +  const GpgME::Error err = setup();
> +  if ( err )
>      return mError = err;

Veto. There must be a better way. 2k3 is pretty conforming, afair, I'm very 
surprised it doesn't manage to compile these declarations. Please find the 
real reason for the compiler breakage, instead of this ugly band-aid.

> +#undef max

There's a well-know fix for this, it's to define NOMINMAX, documented e.g. 
here:
  http://support.microsoft.com/kb/143208
I suggest you add that globally to the build system, instead of fixing it 
locally.

Thanks,
Marc

-- 
Marc Mutz -- marc at klaralvdalens-datakonsult.se, mutz at kde.org
Klarälvdalens Datakonsult AB, Platform-independent software solutions
_______________________________________________
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