ChaniBlog











{July 18, 2009}   gsoc week 8: config and new plugins

I cleaned up the plugin config thing from last week – it’s not pretty but it works. I also, implemented all the API review stuff. the only thing I’m unhappy about is having one function that takes a QEvent – the problem is that it has to be as generic as possible because I can’t add more virtual functions later, but this results in the same boring code being copy&pasted into every plugin to check which kind of event it is and send it to an event-specific function. :/

anyways, I got away from all that today and had some fun writing new plugins. :) there’s one to switch activities that’s implemented almost the same as switching desktops. it’s so much easier to use actvities now… although it highlights the inconvenience of setting the same plugin on every activity…
I ran across a few bugs related to containment types, too – hopefully we can get fixes for that into 4.3.

I also started on a zoom plugin, but got annoyed when I found out Containment’s zoom functions were actually Q_PRIVATE_SLOTs, which means I can’t use them… and all the zoom stuff is implemented in DesktopView anyways, and I’m not sure how I’m going to find out the current zoom level… I mean, I’m sure I could hack something in, but it feels icky. so I’m probably going to sleep on it, and finish that plugin in the morning.

ahhh, it feels nice to be back on schedule. :) hard to believe there’s only a few weeks left, though.



Esben Mose Hansen says:

Can’t you use a sginal for the function that takes a QEvent, instead of doing it by virtual functions? That way, you can keep binary compability even if you add new variants. Just a thought.

Alternatively, if you can live with the overhead, you could keep the QEvent function, but also provide some “common” specializations directly. It should be that costly. Again, just thought, discard or use as you deem appropriate. Happy coding!



Chani says:

huh. that sounds like a really good idea. :) thanks!



hm says:

“although it highlights the inconvenience of setting the same plugin on every activity…”

a “copy activity”-button would come in handy here



Chani says:

yeah, I’ve wanted a clone button for some plasmoids too…



Comments are closed.

et cetera
%d bloggers like this: