Other in Office
Refactor to make this work propertly :)
The KoChartModel now is a QObject as qobject_cast is the only thing that works in this case. The problem is that KoChartModel is not a class in a shared-library, but a class compiled into each using-application.
See <a href="http://techbase.kde.org/Development/Tutorials/Common_Programming_Mistakes#dynamic_cast">http://techbase.kde.org/Development/Tutorials/Common_Programming_Mistakes#dynamic_cast</a>
The problem we had is that KSpread wanted to use QAbstractTableModel but kchart wants to use the extra implementation of QStandardItemModel. So the change has to be from 'is a' to 'has a' model.
The effective changes are not that big; kspread now has a new class (oddly named) that is the model in Binding_p.h and kchart simply has a QStandardItemModel member.
I suggest someone come up with some better naming now since KoChartModel for a class that owns a model, but is not a model might be confusing ;)