Q: kconfig without kaboutdata behavior
Alex Merry
alex.merry at kde.org
Thu Apr 3 10:30:22 UTC 2014
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.
Alex
More information about the Kde-frameworks-devel
mailing list