Notes to developers: what KAboutData::setApplicationData() is
Jaroslaw Staniek
staniek at kde.org
Thu Jun 18 10:27:12 UTC 2015
(I am sorry, forgot to include kde-devel too)
On 18 June 2015 at 11:20, Jaroslaw Staniek <staniek at kde.org> wrote:
> Hi
> If you look at apps ported to KF5, KAboutData::setApplicationData() is
> used but there are also redundant lines in main(), at least these:
>
> app.setApplicationName(aboutData.componentName());
> app.setApplicationDisplayName(aboutData.displayName());
> app.setOrganizationDomain(aboutData.organizationDomain());
> app.setApplicationVersion(aboutData.version());
>
> Note, this is already performed by KAboutData::setApplicationData().
>
> For example Kate --
> http://lxr.kde.org/source/kde/applications/kate/kate/src/main.cpp
>
> For the list see
> http://lxr.kde.org/search?_filestring=&_string=setApplicationDisplayName
>
> Sometimes there are even deeper duplication of names, e.g. despite of
> using KAboutData there's also:
>
> QApplication::setApplicationName("kanagram");
>
> -- http://lxr.kde.org/source/kde/applications/kate/kate/src/main.cpp
>
> If I am right, this is a note for developers to fix that -- KAboutData
> was designed to make main() easier but actually main() looks
> unnecessary complicated for a number of KDE apps. Looks like people
> take another app's code as a template and copy it :)
>
> No idea if more general improvement could be an addition to the
> apidocs of a crazy check.
>
> --
> regards, Jaroslaw Staniek
>
> KDE:
> : A world-wide network of software engineers, artists, writers, translators
> : and facilitators committed to Free Software development - http://kde.org
> Calligra Suite:
> : A graphic art and office suite - http://calligra.org
> Kexi:
> : A visual database apps builder - http://calligra.org/kexi
> Qt Certified Specialist:
> : http://www.linkedin.com/in/jstaniek
--
regards, Jaroslaw Staniek
KDE:
: A world-wide network of software engineers, artists, writers, translators
: and facilitators committed to Free Software development - http://kde.org
Calligra Suite:
: A graphic art and office suite - http://calligra.org
Kexi:
: A visual database apps builder - http://calligra.org/kexi
Qt Certified Specialist:
: http://www.linkedin.com/in/jstaniek
More information about the Kde-frameworks-devel
mailing list