From 5895c27f4a447aec12132a663bef33e403c806dd Mon Sep 17 00:00:00 2001 From: Mark Roszko Date: Thu, 7 Aug 2025 23:21:41 -0400 Subject: [PATCH] Rename Prj() on schematic to avoid conflict with global function --- eeschema/connection_graph.cpp | 2 +- eeschema/eeschema_jobs_handler.cpp | 26 +++++++++---------- eeschema/erc/erc.cpp | 10 +++---- eeschema/files-io.cpp | 2 +- .../netlist_exporter_spice.cpp | 6 ++--- .../netlist_exporter_spice_model.cpp | 2 +- .../netlist_exporter_xml.cpp | 6 ++--- eeschema/sch_field.cpp | 6 ++--- eeschema/sch_io/altium/sch_io_altium.cpp | 14 +++++----- .../cadstar/cadstar_sch_archive_loader.cpp | 6 ++--- .../sch_io/cadstar/sch_io_cadstar_archive.cpp | 12 ++++----- eeschema/sch_io/eagle/sch_io_eagle.cpp | 18 ++++++------- eeschema/sch_io/easyeda/sch_io_easyeda.cpp | 2 +- .../sch_io/easyedapro/sch_io_easyedapro.cpp | 10 +++---- .../kicad_legacy/sch_io_kicad_legacy.cpp | 4 +-- .../sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp | 8 +++--- eeschema/sch_io/ltspice/ltspice_schematic.cpp | 2 +- eeschema/sch_io/ltspice/sch_io_ltspice.cpp | 2 +- eeschema/sch_item.cpp | 3 +-- eeschema/sch_plotter.cpp | 12 ++++----- eeschema/sch_screen.cpp | 8 +++--- eeschema/sch_sheet.cpp | 2 +- eeschema/sch_symbol.cpp | 2 +- eeschema/sch_view.cpp | 2 +- eeschema/schematic.h | 2 +- eeschema/sim/sim_model_ibis.cpp | 2 +- qa/schematic_utils/eeschema_test_utils.cpp | 2 +- qa/schematic_utils/schematic_file_util.cpp | 2 +- qa/tests/eeschema/test_sch_netclass.cpp | 2 +- qa/tests/eeschema/test_sch_screen.cpp | 2 +- qa/tests/spice/test_netlist_exporter_spice.h | 2 +- qa/tests/spice/test_sim_regressions.cpp | 2 +- 32 files changed, 91 insertions(+), 92 deletions(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index b3295a11a3..7964bc95d0 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -2466,7 +2466,7 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function* a m_net_name_to_subgraphs_map[subgraph->m_driver_connection->Name()].push_back( subgraph ); } - std::shared_ptr& netSettings = m_schematic->Prj().GetProjectFile().m_NetSettings; + std::shared_ptr& netSettings = m_schematic->Project().GetProjectFile().m_NetSettings; std::map> oldAssignments = netSettings->GetNetclassLabelAssignments(); std::set affectedNetclassNetAssignments; diff --git a/eeschema/eeschema_jobs_handler.cpp b/eeschema/eeschema_jobs_handler.cpp index 9891dd6a9a..97eabab8d6 100644 --- a/eeschema/eeschema_jobs_handler.cpp +++ b/eeschema/eeschema_jobs_handler.cpp @@ -227,7 +227,7 @@ void EESCHEMA_JOBS_HANDLER::InitRenderSettings( SCH_RENDER_SETTINGS* aRenderSett { wxString msg; FILENAME_RESOLVER resolve; - resolve.SetProject( &aSch->Prj() ); + resolve.SetProject( &aSch->Project() ); resolve.SetProgramBase( &Pgm() ); wxString absolutePath = resolve.ResolvePath( path, wxGetCwd(), @@ -272,7 +272,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob ) return CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE; aJob->SetTitleBlock( sch->RootScreen()->GetTitleBlock() ); - sch->Prj().ApplyTextVars( aJob->GetVarOverrides() ); + sch->Project().ApplyTextVars( aJob->GetVarOverrides() ); std::unique_ptr renderSettings = std::make_unique(); InitRenderSettings( renderSettings.get(), aPlotJob->m_theme, sch, aPlotJob->m_drawingSheet ); @@ -310,7 +310,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob ) case JOB_PAGE_SIZE::PAGE_SIZE_AUTO: pageSizeSelect = PageFormatReq::PAGE_SIZE_AUTO; break; } - wxString outPath = aPlotJob->GetFullOutputPath( &sch->Prj() ); + wxString outPath = aPlotJob->GetFullOutputPath( &sch->Project() ); if( !PATHS::EnsurePathExists( outPath, !aPlotJob->GetOutputPathIsDirectory() ) ) { @@ -364,7 +364,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportNetlist( JOB* aJob ) return CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE; aJob->SetTitleBlock( sch->RootScreen()->GetTitleBlock() ); - sch->Prj().ApplyTextVars( aJob->GetVarOverrides() ); + sch->Project().ApplyTextVars( aJob->GetVarOverrides() ); // Annotation warning check SCH_REFERENCE_LIST referenceList; @@ -453,7 +453,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportNetlist( JOB* aJob ) aNetJob->SetConfiguredOutputPath( fn.GetFullName() ); } - wxString outPath = aNetJob->GetFullOutputPath( &sch->Prj() ); + wxString outPath = aNetJob->GetFullOutputPath( &sch->Project() ); if( !PATHS::EnsurePathExists( outPath, true ) ) { @@ -482,7 +482,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportBom( JOB* aJob ) return CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE; aJob->SetTitleBlock( sch->RootScreen()->GetTitleBlock() ); - sch->Prj().ApplyTextVars( aJob->GetVarOverrides() ); + sch->Project().ApplyTextVars( aJob->GetVarOverrides() ); // Annotation warning check SCH_REFERENCE_LIST referenceList; @@ -672,7 +672,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportBom( JOB* aJob ) aBomJob->SetConfiguredOutputPath( fn.GetFullName() ); } - wxString outPath = aBomJob->GetFullOutputPath( &sch->Prj() ); + wxString outPath = aBomJob->GetFullOutputPath( &sch->Project() ); if( !PATHS::EnsurePathExists( outPath, true ) ) { @@ -761,7 +761,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPythonBom( JOB* aJob ) return CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE; aJob->SetTitleBlock( sch->RootScreen()->GetTitleBlock() ); - sch->Prj().ApplyTextVars( aJob->GetVarOverrides() ); + sch->Project().ApplyTextVars( aJob->GetVarOverrides() ); // Annotation warning check SCH_REFERENCE_LIST referenceList; @@ -800,7 +800,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPythonBom( JOB* aJob ) aNetJob->SetConfiguredOutputPath( fn.GetFullName() ); } - wxString outPath = aNetJob->GetFullOutputPath( &sch->Prj() ); + wxString outPath = aNetJob->GetFullOutputPath( &sch->Project() ); if( !PATHS::EnsurePathExists( outPath, true ) ) { @@ -1114,7 +1114,7 @@ int EESCHEMA_JOBS_HANDLER::JobSchErc( JOB* aJob ) return CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE; aJob->SetTitleBlock( sch->RootScreen()->GetTitleBlock() ); - sch->Prj().ApplyTextVars( aJob->GetVarOverrides() ); + sch->Project().ApplyTextVars( aJob->GetVarOverrides() ); if( ercJob->GetConfiguredOutputPath().IsEmpty() ) { @@ -1129,7 +1129,7 @@ int EESCHEMA_JOBS_HANDLER::JobSchErc( JOB* aJob ) ercJob->SetConfiguredOutputPath( fn.GetFullName() ); } - wxString outPath = ercJob->GetFullOutputPath( &sch->Prj() ); + wxString outPath = ercJob->GetFullOutputPath( &sch->Project() ); if( !PATHS::EnsurePathExists( outPath, true ) ) { @@ -1154,7 +1154,7 @@ int EESCHEMA_JOBS_HANDLER::JobSchErc( JOB* aJob ) std::unique_ptr drawingSheet( getDrawingSheetProxyView( sch ) ); ercTester.RunTests( drawingSheet.get(), nullptr, m_kiway->KiFACE( KIWAY::FACE_CVPCB ), - &sch->Prj(), m_progressReporter ); + &sch->Project(), m_progressReporter ); markersProvider->SetSeverities( ercJob->m_severity ); @@ -1194,7 +1194,7 @@ DS_PROXY_VIEW_ITEM* EESCHEMA_JOBS_HANDLER::getDrawingSheetProxyView( SCHEMATIC* { DS_PROXY_VIEW_ITEM* drawingSheet = new DS_PROXY_VIEW_ITEM( schIUScale, &aSch->RootScreen()->GetPageSettings(), - &aSch->Prj(), &aSch->RootScreen()->GetTitleBlock(), + &aSch->Project(), &aSch->RootScreen()->GetTitleBlock(), aSch->GetProperties() ); drawingSheet->SetPageNumber( TO_UTF8( aSch->RootScreen()->GetPageNumber() ) ); diff --git a/eeschema/erc/erc.cpp b/eeschema/erc/erc.cpp index e8c35b095f..47cc826880 100644 --- a/eeschema/erc/erc.cpp +++ b/eeschema/erc/erc.cpp @@ -188,7 +188,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet ) auto unresolved = [this]( wxString str ) { - str = ExpandEnvVarSubstitutions( str, &m_schematic->Prj() ); + str = ExpandEnvVarSubstitutions( str, &m_schematic->Project() ); return str.Matches( wxS( "*${*}*" ) ); }; @@ -247,7 +247,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet ) wsItems.SetFileName( wxS( "dummyFilename" ) ); wsItems.SetSheetName( wxS( "dummySheet" ) ); wsItems.SetSheetLayer( wxS( "dummyLayer" ) ); - wsItems.SetProject( &m_schematic->Prj() ); + wsItems.SetProject( &m_schematic->Project() ); wsItems.BuildDrawItemsList( aDrawingSheet->GetPageInfo(), aDrawingSheet->GetTitleBlock() ); } @@ -682,7 +682,7 @@ int ERC_TESTER::TestMissingUnits() int ERC_TESTER::TestMissingNetclasses() { int err_count = 0; - std::shared_ptr& settings = m_schematic->Prj().GetProjectFile().NetSettings(); + std::shared_ptr& settings = m_schematic->Project().GetProjectFile().NetSettings(); wxString defaultNetclass = settings->GetDefaultNetclass()->GetName(); auto logError = @@ -1472,7 +1472,7 @@ int ERC_TESTER::TestLibSymbolIssues() { wxCHECK( m_schematic, 0 ); - SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Prj() ); + SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Project() ); wxString msg; int err_count = 0; @@ -1840,7 +1840,7 @@ int ERC_TESTER::TestSimModelIssues() { WX_STRING_REPORTER reporter; int err_count = 0; - SIM_LIB_MGR libMgr( &m_schematic->Prj() ); + SIM_LIB_MGR libMgr( &m_schematic->Project() ); for( SCH_SHEET_PATH& sheet : m_sheetList ) { diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 534355faf7..1f69f68dc1 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -432,7 +432,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in } // Ensure there is only one legacy library loaded and that it is the cache library. - SYMBOL_LIBS* legacyLibs = PROJECT_SCH::SchLibs( &Schematic().Prj() ); + SYMBOL_LIBS* legacyLibs = PROJECT_SCH::SchLibs( &Schematic().Project() ); if( legacyLibs->GetLibraryCount() == 0 ) { diff --git a/eeschema/netlist_exporters/netlist_exporter_spice.cpp b/eeschema/netlist_exporters/netlist_exporter_spice.cpp index 4b21af1ab7..efb8306db6 100644 --- a/eeschema/netlist_exporters/netlist_exporter_spice.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_spice.cpp @@ -64,7 +64,7 @@ std::string NAME_GENERATOR::Generate( const std::string& aProposedName ) NETLIST_EXPORTER_SPICE::NETLIST_EXPORTER_SPICE( SCHEMATIC* aSchematic ) : NETLIST_EXPORTER_BASE( aSchematic ), - m_libMgr( &aSchematic->Prj() ) + m_libMgr( &aSchematic->Project() ) { std::vector embeddedFilesStack; embeddedFilesStack.push_back( aSchematic->GetEmbeddedFiles() ); @@ -562,7 +562,7 @@ void NETLIST_EXPORTER_SPICE::writeInclude( OUTPUTFORMATTER& aFormatter, unsigned const wxString& aPath ) { // First, expand env vars, if any. - wxString expandedPath = ExpandEnvVarSubstitutions( aPath, &m_schematic->Prj() ); + wxString expandedPath = ExpandEnvVarSubstitutions( aPath, &m_schematic->Project() ); // Path may have been authored by someone on a Windows box; convert it to UNIX format expandedPath.Replace( '\\', '/' ); @@ -572,7 +572,7 @@ void NETLIST_EXPORTER_SPICE::writeInclude( OUTPUTFORMATTER& aFormatter, unsigned if( aNetlistOptions & OPTION_ADJUST_INCLUDE_PATHS ) { // Look for the library in known search locations. - fullPath = ResolveFile( expandedPath, &Pgm().GetLocalEnvVariables(), &m_schematic->Prj() ); + fullPath = ResolveFile( expandedPath, &Pgm().GetLocalEnvVariables(), &m_schematic->Project() ); if( fullPath.IsEmpty() ) { diff --git a/eeschema/netlist_exporters/netlist_exporter_spice_model.cpp b/eeschema/netlist_exporters/netlist_exporter_spice_model.cpp index 112854b270..c808b7d82d 100644 --- a/eeschema/netlist_exporters/netlist_exporter_spice_model.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_spice_model.cpp @@ -35,7 +35,7 @@ void NETLIST_EXPORTER_SPICE_MODEL::WriteHead( OUTPUTFORMATTER& aFormatter, { aFormatter.Print( 0, "*\n" ); aFormatter.Print( 0, "\n" ); - aFormatter.Print( 0, ".subckt %s\n", TO_UTF8( m_schematic->Prj().GetProjectName() ) ); + aFormatter.Print( 0, ".subckt %s\n", TO_UTF8( m_schematic->Project().GetProjectName() ) ); for( auto const& [key, port] : m_ports ) { diff --git a/eeschema/netlist_exporters/netlist_exporter_xml.cpp b/eeschema/netlist_exporters/netlist_exporter_xml.cpp index 600d6544d2..6fa15c63a0 100644 --- a/eeschema/netlist_exporters/netlist_exporter_xml.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_xml.cpp @@ -600,7 +600,7 @@ XNODE* NETLIST_EXPORTER_XML::makeDesignHeader() // which Eeschema tool xdesign->AddChild( node( wxT( "tool" ), wxT( "Eeschema " ) + GetBuildVersion() ) ); - const std::map& properties = m_schematic->Prj().GetTextVars(); + const std::map& properties = m_schematic->Project().GetTextVars(); for( const std::pair& prop : properties ) { @@ -626,7 +626,7 @@ XNODE* NETLIST_EXPORTER_XML::makeDesignHeader() xsheet->AddAttribute( wxT( "tstamps" ), sheet.PathAsString() ); TITLE_BLOCK tb = screen->GetTitleBlock(); - PROJECT* prj = &m_schematic->Prj(); + PROJECT* prj = &m_schematic->Project(); xsheet->AddChild( xtitleBlock = node( wxT( "title_block" ) ) ); @@ -683,7 +683,7 @@ XNODE* NETLIST_EXPORTER_XML::makeDesignHeader() XNODE* NETLIST_EXPORTER_XML::makeLibraries() { XNODE* xlibs = node( wxT( "libraries" ) ); // auto_ptr - SYMBOL_LIB_TABLE* symbolLibTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Prj() ); + SYMBOL_LIB_TABLE* symbolLibTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Project() ); for( std::set::iterator it = m_libraries.begin(); it!=m_libraries.end(); ++it ) { diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index c872c3db5c..8470922491 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -266,7 +266,7 @@ wxString SCH_FIELD::GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraT text = ExpandTextVars( text, &labelResolver ); else if( Schematic() ) { - text = ExpandTextVars( text, &Schematic()->Prj() ); + text = ExpandTextVars( text, &Schematic()->Project() ); text = ExpandTextVars( text, &schematicResolver ); } } @@ -739,7 +739,7 @@ void SCH_FIELD::OnScintillaCharAdded( SCINTILLA_TRICKS* aScintillaTricks, { NULL_REPORTER devnull; SCH_SHEET_PATH& sheet = schematic->CurrentSheet(); - SIM_LIB_MGR mgr( &schematic->Prj() ); + SIM_LIB_MGR mgr( &schematic->Project() ); std::vector embeddedFilesStack; embeddedFilesStack.push_back( schematic->GetEmbeddedFiles() ); @@ -804,7 +804,7 @@ void SCH_FIELD::OnScintillaCharAdded( SCINTILLA_TRICKS* aScintillaTricks, if( label ) label->GetContextualTextVars( &autocompleteTokens ); - for( std::pair entry : schematic->Prj().GetTextVars() ) + for( std::pair entry : schematic->Project().GetTextVars() ) autocompleteTokens.push_back( entry.first ); } diff --git a/eeschema/sch_io/altium/sch_io_altium.cpp b/eeschema/sch_io/altium/sch_io_altium.cpp index 2704bd008c..85e7fee11f 100644 --- a/eeschema/sch_io/altium/sch_io_altium.cpp +++ b/eeschema/sch_io/altium/sch_io_altium.cpp @@ -349,7 +349,7 @@ wxString SCH_IO_ALTIUM::getLibName() if( m_libName.IsEmpty() ) { // Try to come up with a meaningful name - m_libName = m_schematic->Prj().GetProjectName(); + m_libName = m_schematic->Project().GetProjectName(); if( m_libName.IsEmpty() ) { @@ -370,7 +370,7 @@ wxString SCH_IO_ALTIUM::getLibName() wxFileName SCH_IO_ALTIUM::getLibFileName() { - wxFileName fn( m_schematic->Prj().GetProjectPath(), getLibName(), + wxFileName fn( m_schematic->Project().GetProjectPath(), getLibName(), FILEEXT::KiCadSymbolLibFileExtension ); return fn; @@ -401,7 +401,7 @@ SCH_SHEET* SCH_IO_ALTIUM::LoadSchematicProject( SCHEMATIC* aSchematic, const std sheet->SetScreen( screen ); kicad_fn.SetExt( FILEEXT::KiCadSchematicFileExtension ); - kicad_fn.SetPath( aSchematic->Prj().GetProjectPath() ); + kicad_fn.SetPath( aSchematic->Project().GetProjectPath() ); sheet->SetFileName( fn.GetFullPath() ); screen->SetFileName( sheet->GetFileName() ); @@ -501,7 +501,7 @@ SCH_SHEET* SCH_IO_ALTIUM::LoadSchematicFile( const wxString& aFileName, SCHEMATI rootScreen->m_sheetInstances.emplace_back( sheetInstance ); - SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Prj() ); + SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Project() ); wxCHECK_MSG( libTable, nullptr, "Could not load symbol lib table." ); @@ -544,7 +544,7 @@ SCH_SHEET* SCH_IO_ALTIUM::LoadSchematicFile( const wxString& aFileName, SCHEMATI } } - std::shared_ptr& netSettings = m_schematic->Prj().GetProjectFile().NetSettings(); + std::shared_ptr& netSettings = m_schematic->Project().GetProjectFile().NetSettings(); if( minWireWidth < std::numeric_limits::max() ) netSettings->GetDefaultNetclass()->SetWireWidth( minWireWidth ); @@ -904,7 +904,7 @@ void SCH_IO_ALTIUM::ParseAltiumSch( const wxString& aFileName ) // Map the loaded Altium file to the project file. wxFileName projectFileName = loadAltiumFileName; - projectFileName.SetPath( m_schematic->Prj().GetProjectPath() ); + projectFileName.SetPath( m_schematic->Project().GetProjectPath() ); projectFileName.SetExt( FILEEXT::KiCadSchematicFileExtension ); sheet->SetFileName( projectFileName.GetFullName() ); screen->SetFileName( projectFileName.GetFullPath() ); @@ -4266,7 +4266,7 @@ void SCH_IO_ALTIUM::ParseParameter( const std::map& aPropert } else { - m_schematic->Prj().GetTextVars()[ paramName ] = elem.text; + m_schematic->Project().GetTextVars()[ paramName ] = elem.text; } } else diff --git a/eeschema/sch_io/cadstar/cadstar_sch_archive_loader.cpp b/eeschema/sch_io/cadstar/cadstar_sch_archive_loader.cpp index 4f00463933..3337847e7a 100644 --- a/eeschema/sch_io/cadstar/cadstar_sch_archive_loader.cpp +++ b/eeschema/sch_io/cadstar/cadstar_sch_archive_loader.cpp @@ -588,7 +588,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheets() ReplaceIllegalFileNameChars( &filename ); filename += wxT( "." ) + wxString( FILEEXT::KiCadSchematicFileExtension ); - wxFileName fn( m_schematic->Prj().GetProjectPath() + filename ); + wxFileName fn( m_schematic->Project().GetProjectPath() + filename ); m_rootSheet->GetScreen()->SetFileName( fn.GetFullPath() ); m_sheetMap.insert( { rootSheetID, m_rootSheet } ); @@ -1541,7 +1541,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadTextVariables() return true; }; - PROJECT* pj = &m_schematic->Prj(); + PROJECT* pj = &m_schematic->Project(); if( pj ) { @@ -2487,7 +2487,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets( const LAYER_ID& sheet->GetField( FIELD_T::SHEET_FILENAME )->SetText( filename ); - wxFileName fn( m_schematic->Prj().GetProjectPath() + filename ); + wxFileName fn( m_schematic->Project().GetProjectPath() + filename ); sheet->GetScreen()->SetFileName( fn.GetFullPath() ); aParentSheet.Last()->GetScreen()->Append( sheet ); instance.push_back( sheet ); diff --git a/eeschema/sch_io/cadstar/sch_io_cadstar_archive.cpp b/eeschema/sch_io/cadstar/sch_io_cadstar_archive.cpp index b5d7855356..d500b54e09 100644 --- a/eeschema/sch_io/cadstar/sch_io_cadstar_archive.cpp +++ b/eeschema/sch_io/cadstar/sch_io_cadstar_archive.cpp @@ -101,14 +101,14 @@ SCH_SHEET* SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile( const wxString& aFi csaLoader.Load( aSchematic, rootSheet ); // SAVE SYMBOLS TO PROJECT LIBRARY: - SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &aSchematic->Prj() ); + SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &aSchematic->Project() ); wxCHECK_MSG( libTable, nullptr, "Could not load symbol lib table." ); - wxFileName prj_fn = aSchematic->Prj().GetProjectFullName(); + wxFileName prj_fn = aSchematic->Project().GetProjectFullName(); wxString libName = CADSTAR_SCH_ARCHIVE_LOADER::CreateLibName( prj_fn, nullptr ); - wxFileName libFileName( aSchematic->Prj().GetProjectPath(), libName, + wxFileName libFileName( aSchematic->Project().GetProjectPath(), libName, FILEEXT::KiCadSymbolLibFileExtension ); IO_RELEASER sch_plugin( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_KICAD ) ); @@ -124,7 +124,7 @@ SCH_SHEET* SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile( const wxString& aFi new SYMBOL_LIB_TABLE_ROW( libName, libTableUri, wxString( "KiCad" ) ) ); // Save project symbol library table. - wxFileName libtab_fn( aSchematic->Prj().GetProjectPath(), + wxFileName libtab_fn( aSchematic->Project().GetProjectPath(), SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() ); // So output formatter goes out of scope and closes the file before reloading. @@ -134,8 +134,8 @@ SCH_SHEET* SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile( const wxString& aFi } // Relaod the symbol library table. - aSchematic->Prj().SetElem( PROJECT::ELEM::SYMBOL_LIB_TABLE, NULL ); - PROJECT_SCH::SchSymbolLibTable( &aSchematic->Prj() ); + aSchematic->Project().SetElem( PROJECT::ELEM::SYMBOL_LIB_TABLE, NULL ); + PROJECT_SCH::SchSymbolLibTable( &aSchematic->Project() ); } // set properties to prevent save file on every symbol save diff --git a/eeschema/sch_io/eagle/sch_io_eagle.cpp b/eeschema/sch_io/eagle/sch_io_eagle.cpp index 2c1b4219b6..3cdbfe81f6 100644 --- a/eeschema/sch_io/eagle/sch_io_eagle.cpp +++ b/eeschema/sch_io/eagle/sch_io_eagle.cpp @@ -118,7 +118,7 @@ wxString SCH_IO_EAGLE::getLibName() if( m_libName.IsEmpty() ) { // Try to come up with a meaningful name - m_libName = m_schematic->Prj().GetProjectName(); + m_libName = m_schematic->Project().GetProjectName(); if( m_libName.IsEmpty() ) { @@ -143,7 +143,7 @@ wxFileName SCH_IO_EAGLE::getLibFileName() wxCHECK( m_schematic, fn ); - fn.Assign( m_schematic->Prj().GetProjectPath(), getLibName(), + fn.Assign( m_schematic->Project().GetProjectPath(), getLibName(), FILEEXT::KiCadSymbolLibFileExtension ); return fn; @@ -421,7 +421,7 @@ SCH_SHEET* SCH_IO_EAGLE::LoadSchematicFile( const wxString& aFileName, SCHEMATIC m_sheetPath.SetPageNumber( wxT( "1" ) ); } - SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Prj() ); + SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Project() ); wxCHECK_MSG( libTable, nullptr, wxT( "Could not load symbol lib table." ) ); @@ -440,7 +440,7 @@ SCH_SHEET* SCH_IO_EAGLE::LoadSchematicFile( const wxString& aFileName, SCHEMATIC wxT( "KiCad" ) ) ); // Save project symbol library table. - wxFileName fn( m_schematic->Prj().GetProjectPath(), + wxFileName fn( m_schematic->Project().GetProjectPath(), SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() ); // So output formatter goes out of scope and closes the file before reloading. @@ -450,8 +450,8 @@ SCH_SHEET* SCH_IO_EAGLE::LoadSchematicFile( const wxString& aFileName, SCHEMATIC } // Reload the symbol library table. - m_schematic->Prj().SetElem( PROJECT::ELEM::SYMBOL_LIB_TABLE, nullptr ); - PROJECT_SCH::SchSymbolLibTable( &m_schematic->Prj() ); + m_schematic->Project().SetElem( PROJECT::ELEM::SYMBOL_LIB_TABLE, nullptr ); + PROJECT_SCH::SchSymbolLibTable( &m_schematic->Project() ); } m_eagleDoc = std::make_unique( currentNode, this ); @@ -1815,7 +1815,7 @@ void SCH_IO_EAGLE::loadInstance( const std::unique_ptr& aInstance, // assume that footprint library is identical to project name if( !package.IsEmpty() ) { - wxString footprint = m_schematic->Prj().GetProjectName() + wxT( ":" ) + package; + wxString footprint = m_schematic->Project().GetProjectName() + wxT( ":" ) + package; symbol->GetField( FIELD_T::FOOTPRINT )->SetText( footprint ); } @@ -1988,7 +1988,7 @@ void SCH_IO_EAGLE::loadInstance( const std::unique_ptr& aInstance, symbol->AddHierarchicalReference( m_sheetPath.Path(), refPrefix + reference, unit ); // Save the pin positions - SYMBOL_LIB_TABLE& schLibTable = *PROJECT_SCH::SchSymbolLibTable( &m_schematic->Prj() ); + SYMBOL_LIB_TABLE& schLibTable = *PROJECT_SCH::SchSymbolLibTable( &m_schematic->Project() ); LIB_SYMBOL* libSymbol = schLibTable.LoadSymbol( symbol->GetLibId() ); wxCHECK( libSymbol, /*void*/ ); @@ -2091,7 +2091,7 @@ EAGLE_LIBRARY* SCH_IO_EAGLE::loadLibrary( const ELIBRARY* aLibrary, EAGLE_LIBRAR if( m_schematic ) { // assume that footprint library is identical to project name - libName = m_schematic->Prj().GetProjectName(); + libName = m_schematic->Project().GetProjectName(); } else { diff --git a/eeschema/sch_io/easyeda/sch_io_easyeda.cpp b/eeschema/sch_io/easyeda/sch_io_easyeda.cpp index e31447e094..414ff10ceb 100644 --- a/eeschema/sch_io/easyeda/sch_io_easyeda.cpp +++ b/eeschema/sch_io/easyeda/sch_io_easyeda.cpp @@ -645,7 +645,7 @@ SCH_SHEET* SCH_IO_EASYEDA::LoadSchematicFile( const wxString& aFileName, SCHEMAT const_cast( rootSheet->m_Uuid ) = screen->GetUuid(); } - SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &aSchematic->Prj() ); + SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &aSchematic->Project() ); wxCHECK_MSG( libTable, nullptr, wxS( "Could not load symbol lib table." ) ); LoadSchematic( aSchematic, rootSheet, aFileName ); diff --git a/eeschema/sch_io/easyedapro/sch_io_easyedapro.cpp b/eeschema/sch_io/easyedapro/sch_io_easyedapro.cpp index 90517d2fd7..f136a76b02 100644 --- a/eeschema/sch_io/easyedapro/sch_io_easyedapro.cpp +++ b/eeschema/sch_io/easyedapro/sch_io_easyedapro.cpp @@ -456,12 +456,12 @@ SCH_SHEET* SCH_IO_EASYEDAPRO::LoadSchematicFile( const wxString& aFileName, screen->SetFileName( aFileName ); rootSheet->SetScreen( screen ); - + // Virtual root sheet UUID must be the same as the schematic file UUID. const_cast( rootSheet->m_Uuid ) = screen->GetUuid(); } - SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &aSchematic->Prj() ); + SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &aSchematic->Project() ); wxCHECK_MSG( libTable, nullptr, wxS( "Could not load symbol lib table." ) ); SCH_EASYEDAPRO_PARSER parser( nullptr, nullptr ); @@ -616,7 +616,7 @@ SCH_SHEET* SCH_IO_EASYEDAPRO::LoadSchematicFile( const wxString& aFileName, libTable->InsertRow( new SYMBOL_LIB_TABLE_ROW( libName, libTableUri, wxS( "KiCad" ) ) ); // Save project symbol library table. - wxFileName fn( aSchematic->Prj().GetProjectPath(), + wxFileName fn( aSchematic->Project().GetProjectPath(), SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() ); // So output formatter goes out of scope and closes the file before reloading. @@ -626,8 +626,8 @@ SCH_SHEET* SCH_IO_EASYEDAPRO::LoadSchematicFile( const wxString& aFileName, } // Relaod the symbol library table. - aSchematic->Prj().SetElem( PROJECT::ELEM::SYMBOL_LIB_TABLE, NULL ); - PROJECT_SCH::SchSymbolLibTable( &aSchematic->Prj() ); + aSchematic->Project().SetElem( PROJECT::ELEM::SYMBOL_LIB_TABLE, NULL ); + PROJECT_SCH::SchSymbolLibTable( &aSchematic->Project() ); } // set properties to prevent save file on every symbol save diff --git a/eeschema/sch_io/kicad_legacy/sch_io_kicad_legacy.cpp b/eeschema/sch_io/kicad_legacy/sch_io_kicad_legacy.cpp index 551ae46b96..c5f4fea3ca 100644 --- a/eeschema/sch_io/kicad_legacy/sch_io_kicad_legacy.cpp +++ b/eeschema/sch_io/kicad_legacy/sch_io_kicad_legacy.cpp @@ -151,13 +151,13 @@ SCH_SHEET* SCH_IO_KICAD_LEGACY::LoadSchematicFile( const wxString& aFileName, SC } if( m_path.IsEmpty() ) - m_path = aSchematic->Prj().GetProjectPath(); + m_path = aSchematic->Project().GetProjectPath(); wxLogTrace( traceSchLegacyPlugin, "Normalized append path \"%s\".", m_path ); } else { - m_path = aSchematic->Prj().GetProjectPath(); + m_path = aSchematic->Project().GetProjectPath(); } m_currentPath.push( m_path ); diff --git a/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp b/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp index 27d05fcb8d..da882e667a 100644 --- a/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp +++ b/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp @@ -127,13 +127,13 @@ SCH_SHEET* SCH_IO_KICAD_SEXPR::LoadSchematicFile( const wxString& aFileName, SCH } if( m_path.IsEmpty() ) - m_path = aSchematic->Prj().GetProjectPath(); + m_path = aSchematic->Project().GetProjectPath(); wxLogTrace( traceSchPlugin, "Normalized append path \"%s\".", m_path ); } else { - m_path = aSchematic->Prj().GetProjectPath(); + m_path = aSchematic->Project().GetProjectPath(); } m_currentPath.push( m_path ); @@ -148,7 +148,7 @@ SCH_SHEET* SCH_IO_KICAD_SEXPR::LoadSchematicFile( const wxString& aFileName, SCH // Do not use wxPATH_UNIX as option in MakeRelativeTo(). It can create incorrect // relative paths on Windows, because paths have a disk identifier (C:, D: ...) - relPath.MakeRelativeTo( aSchematic->Prj().GetProjectPath() ); + relPath.MakeRelativeTo( aSchematic->Project().GetProjectPath() ); newSheet->SetFileName( relPath.GetFullPath() ); m_rootSheet = newSheet.get(); @@ -1064,7 +1064,7 @@ void SCH_IO_KICAD_SEXPR::saveSheet( SCH_SHEET* aSheet, const SCH_SHEET_LIST& aSh wxString projectName; if( sheetInstances[i].m_Path[0] == rootSheetUuid ) - projectName = m_schematic->Prj().GetProjectName(); + projectName = m_schematic->Project().GetProjectName(); else projectName = sheetInstances[i].m_ProjectName; diff --git a/eeschema/sch_io/ltspice/ltspice_schematic.cpp b/eeschema/sch_io/ltspice/ltspice_schematic.cpp index e1111d13f3..2275e858dc 100644 --- a/eeschema/sch_io/ltspice/ltspice_schematic.cpp +++ b/eeschema/sch_io/ltspice/ltspice_schematic.cpp @@ -171,7 +171,7 @@ void LTSPICE_SCHEMATIC::Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSheet, ascFiles[ascFiles[i].ParentIndex].Sheet->GetScreen()->Append( curSheet ); - curSheet->GetScreen()->SetFileName( m_schematic->Prj().GetProjectPath() + sheetName + ".kicad_sch" ); + curSheet->GetScreen()->SetFileName( m_schematic->Project().GetProjectPath() + sheetName + ".kicad_sch" ); } else { diff --git a/eeschema/sch_io/ltspice/sch_io_ltspice.cpp b/eeschema/sch_io/ltspice/sch_io_ltspice.cpp index 1e8a101512..062f1bbf61 100644 --- a/eeschema/sch_io/ltspice/sch_io_ltspice.cpp +++ b/eeschema/sch_io/ltspice/sch_io_ltspice.cpp @@ -71,7 +71,7 @@ SCH_SHEET* SCH_IO_LTSPICE::LoadSchematicFile( const wxString& aFileName, SCHEMAT const_cast( rootSheet->m_Uuid ) = screen->GetUuid(); } - SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &aSchematic->Prj() ); + SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &aSchematic->Project() ); wxCHECK_MSG( libTable, nullptr, "Could not load symbol lib table." ); diff --git a/eeschema/sch_item.cpp b/eeschema/sch_item.cpp index a6b378dc60..46d39240e6 100644 --- a/eeschema/sch_item.cpp +++ b/eeschema/sch_item.cpp @@ -386,8 +386,7 @@ std::shared_ptr SCH_ITEM::GetEffectiveNetClass( const SCH_SHEET_PATH* if( schematic ) { - std::shared_ptr& netSettings = - schematic->Prj().GetProjectFile().m_NetSettings; + std::shared_ptr& netSettings = schematic->Project().GetProjectFile().m_NetSettings; SCH_CONNECTION* connection = Connection( aSheet ); if( connection ) diff --git a/eeschema/sch_plotter.cpp b/eeschema/sch_plotter.cpp index 505d2e97ca..759acb361c 100644 --- a/eeschema/sch_plotter.cpp +++ b/eeschema/sch_plotter.cpp @@ -123,12 +123,12 @@ void SCH_PLOTTER::createPDFFile( const SCH_PLOT_OPTS& aPlotOpts, wxCHECK( m_schematic, /* void */ ); // Allocate the plotter and set the job level parameter - PDF_PLOTTER* plotter = new PDF_PLOTTER( &m_schematic->Prj() ); + PDF_PLOTTER* plotter = new PDF_PLOTTER( &m_schematic->Project() ); plotter->SetRenderSettings( aRenderSettings ); plotter->SetColorMode( !aPlotOpts.m_blackAndWhite ); plotter->SetCreator( wxT( "Eeschema-PDF" ) ); plotter->SetTitle( ExpandTextVars( m_schematic->RootScreen()->GetTitleBlock().GetTitle(), - &m_schematic->Prj() ) ); + &m_schematic->Project() ) ); wxString msg; wxFileName plotFileName; @@ -261,7 +261,7 @@ void SCH_PLOTTER::plotOneSheetPDF( PLOTTER* aPlotter, SCH_SCREEN* aScreen, wxString sheetPath = m_schematic->CurrentSheet().PathHumanReadable(); const PAGE_INFO& actualPage = aScreen->GetPageSettings(); // page size selected in schematic - PlotDrawingSheet( aPlotter, &aScreen->Schematic()->Prj(), + PlotDrawingSheet( aPlotter, &aScreen->Schematic()->Project(), aScreen->GetTitleBlock(), actualPage, aScreen->Schematic()->GetProperties(), @@ -475,7 +475,7 @@ bool SCH_PLOTTER::plotOneSheetPS( const wxString& aFileName, SCH_SCREEN* aScreen wxString sheetPath = m_schematic->CurrentSheet().PathHumanReadable(); COLOR4D color = plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET ); - PlotDrawingSheet( plotter, &aScreen->Schematic()->Prj(), + PlotDrawingSheet( plotter, &aScreen->Schematic()->Project(), aScreen->GetTitleBlock(), aPageInfo, aScreen->Schematic()->GetProperties(), aScreen->GetPageNumber(), aScreen->GetPageCount(), sheetName, sheetPath, @@ -654,7 +654,7 @@ bool SCH_PLOTTER::plotOneSheetSVG( const wxString& aFileName, SCH_SCREEN* aScree wxString sheetPath = m_schematic->CurrentSheet().PathHumanReadable(); COLOR4D color = plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET ); - PlotDrawingSheet( plotter, &aScreen->Schematic()->Prj(), + PlotDrawingSheet( plotter, &aScreen->Schematic()->Project(), aScreen->GetTitleBlock(), actualPage, aScreen->Schematic()->GetProperties(), aScreen->GetPageNumber(), @@ -802,7 +802,7 @@ bool SCH_PLOTTER::plotOneSheetDXF( const wxString& aFileName, SCH_SCREEN* aScree wxString sheetPath = m_schematic->CurrentSheet().PathHumanReadable(); COLOR4D color = plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET ); - PlotDrawingSheet( plotter, &m_schematic->Prj(), + PlotDrawingSheet( plotter, &m_schematic->Project(), aScreen->GetTitleBlock(), pageInfo, aScreen->Schematic()->GetProperties(), aScreen->GetPageNumber(), diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index fe603b1cab..6755aecb07 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -667,10 +667,10 @@ void SCH_SCREEN::UpdateSymbolLinks( REPORTER* aReporter ) wxString msg; std::vector symbols; - SYMBOL_LIB_TABLE* libs = PROJECT_SCH::SchSymbolLibTable( &Schematic()->Prj() ); + SYMBOL_LIB_TABLE* libs = PROJECT_SCH::SchSymbolLibTable( &Schematic()->Project() ); // This will be a nullptr if an s-expression schematic is loaded. - SYMBOL_LIBS* legacyLibs = PROJECT_SCH::SchLibs( &Schematic()->Prj() ); + SYMBOL_LIBS* legacyLibs = PROJECT_SCH::SchLibs( &Schematic()->Project() ); for( SCH_ITEM* item : Items().OfType( SCH_SYMBOL_T ) ) symbols.push_back( static_cast( item ) ); @@ -1739,7 +1739,7 @@ bool SCH_SCREEN::InProjectPath() const wxCHECK( Schematic() && !m_fileName.IsEmpty(), false ); wxFileName thisScreenFn( m_fileName ); - wxFileName thisProjectFn( Schematic()->Prj().GetProjectFullName() ); + wxFileName thisProjectFn( Schematic()->Project().GetProjectFullName() ); wxCHECK( thisProjectFn.IsAbsolute(), false ); @@ -2146,7 +2146,7 @@ void SCH_SCREEN::MigrateSimModels() for( SCH_ITEM* item : Items().OfType( SCH_SYMBOL_T ) ) { SCH_SYMBOL* symbol = static_cast( item ); - SIM_MODEL::MigrateSimModel( *symbol, &Schematic()->Prj() ); + SIM_MODEL::MigrateSimModel( *symbol, &Schematic()->Project() ); } } diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 6ca36082c9..7ab3acfb46 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -244,7 +244,7 @@ bool SCH_SHEET::ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* token, in } } - PROJECT* project = &schematic->Prj(); + PROJECT* project = &schematic->Project(); // We cannot resolve text variables initially on load as we need to first load the screen and // then parse the hierarchy. So skip the resolution if the screen isn't set yet diff --git a/eeschema/sch_symbol.cpp b/eeschema/sch_symbol.cpp index 4e37c11aa4..63db697fc0 100644 --- a/eeschema/sch_symbol.cpp +++ b/eeschema/sch_symbol.cpp @@ -1252,7 +1252,7 @@ bool SCH_SYMBOL::ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* token, i int precision = precisionStr.IsEmpty() ? 3 : precisionStr[0] - '0'; wxString range = rangeStr.IsEmpty() ? wxString( wxS( "~A" ) ) : rangeStr; - SIM_LIB_MGR simLibMgr( &schematic->Prj() ); + SIM_LIB_MGR simLibMgr( &schematic->Project() ); std::vector embeddedFilesStack; embeddedFilesStack.push_back( schematic->GetEmbeddedFiles() ); diff --git a/eeschema/sch_view.cpp b/eeschema/sch_view.cpp index 3b6335758d..594dc02e0d 100644 --- a/eeschema/sch_view.cpp +++ b/eeschema/sch_view.cpp @@ -115,7 +115,7 @@ void SCH_VIEW::DisplaySheet( const SCH_SCREEN *aScreen ) Add( item ); m_drawingSheet.reset( new DS_PROXY_VIEW_ITEM( schIUScale, &aScreen->GetPageSettings(), - &aScreen->Schematic()->Prj(), + &aScreen->Schematic()->Project(), &aScreen->GetTitleBlock(), aScreen->Schematic()->GetProperties() ) ); m_drawingSheet->SetPageNumber( TO_UTF8( aScreen->GetPageNumber() ) ); diff --git a/eeschema/schematic.h b/eeschema/schematic.h index f440586e5b..a593efaeb4 100644 --- a/eeschema/schematic.h +++ b/eeschema/schematic.h @@ -100,7 +100,7 @@ public: void Reset(); /// Return a reference to the project this schematic is part of - PROJECT& Prj() const { return *m_project; } + PROJECT& Project() const { return *m_project; } void SetProject( PROJECT* aPrj ); const std::map* GetProperties() { return &m_properties; } diff --git a/eeschema/sim/sim_model_ibis.cpp b/eeschema/sim/sim_model_ibis.cpp index e65f956c1c..83260d26be 100644 --- a/eeschema/sim/sim_model_ibis.cpp +++ b/eeschema/sim/sim_model_ibis.cpp @@ -62,7 +62,7 @@ std::string SPICE_GENERATOR_IBIS::IbisDevice( const SPICE_ITEM& aItem, SCHEMATIC bool diffMode = GetFieldValue( &aItem.fields, SIM_LIBRARY_IBIS::DIFF_FIELD, true, 0 ) == "1"; WX_STRING_REPORTER reporter; - SIM_LIB_MGR mgr( &aSchematic->Prj() ); + SIM_LIB_MGR mgr( &aSchematic->Project() ); std::vector embeddedFilesStack; embeddedFilesStack.push_back( aSchematic->GetEmbeddedFiles() ); diff --git a/qa/schematic_utils/eeschema_test_utils.cpp b/qa/schematic_utils/eeschema_test_utils.cpp index d57f2f7c68..e8fd967ca8 100644 --- a/qa/schematic_utils/eeschema_test_utils.cpp +++ b/qa/schematic_utils/eeschema_test_utils.cpp @@ -132,7 +132,7 @@ wxFileName KI_TEST::SCHEMATIC_TEST_FIXTURE::GetSchematicPath( const wxString& aB template wxString TEST_NETLIST_EXPORTER_FIXTURE::GetNetlistPath( bool aTest ) { - wxFileName netFile = m_schematic->Prj().GetProjectFullName(); + wxFileName netFile = m_schematic->Project().GetProjectFullName(); if( aTest ) netFile.SetName( netFile.GetName() + "_test" ); diff --git a/qa/schematic_utils/schematic_file_util.cpp b/qa/schematic_utils/schematic_file_util.cpp index 73295cdf1c..3d54a0b354 100644 --- a/qa/schematic_utils/schematic_file_util.cpp +++ b/qa/schematic_utils/schematic_file_util.cpp @@ -121,7 +121,7 @@ void LoadSchematic( SETTINGS_MANAGER& aSettingsManager, const wxString& aRelPath { if( aSchematic ) { - PROJECT* prj = &aSchematic->Prj(); + PROJECT* prj = &aSchematic->Project(); aSchematic->SetProject( nullptr ); aSettingsManager.UnloadProject( prj, false ); diff --git a/qa/tests/eeschema/test_sch_netclass.cpp b/qa/tests/eeschema/test_sch_netclass.cpp index 2e23ee0f18..048ba5a573 100644 --- a/qa/tests/eeschema/test_sch_netclass.cpp +++ b/qa/tests/eeschema/test_sch_netclass.cpp @@ -56,7 +56,7 @@ BOOST_AUTO_TEST_CASE( TestMultiNetclasses ) { LoadSchematic( "multinetclasses" ); - std::shared_ptr& netSettings = m_schematic->Prj().GetProjectFile().m_NetSettings; + std::shared_ptr& netSettings = m_schematic->Project().GetProjectFile().m_NetSettings; std::shared_ptr nc = netSettings->GetEffectiveNetClass( "/BUS.SIGNAL" ); BOOST_CHECK_EQUAL( nc->GetName(), "CLASS2,CLASS1,Default" ); diff --git a/qa/tests/eeschema/test_sch_screen.cpp b/qa/tests/eeschema/test_sch_screen.cpp index b4c642d3b3..502ab28d3e 100644 --- a/qa/tests/eeschema/test_sch_screen.cpp +++ b/qa/tests/eeschema/test_sch_screen.cpp @@ -88,7 +88,7 @@ BOOST_AUTO_TEST_CASE( TestInProjectPath ) // File is in a completely different path with the same folder depth. testFn.SetPath( "/home/foo/kicad" ); - wxFileName projectFn( m_schematic->Prj().GetProjectFullName() ); + wxFileName projectFn( m_schematic->Project().GetProjectFullName() ); // Just in case someone has a build path with no subfolders. BOOST_CHECK( testFn.GetDirCount() < projectFn.GetDirCount() ); diff --git a/qa/tests/spice/test_netlist_exporter_spice.h b/qa/tests/spice/test_netlist_exporter_spice.h index 1ababde042..b53aee23c0 100644 --- a/qa/tests/spice/test_netlist_exporter_spice.h +++ b/qa/tests/spice/test_netlist_exporter_spice.h @@ -99,7 +99,7 @@ public: wxString GetNetlistPath( bool aTest = false ) override { - wxFileName netFile = m_schematic->Prj().GetProjectFullName(); + wxFileName netFile = m_schematic->Project().GetProjectFullName(); if( aTest ) netFile.SetName( netFile.GetName() + "_test" ); diff --git a/qa/tests/spice/test_sim_regressions.cpp b/qa/tests/spice/test_sim_regressions.cpp index 0e63308a1d..54ccd7cf90 100644 --- a/qa/tests/spice/test_sim_regressions.cpp +++ b/qa/tests/spice/test_sim_regressions.cpp @@ -53,7 +53,7 @@ public: wxString GetNetlistPath( bool aTest = false ) override { - wxFileName netFile = m_schematic->Prj().GetProjectFullName(); + wxFileName netFile = m_schematic->Project().GetProjectFullName(); if( aTest ) netFile.SetName( netFile.GetName() + "_test" );