aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/enclosingclassmixin.cpp
blob: 2421ae5275c77577b20d7e980b8776b732155cea (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"

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