Commit 51e074b0 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

Timeline: Remove TimelineModel ctor with private object



Change-Id: Ie4e50c08f77cd710f067f1c5e33a1656878e0640
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent c5da4a3d
......@@ -157,11 +157,6 @@ TimelineModel::TimelineModelPrivate::TimelineModelPrivate(int modelId) :
{
}
TimelineModel::TimelineModel(TimelineModelPrivate &dd, QObject *parent) :
QObject(parent), d_ptr(&dd)
{
}
TimelineModel::TimelineModel(int modelId, QObject *parent) :
QObject(parent), d_ptr(new TimelineModelPrivate(modelId))
{
......
......@@ -138,10 +138,8 @@ protected:
virtual void clear();
explicit TimelineModel(TimelineModelPrivate &dd, QObject *parent);
TimelineModelPrivate *d_ptr;
private:
TimelineModelPrivate *d_ptr;
Q_DECLARE_PRIVATE(TimelineModel)
};
......
......@@ -63,7 +63,6 @@ public:
};
TimelineModelPrivate(int modelId);
void init(TimelineModel *q);
int firstIndexNoParents(qint64 startTime) const;
......
......@@ -31,12 +31,6 @@ static const int NumItems = 32;
static const qint64 ItemDuration = 1 << 19;
static const qint64 ItemSpacing = 1 << 20;
class DummyModelPrivate : public Timeline::TimelineModel::TimelineModelPrivate {
public:
DummyModelPrivate(int modelId) : Timeline::TimelineModel::TimelineModelPrivate(modelId)
{}
};
class DummyModel : public Timeline::TimelineModel
{
Q_OBJECT
......@@ -86,7 +80,7 @@ private slots:
};
DummyModel::DummyModel(int modelId) :
Timeline::TimelineModel(*new DummyModelPrivate(modelId), 0)
Timeline::TimelineModel(modelId, 0)
{
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment