| 831 | } |
| 832 | |
| 833 | void DUContext::addImportedParentContext(DUContext* context, const CursorInRevision& position, bool anonymous, |
| 834 | bool /*temporary*/) |
| 835 | { |
| 836 | ENSURE_CAN_WRITE |
| 837 | |
| 838 | if (context == this) { |
| 839 | qCDebug(LANGUAGE) << "Tried to import self"; |
| 840 | return; |
| 841 | } |
| 842 | if (!context) { |
| 843 | qCDebug(LANGUAGE) << "Tried to import invalid context"; |
| 844 | return; |
| 845 | } |
| 846 | |
| 847 | Import import(context, this, position); |
| 848 | if (addIndirectImport(import)) |
| 849 | return; |
| 850 | |
| 851 | if (!anonymous) { |
| 852 | ENSURE_CAN_WRITE_(context) |
| 853 | context->m_dynamicData->addImportedChildContext(this); |
| 854 | } |
| 855 | } |
| 856 | |
| 857 | void DUContext::removeImportedParentContext(DUContext* context) |
| 858 | { |