KiCad PCB EDA Suite
Loading...
Searching...
No Matches
project_file_downgrade.h File Reference
#include <nlohmann/json_fwd.hpp>
#include <compatibility_report.h>
#include <downgrade_target.h>
#include <kicommon.h>

Go to the source code of this file.

Functions

KICOMMON_API void DowngradeProjectFileJson (nlohmann::json &aDoc, const DOWNGRADE_TARGET &aTarget, COMPATIBILITY_REPORT &aReport)
 Migrate a .kicad_pro document down to what the target release expects.
 

Function Documentation

◆ DowngradeProjectFileJson()

KICOMMON_API void DowngradeProjectFileJson ( nlohmann::json & aDoc,
const DOWNGRADE_TARGET & aTarget,
COMPATIBILITY_REPORT & aReport )

Migrate a .kicad_pro document down to what the target release expects.

The downgrade twin of the settings upgrade migrations: newer keys are removed, nested schema versions are rewound, and behavior-changing losses are added to the report. Keys the target simply ignores are retained when inert. Unknown future schemas block without modifying the document.

Definition at line 967 of file project_file_downgrade.cpp.

References _, COMPATIBILITY_REPORT::Add(), BLOCK, DROP, empty(), and DOWNGRADE_TARGET::m_boardVersion.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), ClassifyProjectForDowngrade(), and downgradeProjectFileOnDisk().