-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122232/#review74802
-----------------------------------------------------------


Sorry, I just discovered an issue with this change as is.  If the global object 
is created before KConfig's Global object, a seg fault develops.  In this case, 
KConfig's global is created first avoiding the pain.  However, commenting out 
the noted line causes a seg fault in the tests.

I don't think we can assume people will know to create appropriate KConfig 
objects, so I'd like to avoid relying on this in the test to pass.  I'm not 
sure how we can force the creation of the global ahead of time.  My best 
thought would be some sort of global pointer to the QStringList, combined with 
some atomic pointer operations to create it.  Thoughts?

Otherwise, everything looked go to me.


autotests/ksharedconfig_in_global_object.cpp
<https://git.reviewboard.kde.org/r/122232/#comment51847>

    Line to comment out.  For the final version this should work without this 
line.


- Matthew Dawson


On Jan. 26, 2015, 3:11 a.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122232/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2015, 3:11 a.m.)
> 
> 
> Review request for KDE Frameworks and Matthew Dawson.
> 
> 
> Repository: kconfig
> 
> 
> Description
> -------
> 
> kconfig_in_global_object.cpp comes from kdelibs4support
> (after porting to Q_GLOBAL_STATIC)
> 
> ksharedconfig_in_global_object.cpp is new (but works with kdelibs4)
> and reproduces Albert's KgDifficulty testcase.
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt b91f754b705fc87bb8b729bea72fbb5f7d427ace 
>   autotests/kconfig_in_global_object.cpp PRE-CREATION 
>   autotests/ksharedconfig_in_global_object.cpp PRE-CREATION 
>   src/core/kconfig.cpp 782e9714521234a3e3d8f3a788967e5c9a40f38a 
> 
> Diff: https://git.reviewboard.kde.org/r/122232/diff/
> 
> 
> Testing
> -------
> 
> Both tests pass and the QCoreApplication::arguments warning (because called 
> after qApp is destroyed) is gone.
> 
> 
> Thanks,
> 
> David Faure
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to