[Kde-pim] Getting started with KDE PIM development

Daniel Vrátil dvratil at kde.org
Sun Jun 7 08:45:50 BST 2015


On Sunday, June 07, 2015 02:47:33 AM Paul Eggleton wrote:
> Hi all,

Hi Paul,

> 
> As a long time user of KDE PIM applications (in particular, KMail and
> KOrganizer), I've finally felt inspired to have a go at some hacking.
> I'm new to the KDE PIM codebase, KF5 and modern Qt - most of my Qt
> experience has been with Qt 2.x (as the last remaining developer on the
> Opie project), so I've clearly got some learning to do - but I'd like to
> help where I can. After some struggling and several false starts I've
> finally got to the point where I've been able to build and run KF5-based
> kdepim from master.
> 
> Anyway, I thought I would try digging into KOrganizer. The first thing I
> found though is that I could create new todo items, but editing or
> deleting them didn't work - I just got a beep and "log_korganizer: Null
> incidence" on the console. After some digging around in the code I found
> that if I replaced "TodoModel::TodoRole" at points in the todoview.cpp
> code retrieving the selected item with
> "Akonadi::EntityTreeModel::ItemRole" which I found being used elsewhere
> in the same file, the returned object was actually the right one and the
> actions began to work. My question is though, is this actually the
> correct fix or is there some deeper reason why the current code isn't
> working? (I'm aware that the code is in a state of flux at the moment,
> so perhaps I've just stumbled into the middle of refactoring - feel free
> to tell me I should find some other part of the code to look at.)

Nice job!

If you look into kdepim/calendarviews/todomodel.cpp, the actual reason why 
TodoRole no longer works is that the code for TodoRole is disabled (l.382), 
because it does not compile or work properly with Qt 5. The proper fix then 
would be to port the disabled code to Qt 5 and post a the patch for review on 
git.reviewboard.kde.org. If you ask me, simple return 
QVariant::fromValue(item) would work here just fine IMO.

I suspect there are more places in the KDE PIM codebase that has been disabled 
like this, so greeping for "#if 0" or "// QT 5" and fixing the disabled code 
could be a nice and simple start :)

Cheers,
Daniel

> 
> Thanks,
> Paul

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list