Fix app initialization order
ClosedPublic

Authored by kossebau on Mar 7 2018, 2:05 AM.

Details

Summary

Patch inlines the code of the constructor and destructor of the old
QApplication subclass PolicyKitKDE and then reorders things as needed:

  • KDBusService for singleton run should be started before any further init
  • KLocalizedString::setApplicationDomain & i18n calls should be only done after the QApp instance has been created
  • KAboutData::setApplicationData best done before doing any D-Bus activity as that relies on app metadata
  • QCoreApplication::setOrganizationDomain duplicates app metadata setting from KAboutData::setApplicationData, only needed before due to latter done after first D-Bus activity
  • m_listener->deleteLater() in app destructor does not make sense, as the listener object is deleted due to being QObject child of the QApplication instance

Diff Detail

Repository
R121 Policykit (Polkit) KDE Agent
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Mar 7 2018, 2:05 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 7 2018, 2:05 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kossebau requested review of this revision.Mar 7 2018, 2:05 AM
davidedmundson accepted this revision.Mar 20 2018, 4:37 PM
This revision is now accepted and ready to land.Mar 20 2018, 4:37 PM
This revision was automatically updated to reflect the committed changes.