aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/enclosingclassmixin.cpp
blob: f2d5074b7fce3ed9c68ea30ebf75004eed73169b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "enclosingclassmixin.h"
#include "abstractmetalang.h"
#include "namespacetypeentry.h"

const AbstractMetaClass *EnclosingClassMixin::targetLangEnclosingClass() const
{
    auto result = m_enclosingClass;
    while (result && !NamespaceTypeEntry::isVisibleScope(result->typeEntry()))
        result = result->enclosingClass();
    return result;
}