config initialization

Andreas Pakulat apaku at gmx.de
Tue Nov 3 08:34:23 UTC 2009


On 03.11.09 03:11:05, Patrick Spendrin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> As I am unsure who to ask about this issue I will send this mail to the
> list:
> 
> In kdevelop/projectbuilders/cmakebuilder/cmakejob.cpp line 150ff the
> following code can be found:
> 
>     KSharedConfig::Ptr cfg = project->projectConfiguration();
>     KConfigGroup group(cfg.data(), "CMake");
>     ...
>     CMake::currentBuildType(project);
>     ...
> 
> The function CMake::currentBuildType() and its brethren effectively need
> the first two to initialize the project configuration file. When I
> removed those two lines KDevelop wouldn't be able to *store* any
> settings and would always tell me that the build directory hasn't been
> set. In that function you can find the following code:
> 
>     KConfigGroup cmakeGrp = project->projectConfiguration()->group("CMake");
>     return cmakeGrp.readEntry( currentBuildTypeKey, "Release" );
> 
> As I can't really tell apart those subtle differences, I wonder if you
> could give me some more hints?
> I know that this fix seems somehow academic, it needed me roughly a day
> of work to track it down though, so I'd like to see it fixed.

Sorry, I seem to be missing something, but why do you want to remove
those two lines? Do they cause some kind of bug?

Either way, I don't think there's supposed to be any kind of difference
between the KConfigGroup constructor and the ::group() member function
and if there is we should move this to kde-core-devel.

Andreas

-- 
You will probably marry after a very brief courtship.




More information about the KDevelop-devel mailing list