aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/lsp/jsonobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/lsp/jsonobject.cpp')
-rw-r--r--src/shared/lsp/jsonobject.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/shared/lsp/jsonobject.cpp b/src/shared/lsp/jsonobject.cpp
new file mode 100644
index 000000000..887d79a5e
--- /dev/null
+++ b/src/shared/lsp/jsonobject.cpp
@@ -0,0 +1,28 @@
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#include "jsonobject.h"
+
+#include <QCoreApplication>
+
+namespace lsp {
+
+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 std::string_view key, const JsonObject &object)
+{
+ return m_jsonObject.insert(QLatin1String(key.data()), object.m_jsonObject);
+}
+
+QJsonObject::iterator JsonObject::insert(const std::string_view key, const QJsonValue &value)
+{
+ return m_jsonObject.insert(QLatin1String(key.data()), value);
+}
+
+} // namespace lsp