Flavio Castelli

Debugging my life

Dec 4, 2009 - 2 minute read - Comments - qt qjson

QJson: from QObject to JSON and vice-versa

Some days ago I introduced the possibility to serialize a QObject instance to JSON. Today I’m going to show you the opposite operation: initializing a QObject using a JSON object. I refactored a bit my latest changes: I created a new class called QObjectHelper that provides the methods required to convert a QObject instance to a QVariantMap and vice-versa. This class can be used in conjunction with the Serializer and Parser classes to serialize and deserialize QObject instances to and from JSON.

Nov 30, 2009 - 2 minute read - Comments - qt qjson

QJson: easier serialization of QObject instances to JSON

I have just committed into trunk a couple of changes that make easier to serialize a QObject instance to JSON. This solution relies on the awesome Qt’s property system. Suppose the declaration of Person class looks like this: {% codeblock [class definition] [lang:cpp ] %} class Person : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int phoneNumber READ phoneNumber WRITE setPhoneNumber) Q_PROPERTY(Gender gender READ gender WRITE setGender) Q_PROPERTY(QDate dob READ dob WRITE setDob) Q_ENUMS(Gender)

Sep 14, 2009 - 3 minute read - Comments - KDE

kaveau updates

Some weeks have passed since the announcement of kaveau. I’m really proud and happy about this project because I received a lot of positive feedback messages and it has been chosen as one of the best Hackweek’s projects. In the meantime I kept working on kaveau, so let me show you what has changed: rdiff-backup has been replaced by rsync. the setup wizard has been improved according to the feedback messages I received.

Sep 4, 2009 - 1 minute read - Comments - qjson qt

Using QJson under Windows

Recently lots of people asked me how to build QJson under Windows. Most of them reported build/link errors, so I decided to try personally. The good news is that QJson can be successfully built under Window, I can show you proof ;) {% img /images/qjson/qjson_windows_1.png %} {% img /images/qjson/qjson_windows_2.png %} I have written the build instructions on QJson website: just take a look here. One last note: if you have problems with QJson please subscribe to the developer mailing list and post a message.

Jul 28, 2009 - 3 minute read - Comments - KDE

kaveau: easy and integrated backups solution for KDE

During the last week I had the possibility to work on anything I wanted, Novell’s hackweek is so cool :) I decided to dedicate myself to an idea that has been obsessing me since a long time. Last December my brand new hard disk suddenly died, making impossible to recover anything. Fortunately I had just synchronized the most important documents between my workstation and my laptop, so I didn’t lose anything important.

Jul 23, 2009 - 1 minute read - Comments - KDE qt qjson

New QJson release

Gran Canaria Desktop Summit has been great and really productive. I had the pleasure to meet people interested in QJson, chat with them but also hack with them. In fact we hacked a lot, doing lots of changes to QJson: the API has been cleaned, now it can be considered stable unicode support has been completely rewritten it’s now possible to convert QVariant objects into JSON ones So it’s with a great pleasure that I announce the release of QJson 0.

Jun 30, 2009 - 1 minute read - Comments - KDE qt qjson

QJson at Gran Canaria Desktop Summit

Now that I have booked both the flights and the hotel it’s official: I’ll attend the Gran Canaria Desktop Summit. On Thursday 9th July I’ll give a BoF about QJson. During the talk I will show: the advantages brought by QJson. the usage of QJson. some real programs using QJson. See you soon!

Apr 7, 2009 - 1 minute read - Comments - c++ qt qjson last.fm KDE marble

rockmarble: see who is going to rock in your town

During the last weekend I hacked a bit on rockmarble and I added a new feature: retrieve all the events happening in a certain city. As usual data is provided by last.fm, which should return also the events _“near” _the specified city (don’t ask me to define a value for near :) ). I have created new openSUSE packages, this time everything should work fine. Just make sure to remove all qjson packages before installing this release (in fact all the previous problems were due to packaging errors of qjson, now I have created new packages called libqjson0).

Apr 2, 2009 - 1 minute read - Comments - c++ qt qjson last.fm KDE marble

rockmarble: how to follow your favourite artists tour with Marble

During the last weekend I wanted to have some fun with QJson. So I came out with this idea: retrieve from last.fm the tour dates of my favourite artists and display the locations using Marble. After some hacking I created this small application: rockmarble… If you have a last.fm account rockmarble will import your favourite artist list. Otherwise you can add one artists at a time. The tour location will be displayed inside Marble, using openstreetmap.

Nov 4, 2008 - 2 minute read - Comments - qt json qjson

QJson: a Qt-based library for mapping JSON data to QVariant objects

In order to realize a project of mine I started looking for a Qt library for mapping JSON data to Qt objects. I came over a couple of solutions but none of them made me happy. So in the last weekend I wrote my own library : QJson The library is based on Qt toolkit and converts JSON data to QVariant instances. JSON arrays will be mapped to QVariantList instances, while JSON’s objects will be mapped to QVariantMap.