On Donnerstag, 18. Juni 2015 14:50:45 CEST, Jeremy Whiting wrote:
Jaroslaw,

On Thu, Jun 18, 2015 at 3:20 AM, Jaroslaw Staniek <stan...@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()); ...

That may be, but if using QApplication instead of KApplication they
are needed.


The point is that KAboutData::setApplicationData() already does:

 899 void KAboutData::setApplicationData(const KAboutData &aboutData)
 900 {
 901     if (s_registry->m_appData) {
 902         *s_registry->m_appData = aboutData;
 903     } else {
 904         s_registry->m_appData = new KAboutData(aboutData);
 905     }
906 907 QCoreApplication *app = QCoreApplication::instance();
 908     if (app) {
 909         app->setApplicationVersion(aboutData.version());
 910         app->setApplicationName(aboutData.componentName());
 911         app->setOrganizationDomain(aboutData.organizationDomain());
 912         app->setProperty("applicationDisplayName", 
aboutData.displayName());
 913     }
 914 }


So if you use KAboutData (you don't have to) you can skip setting the 
application data on QApplication since KAboutData does that for you.

Cheers,
Thomas

Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to