Changed the order of initialization for the statistics window.
AcceptedPublic

Authored by kirschner on Sat, Nov 2, 12:11 PM.

Details

Reviewers
ognarb
Group Reviewers
KDE Edu
Summary

If a file with more than two languages was loaded and a language with an index larger than 1 was selected in the practice window "learning language" combobox, the program crashed due to a segmentation fault. This was because the check if the index loaded from the settings was performed after the first access of the checked variable.

BUG: 413720

Test Plan

Tested manually

Diff Detail

Repository
R340 Parley
Branch
Fixed-Wrong-Statistics-Window-Initialization (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18444
Build 18462: arc lint + arc unit
kirschner created this revision.Sat, Nov 2, 12:11 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptSat, Nov 2, 12:11 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
kirschner requested review of this revision.Sat, Nov 2, 12:11 PM
ognarb added a subscriber: ognarb.Sat, Nov 2, 12:12 PM
ognarb added inline comments.Sat, Nov 2, 12:27 PM
src/statistics/statisticsmainwindow.cpp
26

Need to be removed now ;)

kirschner updated this revision to Diff 69189.Sat, Nov 2, 12:47 PM
  • Removed unnecessary header
ognarb accepted this revision.Fri, Nov 15, 5:21 PM

The change looks good. I will merge it tomorrow if nobody complains :)

This revision is now accepted and ready to land.Fri, Nov 15, 5:21 PM
aacid added a subscriber: aacid.Fri, Nov 15, 9:56 PM

parley has some autotests, not sure how extensive they are (probably not much)

it would be great if they could be extended so that we don't ever regress this feature if some refactoring is done.

But if you think it's too hard writing a test is too hard i guess we can live without it.