~lukas-kde/unity-notifications/fix-1453958

« back to all changes in this revision

Viewing changes to src/Notification.cpp

  • Committer: Mirco Müller
  • Date: 2015-05-21 16:49:32 UTC
  • Revision ID: mirco.mueller@canonical.com-20150521164932-dljiu2e53hlgmgix
Make the notification object itself the parent of the ActionModel, not the Notification's parent.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    p->body = "default text";
53
53
    p->server = nullptr;
54
54
    p->value = -2;
55
 
    p->actionsModel = new ActionModel(parent);
 
55
    p->actionsModel = new ActionModel(this);
56
56
}
57
57
 
58
58
Notification::Notification(NotificationID id, int displayTime, const Urgency ur, const QString &text, Type type, NotificationServer *srv, QObject *parent) :
64
64
    p->server = srv;
65
65
    p->value = -2;
66
66
    p->displayTime = displayTime;
67
 
    p->actionsModel = new ActionModel(parent);
 
67
    p->actionsModel = new ActionModel(this);
68
68
}
69
69
 
70
70
Notification::Notification(NotificationID id, int displayTime, const Urgency ur, Type type, NotificationServer *srv, QObject *parent) :
71
71
    Notification(id, displayTime, ur, QString(), type, srv, parent){
72
 
    p->actionsModel = new ActionModel(parent);
 
72
    p->actionsModel = new ActionModel(this);
73
73
}
74
74
 
75
75
Notification::~Notification() {