MCPcopy Create free account
hub / github.com/KDE/okular / notifySetup

Method notifySetup

part/annotationmodel.cpp:130–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void AnnotationModelPrivate::notifySetup(const QList<Okular::Page *> &pages, int setupFlags)
131{
132 if (!(setupFlags & Okular::DocumentObserver::DocumentChanged)) {
133 if (setupFlags & Okular::DocumentObserver::UrlChanged) {
134 // Here with UrlChanged and no document changed it means we
135 // need to update all the Annotation* otherwise
136 // they still point to the old document ones, luckily the old ones are still
137 // around so we can look for the new ones using unique ids, etc
138 updateAnnotationPointer(root, pages);
139 }
140 return;
141 }
142
143 q->beginResetModel();
144 qDeleteAll(root->children);
145 root->children.clear();
146
147 rebuildTree(pages);
148 q->endResetModel();
149}
150
151void AnnotationModelPrivate::notifyPageChanged(int page, int flags)
152{

Callers

nothing calls this directly

Calls 2

updateAnnotationPointerFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected