mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-03 01:04:13 +02:00
Remove two files that slipped into #944
sources/qetsbom.cpp and sources/qetsbom.h were untracked local files that a directory-wide add swept into the rebuilt #944 commit. Nothing references them; the build does not compile them.
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
Copyright 2006-2026 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "qetsbom.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
// Generated by cmake/generate_sbom.cmake at configure time from whatever
|
||||
// find_package()/FetchContent resolution this build actually used.
|
||||
#include "sbom_data.h"
|
||||
|
||||
QList<QetSbomComponent> QetSbom::components()
|
||||
{
|
||||
QList<QetSbomComponent> list;
|
||||
|
||||
const QJsonDocument doc = QJsonDocument::fromJson(QByteArray(qet_sbom_json));
|
||||
const QJsonArray components = doc.object().value("components").toArray();
|
||||
|
||||
for (const QJsonValue &value : components)
|
||||
{
|
||||
const QJsonObject obj = value.toObject();
|
||||
list.append({
|
||||
obj.value("name").toString(),
|
||||
obj.value("version").toString(),
|
||||
obj.value("license").toString(),
|
||||
obj.value("homepage").toString(),
|
||||
obj.value("source").toString()
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QString QetSbom::rawJson()
|
||||
{
|
||||
return QString::fromUtf8(qet_sbom_json);
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
Copyright 2006-2026 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef QETSBOM_H
|
||||
#define QETSBOM_H
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
/// One third-party component resolved for this specific build, as recorded
|
||||
/// by cmake/generate_sbom.cmake at configure time.
|
||||
struct QetSbomComponent
|
||||
{
|
||||
QString name;
|
||||
QString version;
|
||||
QString license;
|
||||
QString homepage;
|
||||
QString source; ///< "system", "fetched" or "submodule"
|
||||
};
|
||||
|
||||
namespace QetSbom {
|
||||
QList<QetSbomComponent> components();
|
||||
QString rawJson();
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user