| 57 | Document::~Document() = default; |
| 58 | |
| 59 | View *Document::createView() |
| 60 | { |
| 61 | Q_D(Document); |
| 62 | |
| 63 | View *view = newView(this); |
| 64 | connect(view, &View::destroyed, this, [this, view](QObject* obj) { |
| 65 | Q_D(Document); |
| 66 | Q_ASSERT(obj == view); |
| 67 | d->removeView(view); |
| 68 | }); |
| 69 | d->views.append(view); |
| 70 | return view; |
| 71 | } |
| 72 | |
| 73 | const QList<View*> &Document::views() const |
| 74 | { |