aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/insight/insightplugin.cpp
blob: 4ad151e80dae2aa3267bca58a75fe680941bf7cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include "insightplugin.h"

#include "insightview.h"

#include <qmldesigner/dynamiclicensecheck.h>
#include <qmldesignerplugin.h>

namespace QmlDesigner {

InsightPlugin::InsightPlugin() = default;
InsightPlugin::~InsightPlugin() = default;

bool InsightPlugin::initialize(const QStringList & /*arguments*/, QString * /*errorMessage*/)
{
    return true;
}

bool InsightPlugin::delayedInitialize()
{
    auto *designerPlugin = QmlDesignerPlugin::instance();
    auto &viewManager = designerPlugin->viewManager();
    viewManager.registerView(std::make_unique<InsightView>(
        QmlDesignerPlugin::externalDependenciesForPluginInitializationOnly()));

    return true;
}

} // namespace QmlDesigner