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

List:       kde-commits
Subject:    koffice/interfaces
From:       Johannes Simon <johannes.simon () gmail ! com>
Date:       2008-07-08 9:37:27
Message-ID: 1215509847.987160.24029.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 829363 by jsimon:

Don't inherit a QObject class in an interface. Inheriting multiple QObject classes is \
not supported in Qt and thus not applicable in pure virtual interfaces, as subclasses \
might want to have a different item model implementation than QAbstractTableModel as \
base.

 M  +4 -2      KoChartModel.cpp  
 M  +4 -5      KoChartModel.h  


--- trunk/koffice/interfaces/KoChartModel.cpp #829362:829363
@@ -19,9 +19,12 @@
 
 #include "KoChartModel.h"
 
+// Qt
+#include <QRect>
+
 using namespace KoChart;
 
-ChartModel::ChartModel( QObject *parent )
+ChartModel::ChartModel()
 {
 }
 
@@ -29,4 +32,3 @@
 {
 }
 
-#include "KoChartModel.moc"
--- trunk/koffice/interfaces/KoChartModel.h #829362:829363
@@ -20,10 +20,11 @@
 #ifndef KO_CHART_MODEL
 #define KO_CHART_MODEL
 
-#include <QAbstractTableModel>
 #include <QVector>
 #include "kochart_export.h"
 
+class QRect;
+
 namespace KoChart {
 
 /**
@@ -53,12 +54,10 @@
 * The ChartModel class implements a model that can be filled and
 * passed on to KChart to provide the data used within the chart.
 */
-class KOCHART_EXPORT ChartModel : public QAbstractTableModel
+class KOCHART_EXPORT ChartModel
 {
-    Q_OBJECT
-
 public:
-    ChartModel( QObject *parent = 0 );
+    ChartModel();
     virtual ~ChartModel();
 
     virtual QString regionToString( const QVector<QRect> &region ) const = 0;


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

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