[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-release-team
Subject:    Re: branches/KDE/4.2/kdepimlibs/kresources
From:       Volker Krause <vkrause () kde ! org>
Date:       2009-05-01 9:04:24
Message-ID: 200905011104.43157.vkrause () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 29 April 2009 09:54:00 André Wöbbeking wrote:
> SVN commit 960819 by woebbe:
>
> Don't leak KConfig in self().

good catch, but...

> Now only the factories are leaked :-(
>
>  M  +2 -2      factory.cpp
>
>
> --- branches/KDE/4.2/kdepimlibs/kresources/factory.cpp #960818:960819
> @@ -73,8 +73,8 @@
>      mSelves->insert( resourceFamily, factory );
>
>      // Akonadi migration
> -    KConfig *config = new KConfig( "kres-migratorrc" );
> -    KConfigGroup migrationCfg( config, "Migration" );
> +    const KConfig config( "kres-migratorrc" );

... the const here makes the following KConfigGroup read-only and assert as 
soon as we write to it. The result is that every user of the KResource API 
(most of kdepim, but also eg. kopete, konversation and krunner) will crash 
immediately on starting for new users. Rather bad as this apparently went 
into 4.2.3.

The fix is easy (remove the const) and will be applied to trunk and the 4.2 
branch shortly and should go into 4.2.3 if possible.

> +    KConfigGroup migrationCfg( &config, "Migration" );
>      const bool enabled = migrationCfg.readEntry( "Enabled", false );
>      const bool setupClientBrige = migrationCfg.readEntry(
> "SetupClientBridge", true ); const int currentVersion =
> migrationCfg.readEntry( "Version-" + resourceFamily, 0 );

regards
Volker

["signature.asc" (application/pgp-signature)]

_______________________________________________
release-team mailing list
release-team@kde.org
https://mail.kde.org/mailman/listinfo/release-team


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic