Around two weeks ago, a bug about was reported in which Okular crashed when changing the color of highlighted text. After a bit of debugging i found that the bug was actually in kdelibs in the KColorButton class.
This is a class I had never looked internally so it was a bit hard to decide where to start looking for a fix. Then I decided to look at the git log and realized the last commit introduced by a fix for color selection not working correctly on double click.
I took my chances and saw that reverting that patch actually removed the crash, so now I knew where to look :-)
After a few minutes looking at the code i came up with a 3-line patch that fixed the crash and still made double click work correctly. I'm so awesome \o/
But that wasn't enough, I needed to *prove* I had fixed it, so i decided to create some tests, that was a bit harder since it involved "clicking" in buttons and stuff, but QTest to the rescue and a few hours later I had this nice unit test that will warn us if that breaks again :-)
So next time you fix a bug, unit test it! And don't complain it's graphical, that's no excuse!
And of course the tests run just fine in build.kde.org even if they show buttons/dialogs :-)
A blog about random things and sometimes about my work translating and developing KDE and anything
Showing posts with label kdelibs. Show all posts
Showing posts with label kdelibs. Show all posts
Thursday, February 07, 2013
Monday, September 24, 2012
Randa 2012: First Half of Awesomeness
Time passes fast when you are enjoying the great company and the great location that the Randa 2012 meeting provides.
It's been a busy time for me in the Education part of the meeting.
I've worked on the following items:
- Fix memory leak
- Make molecule downloading more user friendly
- Let kalzium open molecules both from command line and from clicking in the file manager
- Look and feel improvements to the calculator
And of course this is just the things that resulted in commits, between the various random things I've helped people around with their questions that fall inside my area of expertise, for example helped Frederik Gladhorn integrate the KDE translation system on the Qt AT SPI project so we can provide an even more polished accessibility solution to our users and also "chaired" the KDE Edu discussions whose results you can find in the Notes links at http://community.kde.org/KDEEdu/Sprint2012
And finally to get some relax I've also contributed to the soluttion of the puzzle containing last year's group photo

And also got photographed for next years puzzle ;-)

Thanks all that donated to the pledgie and made Randa 2012 happen!
And now back to Awesomeness!
It's been a busy time for me in the Education part of the meeting.
I've worked on the following items:
kdeedu
Kalzium
- Fix uninitialized memory use- Fix memory leak
- Make molecule downloading more user friendly
- Let kalzium open molecules both from command line and from clicking in the file manager
- Look and feel improvements to the calculator
Rocs
- Fix uninitialized memory useStep
- Fix uninitialized memory useWebsite
- Make it a bit more localization friendly (now we should not show images with text besides the KDE Edu logo)kdegames
Thanks to Ben we now have kdegames on jenkins, which made me fix some bugs there :)Killbots
- Make tests work without the game being installedkmahjongg
- Fix compilation when libkmahjongg is not installed in default folderskshisen
- Fix compilation when libkmahjongg is not installed in default folderskdelibs
- Fix a bug with menubars when editing toolbarsl10n-kde4
- Regular tasks of moving files aroundAnd of course this is just the things that resulted in commits, between the various random things I've helped people around with their questions that fall inside my area of expertise, for example helped Frederik Gladhorn integrate the KDE translation system on the Qt AT SPI project so we can provide an even more polished accessibility solution to our users and also "chaired" the KDE Edu discussions whose results you can find in the Notes links at http://community.kde.org/KDEEdu/Sprint2012
And finally to get some relax I've also contributed to the soluttion of the puzzle containing last year's group photo

And also got photographed for next years puzzle ;-)
Thanks all that donated to the pledgie and made Randa 2012 happen!
And now back to Awesomeness!
Subscribe to:
Posts (Atom)