Mentor
|
[size=x-large] Fixing ksnapshot bugs[/size]
For this kourse I am looking for five students who want to work with me on fixing five ksnapshot bugs. The fixes should go into upcoming KDE 4.2 release. My plan is that each of the five students is working on one bug. If it does not fit, it is also ok. This is my first try to prepare a kourse for the klassroom. You should be fine with C++ to read the code. Questions about Qt4 and KDE4 specific issues can be discussed here. But if you have no experience with Qt4/KDE4 you should take a look at the tutorials at Trolltech and KDE. If you have no experience in programming, you can help with investigating some of these bugs or other bugs in ksnapshot and discuss them here and on bugs.kde.org. [size=medium]Why ksnapshot?[/size] I choose ksnapshot, because it is a comparatively small application. It is often very difficult to understand the code from an other project. With this project you should get an overview quickly. [size=x-large] Preparation[/size] [size=medium]If you are using <= KDE 4.1.3[/size]
Choose one or more from the following five bugs you want to work on. Read the description and the comments on the bko (bugs.kde.org) page and try to reproduce it with the ksnapshot version from trunk. You should also register at bko to be able to write comments.
Last edited by sayakb on Fri Jan 02, 2009 5:48 pm, edited 1 time in total.
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size] |
Alumni
|
I'll take #2:
Bug 106679: KSnapshot should offer anyname010.png after saving anyname009.png There are other counting issues in the comments of this bug report. EDIT: Found a function that does the renaming void KSnapshotObject::autoincFilename() Now the hard part, the logic behind renaming [hr] Well, it seems that most of the bug had already been fixed. The only thing that can possibly be a bug is a transition from name09 → name10 (or name099 → name100). Shall I try to fix this?
Last edited by jernejovc on Sat Dec 27, 2008 4:51 pm, edited 1 time in total.
|
Administrator
|
Seems to work already, ksnapshot offers name10 after name09.
|
Alumni
|
Sorry, I meant name09→name010 (if there is 0 before the number 0 stays).
|
Administrator
|
Here, I get name09 -> name10. So it looks fixed. And so is #3 and #4. We'll try to come up with more valid ones.
|
Alumni
|
patch for "5. Bug 175186: Timer rectangle is too small"
Last edited by dhanasekar on Sat Dec 27, 2008 7:17 pm, edited 1 time in total.
|
KDE Developer
|
okay I'll take this one
Bug 174181: Can't exit of KSnapshot zone selection Bug 160880: Alt-Tab while in region capture mode prevents exit Can't exit out of KSnapshot zone selection even if you don't alt-tab. Tested it and had to alt+ctrl+del to get out of it Edit:Apparently 174181 is invalid. Because when I'm selected region it accepts the snapshot perfect. However when I perform bug 160880 that does happen. The only way to get out I found is just to double click the mouse a heck of alot and it will break out of it selecting some borders edge. But I'm not able to reproduce 174181 with the latest svn (4.1.86).
Last edited by ComaWhite on Sat Dec 27, 2008 10:11 pm, edited 1 time in total.
|
Alumni
|
alternative patch for "5. Bug 175186: Timer rectangle is too small"
ok I looked at dhanasekar's patch but its a rather simplistic solution. 1) The resize's width is still hardcoded, it was simply given a higher number. --a) thus desktops with bigger fonts may still not see 'seconds'. --b) you never know the width of the foreign language text it might be translated to, so ... 2) The text is set to wrap(from the original code) but the height is fixed. This patch set it to Qt::TextSingleLine. At least part of the word will show even if the width is not wide enough or else the whole 'seconds' word will not show. (may not matter now) 3) Tested this patch with big wide fonts and seems to work each time. Patch resizes not only the width but the height of the text also (no potential bug now).
Last edited by Linex on Sun Dec 28, 2008 2:23 am, edited 1 time in total.
Alsagoff, proud to be a member of KDE forums since 2008-Dec.
|
KDE Developer
|
Hmm I've been at the first bug for over a few hours. And I've tried handling
the eventFilter on QEvent::ActivationChanged. I've tried always keeping focus, or when lost even back focus. I've tried it in many places. And still won't give focus back. The only way we to ignore Tab/Alt but thats a cheap hack to fix it. But I'm really stumped on it. |
Mentor
|
That looks good. But you should use an i18n call to translate the pluralText in the constructor.[hr]
Couldn't we stop snapshotting when the user presses ALT-Tab. What could be a reasen for the user to switch windows while taking a snapshot.[hr]
How could you reproduce #3. I thought the hotkey subsystem does not work with KDE 4.2. Another question for #3 is, whether it is useful to have several instances. Because to have several instances could be error prone.[hr] Because some bugs have already been fixed, I added some wishes which could be implemented for KDE 4.4.
Last edited by msoeken on Sun Dec 28, 2008 11:36 am, edited 1 time in total.
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size] |
KDE Developer
|
Well also there should really be no reason to alt-tab when doing region selection anyways or even screen capturing period imho. But I don't want to code something and it not be the way the developers want their project done that way. Edit: Missing quote bb end tag
Last edited by ComaWhite on Sun Dec 28, 2008 12:30 pm, edited 1 time in total.
|
Mentor
|
Then this should be discussed either in bugs.kde.org or with Richard, the maintainer, directly. I will write him an email. Perhaps he is also interested in joining this thread. [size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size] |
Alumni
|
ok, I use an i18n call to translate the pluralText in the constructor. Since paintEvent() below will use pluralText, I only i18n it in resize(). it Here is the revised patch.
Alsagoff, proud to be a member of KDE forums since 2008-Dec.
|
Alumni
|
Ok, I'll take the infinite fork loop bug. (which isn't really a problem with forking processes)
Function keys in general work the same as ordinary letters - even in non-KDE applications like Firefox. Push the print-screen button and hold it to get potentially hundreds of ksnapshot instances, same with F1 and the firefox help page, etc. It's a common problem that should be IMHO solved upstream. There were several bugs in X.org/kernel that caused normal keys to get stuck in the 'down' position. These could wery well be contributing to the problem (or have been, I can't trigger this anymore). I remember having a similar problem with DosBox a few months back. Some possible fixes:
I'll try doing both |
KDE Developer
|
okay I figured out why. I documented it in comments so it explains why and what not.
Last edited by ComaWhite on Mon Dec 29, 2008 6:38 am, edited 1 time in total.
|
Registered users: Bing [Bot], Google [Bot], kesang, Sogou [Bot], Yahoo [Bot]