Port Kalzium away from KDialog KFileDialog and deprecated KRun::runUrl
ClosedPublic

Authored by yurchor on Sep 30 2018, 2:01 PM.

Details

Summary

Some things are deprecated now so it can be worth to port from them.

Test Plan
  1. Use "File->Convert chemical files..." and "Add" button to test the port from KDialog and KFileDialog.
  2. Use tools from the "Tools" menu (esp. "Molecular Editor" and the "Load Molecule" button).
  3. Double-click on the element in the table and switch to the "Extra information" tab to test the runUrl port.
  4. Everything should work as in the unported version.

Diff Detail

Repository
R326 Kalzium
Lint
Lint Skipped
Unit
Unit Tests Skipped
yurchor created this revision.Sep 30 2018, 2:01 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptSep 30 2018, 2:01 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
yurchor requested review of this revision.Sep 30 2018, 2:01 PM
apol added a subscriber: apol.Sep 30 2018, 4:52 PM

+1 good job!

src/tools/obconverter.cpp
257

Indentation is 4 spaces elsewhere.

yurchor updated this revision to Diff 42613.Sep 30 2018, 5:00 PM

Fix indentation and includes

yurchor updated this revision to Diff 42619.Sep 30 2018, 6:08 PM

Fix whitespaces

yurchor marked an inline comment as done.Sep 30 2018, 6:09 PM

Hi again,

What can I fix in this revision to make it acceptable?

Thanks in advance for your reviews.

cfeck accepted this revision.Oct 17 2018, 10:58 PM
cfeck added a subscriber: cfeck.

Such big changes are hard to review. We used to do KF5 porting step by step, i.e. replace one include or one class in a single commit.

Regarding the new connect() calls, could they get converted to new style connects?

This revision is now accepted and ready to land.Oct 17 2018, 10:58 PM

Such big changes are hard to review. We used to do KF5 porting step by step, i.e. replace one include or one class in a single commit.

Sorry for such big changes. The only excuse that they are purely routine (almost the results of the automatic conversion) not saying about three major points:

  1. Correct connections for userButtons.
  2. Correct help invocation (it is only possible to open the main page of Kalzium help page, but it's a KF5 kiohelp bug).
  3. Correct opening of molecule files by Avogadro viewer.

If those three are acceptable the whole patch must be at least close to acceptable.

That's why I decided to make just one patch from this.

If you think that it is better to split this patch for further reviewing I can do this.

Regarding the new connect() calls, could they get converted to new style connects?

Sure. Should be done in the next iteration. Should there are no objections to the new patch version (tested again locally) I can commit it on Sunday (2018-10-21).

Thanks again for your reviews.

yurchor updated this revision to Diff 43867.Oct 18 2018, 1:43 PM

Rewrite connect() in the new style where I touched the code, a couple of minor tweaks.