First progress!

krishna_ggk's picture

Yay!!
I could complete my first round of the GraphicsView port of umbrello after ~15 days of hard work. My morale was low until now because, i was not able to commit anything.
The quote “no commit means no work” which i read somewhere in GSoC docs was banging my head. I made my mind strong and worked for about 16hrs a day for the last two days which beared fruits in the end. Usually the port kind of work takes longer time than expected as it involves lots of files.

The good news is I got umbrello compiling and also some bits of the diagram tools working. Umbrello is now free from QCanvas based code ! There are tons of int-qreal, QRect-QRectF and QPoint-QPointF changes. Screenshot at this stage is useless!

I have to attribute part of my success to emacs, which helped me simplify repetitive work by using simple keyboard macros. That feature is so simple yet extremely powerful!

Of course i still have lots to do. There is simply no direct mapping for QCanvas to QGraphicsView technology. Infact all the book keeping and manual mouseEvent mapping code has to be scrapped as GraphicsView does it in best way.

I had two options to continue with my project

1) Get all the diagram widgets working by least modification, that is forcefully fit the code to GV framework.

2) Redesign the base-foundation classes like UMLWidget(not a QWidget), UMLScene.. and then port the remaining widgets to use this robust base classes later.

I being brave, chose the option 2 :-)
I am designing new classes like NewUMLWidget which will become UMLWidget soon. This way i don’t have to port other widget subclasses now (smart right ? ;-) )

On the other side of development, I also did my first ever bug fix within umbrello.
The bug was nasty, resulting in displaced partial fonts throughout the umbrello gui(menu/toolbars..). The strange thing was, the bug showed up only when not using default font that comes with kde4. Rafael challenged me to fix it on #umbrello for a chocolate box ;)

Here is a snapshot of the buggy display

I by looking at screenshot immediately knew that it was because of creation of QFont object before creation of QApplication object. I knew it because, i had faced exactly same situation in the qucs-port. Indeed there was a global object of a state structure which had QFont objects in it.
The first fix to my branch was to create my own singleton class, but then later Rafael mention K_CONFIG_STATIC. Using that code was way simple and I committed the fix to trunk as well :)

I am happy for seeing so many positives , that too on a single day. :-) I hope it continues :)
My next objective is to perform well in my exams.
Practical exams are due on 9th and 11th of this month and
Theory subjects are between 24th june to 5th july.

Organization: KDE Original: Source