Svens Blog

Things that really matter...
...at least for me ;-)
September 2010
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
2627282930
< Aug   Oct >

[Recent Entries]
[Entry Index]

Administration
[Login]
Recent Entries
Topics
Andere Blogs
RSS 2.0 Feed

Valid CSS!
Valid XHTML 1.0!
Valid RSS!

No software patents!
Campaign for a Non-Browser Specific WWW
darkerradio - DIE Alternative im Netz - Tune In, Turn On, Burn Out
Some rights reserved
Aktion UBERWACH!
Play Ogg!
  GSoC status update June/3
24. June 2009, 06:04PM
Posted By Sven Krohlas
Now the infrastructure for providing bindings exlusively for test scripts in debug builds is in place. This required some CMake magic to set a preprocessor variable DEBUG in debug builds which then can be used in various #ifdefs to make public slots out of public object members, which then can be accessed from scripts. In the beginning the idea was to do this more elegantly, by putting the slot definitions into other preprocessor defines, like AMAROK_DEBUG_EXPORT. This way a lot of #ifdefs could be saved and the code would be much better to read. Sadly the moc preprocessor required to offer the bindings doesn't understand many commands and #define is one of those it lacks. So now you might stumble upon things like:
#if defined(DEBUG)
  public slots:
#else
  public:
#endif
Sorry, I couldn't find a less ugly way currently.
With that working I started adding bindings to Amarok classes to the script engine for test scripts. Playlist::Actions, Playlist::Controller, PlaylistManager and Meta:TrackPtr are there now. The next problem I stumbled upon was that some more classes have to be known to scripts to write reasonable tests. Currently I'm about to provide a prototype for KUrl, which doesn't work yet, but I think I know what went wrong there.

As of this writing I'm sitting in the train to LinuxTag in Berlin, where I'll be until Saturday, but hopefully some code can nevertheless be written. Feel free to visit our booth or one of our talks and workshops.
Comment
Name: (Required)
Email: (Notification Only)
Website: (Optional)
Remember Me
Comment:  


Allowed Tags: <em><i><b><strong><br><code><pre><ol><ul><li>
  Auto Break