Changeset View
Changeset View
Standalone View
Standalone View
components/impl/PresentationImpl.cpp
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Line(s) | |||||
154 | 154 | | |||
155 | PresentationImpl::~PresentationImpl() | 155 | PresentationImpl::~PresentationImpl() | ||
156 | { | 156 | { | ||
157 | delete d; | 157 | delete d; | ||
158 | } | 158 | } | ||
159 | 159 | | |||
160 | bool PresentationImpl::load(const QUrl& url) | 160 | bool PresentationImpl::load(const QUrl& url) | ||
161 | { | 161 | { | ||
162 | if(d->part) { | | |||
163 | delete d->part; | 162 | delete d->part; | ||
164 | delete d->document; | 163 | delete d->document; | ||
165 | } | | |||
166 | 164 | | |||
167 | d->part = new KPrPart{this}; | 165 | d->part = new KPrPart{this}; | ||
168 | d->document = new KPrDocument{d->part}; | 166 | d->document = new KPrDocument{d->part}; | ||
169 | setKoDocument(d->document); | 167 | setKoDocument(d->document); | ||
170 | d->part->setDocument(d->document); | 168 | d->part->setDocument(d->document); | ||
171 | 169 | | |||
172 | bool retval = false; | 170 | bool retval = false; | ||
173 | if (url.scheme() == QStringLiteral("template")) { | 171 | if (url.scheme() == QStringLiteral("template")) { | ||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |