| 776 | } |
| 777 | |
| 778 | IDocument * DocumentController::documentForUrl( const QUrl & dirtyUrl ) const |
| 779 | { |
| 780 | Q_D(const DocumentController); |
| 781 | |
| 782 | if (dirtyUrl.isEmpty()) { |
| 783 | return nullptr; |
| 784 | } |
| 785 | Q_ASSERT(!dirtyUrl.isRelative()); |
| 786 | Q_ASSERT(!dirtyUrl.fileName().isEmpty() || !dirtyUrl.isLocalFile()); |
| 787 | //Fix urls that might not be normalized |
| 788 | return d->documents.value( dirtyUrl.adjusted( QUrl::NormalizePathSegments ), nullptr ); |
| 789 | } |
| 790 | |
| 791 | QList<IDocument*> DocumentController::openDocuments() const |
| 792 | { |