summaryrefslogtreecommitdiffstats
path: root/src/modeling/qmodelingobject.cpp
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-08-24 21:17:13 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-08-25 02:15:07 +0200
commitd1ee48c7b8f3032f4806522417a2bfdcc802bcc3 (patch)
tree63d4f235da0ce93ee0911125b2e18bdc136cbc29 /src/modeling/qmodelingobject.cpp
parentd33334850a695810ce0555534f64519d9d22ca2e (diff)
Enhance pimpl support in qmodelingobject
Change-Id: I4db7e416bc363462751af9797b398ba369e7b417 Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'src/modeling/qmodelingobject.cpp')
-rw-r--r--src/modeling/qmodelingobject.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modeling/qmodelingobject.cpp b/src/modeling/qmodelingobject.cpp
index 25d4ac73..b60eee64 100644
--- a/src/modeling/qmodelingobject.cpp
+++ b/src/modeling/qmodelingobject.cpp
@@ -1,15 +1,23 @@
#include "qmodelingobject.h"
#include "qmodelingobject_p.h"
+QModelingObjectPrivate::~QModelingObjectPrivate()
+{
+}
+
QModelingObject::QModelingObject(bool create_d_ptr)
{
if (create_d_ptr)
set_d_ptr(new QModelingObjectPrivate);
}
+QModelingObject::~QModelingObject()
+{
+ delete d_ptr;
+}
+
void QModelingObject::set_d_ptr(QModelingObjectPrivate *d_ptr)
{
this->d_ptr = d_ptr;
- if (d_ptr)
- d_ptr->q_ptr = this;
+ d_ptr->q_ptr = this;
}