| 128 | } |
| 129 | |
| 130 | void 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 | |
| 151 | void AnnotationModelPrivate::notifyPageChanged(int page, int flags) |
| 152 | { |
nothing calls this directly
no test coverage detected