balooctl, baloosearch, balooshow: Fix order of QCoreApplication object creation
ClosedPublic

Authored by alexeymin on Apr 19 2017, 7:30 PM.

Details

Summary

QCoreApplicaion object should exist at the moment when KAboutData::setApplicationData() is called. And it should be created even before KAboutData object.

BUG: 378539

Test Plan

As was mentioned in bug, swapping those two lines and recompiling resolves the issue. No warning displayed anymore.

Diff Detail

Repository
R293 Baloo
Lint
Lint Skipped
Unit
Unit Tests Skipped
alexeymin created this revision.Apr 19 2017, 7:30 PM
alexeymin retitled this revision from Fix order of QApplication object creation to balooshow: Fix order of QApplication object creation.Apr 19 2017, 7:39 PM
alexeymin edited the test plan for this revision. (Show Details)
alexeymin added a reviewer: aacid.
ltoscano requested changes to this revision.Apr 19 2017, 7:44 PM
ltoscano added a subscriber: ltoscano.

Please move the QCoreAddons creation before the KAboutData (line ~55).

This revision now requires changes to proceed.Apr 19 2017, 7:44 PM
alexeymin updated this revision to Diff 13613.Apr 19 2017, 8:02 PM
alexeymin edited edge metadata.

Moved QCoreApplication object creation before KAboutData object creation.

But, in neighbour directories, src/tools/ baloosearch and balooctl also have this problem then - QCoreApplication object is created right before KAboutData::setApplicationData() call.
Ex.: https://cgit.kde.org/baloo.git/tree/src/tools/baloosearch/main.cpp#n45

Would you mind to extend the fix to all applications mentioned?

alexeymin updated this revision to Diff 13615.Apr 19 2017, 8:12 PM

Fixed this also in balooctl and baloosearch.

Can you please update the commit message as well?

alexeymin retitled this revision from balooshow: Fix order of QApplication object creation to balooctl, baloosearch, balooshow: Fix order of QCoreApplication object creation.Apr 19 2017, 8:15 PM
alexeymin edited the summary of this revision. (Show Details)
ltoscano added inline comments.Apr 19 2017, 8:23 PM
src/tools/balooctl/main.cpp
68

small nit: remove the whitespaces here

src/tools/baloosearch/main.cpp
39

blanks here too

src/tools/balooshow/main.cpp
56

blanks

alexeymin updated this revision to Diff 13616.Apr 19 2017, 8:28 PM

Removed spaces at the beginning of the blank line

ltoscano accepted this revision.Apr 19 2017, 8:30 PM

Thanks! Do you have a developer account (aka: can you commit it possibly with arcanist)?

This revision is now accepted and ready to land.Apr 19 2017, 8:30 PM
This revision was automatically updated to reflect the committed changes.