File indexing completed on 2024-05-19 04:41:20

0001 /*
0002     SPDX-FileCopyrightText: 2019 Daniel Mensinger <daniel@mensinger-ka.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "mesonprojectinfo.h"
0008 #include <QJsonArray>
0009 #include <QJsonObject>
0010 #include <QJsonValue>
0011 #include <debug.h>
0012 
0013 MesonProjectInfo::MesonProjectInfo(const QJsonObject& json)
0014 {
0015     fromJSON(json);
0016 }
0017 
0018 MesonProjectInfo::~MesonProjectInfo() {}
0019 
0020 void MesonProjectInfo::fromJSON(const QJsonObject& json)
0021 {
0022     m_name = json[QStringLiteral("descriptive_name")].toString();
0023     m_version = json[QStringLiteral("version")].toString();
0024 
0025     qCDebug(KDEV_Meson) << "MINTRO: Meson project" << m_name << "version" << m_version << "info loaded";
0026 }
0027 
0028 QString MesonProjectInfo::name() const
0029 {
0030     return m_name;
0031 }
0032 
0033 QString MesonProjectInfo::version() const
0034 {
0035     return m_version;
0036 }