| 255 | } |
| 256 | |
| 257 | OpenDocumentSet::OpenDocumentSet(QObject* parent) |
| 258 | : WatchedDocumentSet(parent) |
| 259 | { |
| 260 | Q_D(WatchedDocumentSet); |
| 261 | |
| 262 | const auto documents = ICore::self()->documentController()->openDocuments(); |
| 263 | for (IDocument* doc : documents) { |
| 264 | d->addDocument(IndexedString(doc->url())); |
| 265 | } |
| 266 | d->updateImports(); |
| 267 | |
| 268 | connect(ICore::self()->documentController(), &IDocumentController::documentClosed, this, &OpenDocumentSet::documentClosed); |
| 269 | connect(ICore::self()->documentController(), &IDocumentController::textDocumentCreated, this, &OpenDocumentSet::documentCreated); |
| 270 | connect(ICore::self()->documentController(), &IDocumentController::documentUrlChanged, this, |
| 271 | &OpenDocumentSet::documentUrlChanged); |
| 272 | } |
| 273 | |
| 274 | void OpenDocumentSet::documentClosed(IDocument* doc) |
| 275 | { |
nothing calls this directly
no test coverage detected