aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/languageserverprotocol/jsonobject.cpp
blob: c151da0a99695b7262a14969faa0a9623dea2a91 (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
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include "jsonobject.h"

#include <QCoreApplication>

namespace LanguageServerProtocol {

JsonObject &JsonObject::operator=(const JsonObject &other) = default;

JsonObject &JsonObject::operator=(JsonObject &&other)
{
    m_jsonObject.swap(other.m_jsonObject);
    return *this;
}

QJsonObject::iterator JsonObject::insert(const QStringView key, const JsonObject &object)
{
    return m_jsonObject.insert(key, object.m_jsonObject);
}

QJsonObject::iterator JsonObject::insert(const QStringView key, const QJsonValue &value)
{
    return m_jsonObject.insert(key, value);
}

} // namespace LanguageServerProtocol