[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice
From:       Thomas Zander <zander () kde ! org>
Date:       2008-07-08 11:45:29
Message-ID: 1215517529.252362.28954.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 829403 by zander:

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 http://techbase.kde.org/Development/Tutorials/Common_Programming_Mistakes#dynamic_cast

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 ;)


 M  +2 -1      interfaces/KoChartModel.cpp  
 M  +7 -3      interfaces/KoChartModel.h  
 M  +24 -63    kchart/shape/TableModel.cpp  
 M  +4 -9      kchart/shape/TableModel.h  
 M  +99 -50    kspread/Binding.cpp  
 M  +12 -15    kspread/Binding.h  
 A             kspread/Binding_p.h   [License: LGPL (v2+)]


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic