Q: kconfig without kaboutdata behavior

Harald Sitter sitter at kde.org
Thu Apr 3 10:32:31 UTC 2014


On Thu, Apr 3, 2014 at 12:30 PM, Alex Merry <alex.merry at kde.org> wrote:
> On 03/04/14 09:34, Harald Sitter wrote:
>> ahoy,
>>
>> I just wanted to ask whether it is still mandatory to have a
>> KAboutData instance set to have classes such as KConfigShared work in
>> a convenient fashion (e.g. KConfigShared::openConfig() will open the
>> applications config as long as qapp::applicationName is set).
>>
>> In my particular case the phonon platform plugin in 4.x times manually
>> injected a KComponentData instance in pure qapplications in order to
>> use KConfigShared::openConfig().
>
> It won't use KAboutData directly.  Instead, it uses
> QCoreApplication::applicationName() (which is set by KAboutData when you
> pass it to KAboutData::setApplicationData()).
>
> Note that you can also use KConfig::setMainConfigName() to override the
> default configuration file name.

Sweet, thank you.

HS


More information about the Kde-frameworks-devel mailing list