Review Request 128236: Better fix for version dialog contents and startup warnings

Ignacio R. Morelle shadowm2006 at gmail.com
Sun Jun 19 07:15:00 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128236/
-----------------------------------------------------------

(Updated June 19, 2016, 7:15 a.m.)


Review request for Choqok.


Changes
-------

Minor formatting bit I missed in the previous revision, oops.


Bugs: 364408
    http://bugs.kde.org/show_bug.cgi?id=364408


Repository: choqok


Description
-------

In /r/128220, while my change does fix the About dialog contents being missing, it does so by introducing new non-fatal errors during application startup:

```
% choqok --version
org.kde.choqok: Choqok  1.5.80
kf5.kcoreaddons.kaboutdata: Could not initialize the equivalent properties of Q*Application: no instance (yet) existing.
org.kde.choqok:
kf5.kcoreaddons.kaboutdata: QCoreApplication::applicationVersion "" is out-of-sync with KAboutData::applicationData().version "1.5.80"
kf5.kcoreaddons.kaboutdata: QCoreApplication::organizationDomain "kde.org" is out-of-sync with KAboutData::applicationData().organizationDomain "gnufolks.org"
kf5.kcoreaddons.kaboutdata: QGuiApplication::desktopFileName "" is out-of-sync with KAboutData::applicationData().desktopFileName "org.gnufolks.choqok"
org.kde.choqok:
org.kde.choqok:
org.kde.choqok:
org.kde.choqok.lib:
choqok 1.5.80
org.kde.choqok.lib: Destructing plugin manager without going through the shutdown process!
```

After looking more into how other KDE applications set up their KAboutData structure, I realized that the original QApplication(ChoqokApplication)/KAboutData initialization order was correct. The correct cause of the version info dialog coming up empty seems to be the MainWindow instance being created in the ChoqokApplication constructor before registering the KAboutData.

So the proposed fix does involve some refactoring to be able to postpone the construction of the MainWindow until the KAboutData is registered from main(). I believe it's safe to postpone it until after all command line processing and config migration is out of the way.

Additionally (and this is important), the new patch explicitly sets the organization domain to kde.org in the KAboutData to match the original QApplication data set in the ChoqokApplication ctor, as well as the D-Bus info. Previously, KAboutData was defaulting to gnufolks.org as per the homePageAddress parameter to its ctor. The QApplication data is also now made to explicitly match the KAboutData.

`--version` output with the new patch applied:

```
% choqok --version
org.kde.choqok: Choqok  1.5.80
org.kde.choqok:
choqok 1.5.80
```

(Worth noting that my experience with Qt thus far is mostly from the Qt 4 times, and I'm new to working with the KDE codebase. Also, sometimes Choqok segfaults on exit for reasons unrelated to either patch. I will report a bug for this separately.)


Diffs (updated)
-----

  choqok/choqokapplication.h 2e0f2c3 
  choqok/choqokapplication.cpp 50fc9cd 
  choqok/main.cpp 40c0e16 

Diff: https://git.reviewboard.kde.org/r/128236/diff/


Testing
-------

* Built and ran choqok, both without any command line arguments, or passing either --version or --help.


File Attachments
----------------

choqok-version-dialog-fix-v2.1.diff
  https://git.reviewboard.kde.org/media/uploaded/files/2016/06/19/45192a57-420c-4d64-9c41-7532c331d556__choqok-version-dialog-fix-v2.1.diff


Thanks,

Ignacio R. Morelle

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/choqok-devel/attachments/20160619/80a79741/attachment.html>


More information about the Choqok-devel mailing list