Browse Source

Fix linker error (doubly defined symbol).

7.0
Jeff Young 3 years ago
parent
commit
fdf71ba005
  1. 9
      qa/schematic_utils/schematic_file_util.cpp
  2. 11
      qa/schematic_utils/schematic_file_util.h

9
qa/schematic_utils/schematic_file_util.cpp

@ -18,8 +18,6 @@
* http://www.gnu.org/licenses/ * http://www.gnu.org/licenses/
*/ */
#include <schematic_file_util.h> #include <schematic_file_util.h>
#include <settings/settings_manager.h> #include <settings/settings_manager.h>
@ -28,7 +26,6 @@
#include <lib_textbox.h> #include <lib_textbox.h>
#include <schematic.h> #include <schematic.h>
#include <sch_screen.h> #include <sch_screen.h>
#include <sch_io_mgr.h>
// For SCH parsing // For SCH parsing
#include <sch_plugins/kicad/sch_sexpr_plugin.h> #include <sch_plugins/kicad/sch_sexpr_plugin.h>
@ -44,7 +41,7 @@ namespace KI_TEST
#define QA_EESCHEMA_DATA_LOCATION "???" #define QA_EESCHEMA_DATA_LOCATION "???"
#endif #endif
std::string GetEeschemaTestDataDir()
std::string getEeschemaTestDataDir()
{ {
const char* env = std::getenv( "KICAD_TEST_EESCHEMA_DATA_DIR" ); const char* env = std::getenv( "KICAD_TEST_EESCHEMA_DATA_DIR" );
std::string fn; std::string fn;
@ -95,7 +92,6 @@ std::unique_ptr<SCHEMATIC> ReadSchematicFromStream( std::istream& aStream, PROJE
{ {
} }
return schematic; return schematic;
} }
@ -123,7 +119,7 @@ void LoadSchematic( SETTINGS_MANAGER& aSettingsManager, const wxString& aRelPath
aSchematic->Reset(); aSchematic->Reset();
} }
std::string absPath = GetEeschemaTestDataDir() + aRelPath.ToStdString();
std::string absPath = getEeschemaTestDataDir() + aRelPath.ToStdString();
wxFileName projectFile( absPath + ".kicad_pro" ); wxFileName projectFile( absPath + ".kicad_pro" );
wxFileName legacyProject( absPath + ".pro" ); wxFileName legacyProject( absPath + ".pro" );
std::string schematicPath = absPath + ".kicad_sch"; std::string schematicPath = absPath + ".kicad_sch";
@ -163,7 +159,6 @@ void LoadSchematic( SETTINGS_MANAGER& aSettingsManager, const wxString& aRelPath
// SchematicCleanUp must be freed from its UI dependencies. // SchematicCleanUp must be freed from its UI dependencies.
aSchematic->ConnectionGraph()->Recalculate( sheets, true ); aSchematic->ConnectionGraph()->Recalculate( sheets, true );
} }
} // namespace KI_TEST } // namespace KI_TEST

11
qa/schematic_utils/schematic_file_util.h

@ -31,16 +31,15 @@ class wxString;
namespace KI_TEST namespace KI_TEST
{ {
std::string GetEeschemaTestDataDir();
void DumpSchematicToFile( SCHEMATIC& aSchematic, SCH_SHEET& aSheet, const std::string& aFilename );
void DumpSchematicToFile( SCHEMATIC& aSchematic, SCH_SHEET& aSheet,
const std::string& aFilename );
std::unique_ptr<SCHEMATIC> ReadSchematicFromStream( std::istream& aStream, PROJECT* aProject ); std::unique_ptr<SCHEMATIC> ReadSchematicFromStream( std::istream& aStream, PROJECT* aProject );
std::unique_ptr<SCHEMATIC> ReadSchematicFromFile( const std::string& aFilename, PROJECT* aProject );
std::unique_ptr<SCHEMATIC> ReadSchematicFromFile( const std::string& aFilename,
PROJECT* aProject );
void LoadSchematic( SETTINGS_MANAGER& aSettingsManager, const wxString& aRelPath, void LoadSchematic( SETTINGS_MANAGER& aSettingsManager, const wxString& aRelPath,
std::unique_ptr<SCHEMATIC>& aSchematic );
std::unique_ptr<SCHEMATIC>& aSchematic );
} }
#endif /* QA_QA_UTILS_SCHEMATIC_SCHEMATIC_FILE_UTIL_H_ */ #endif /* QA_QA_UTILS_SCHEMATIC_SCHEMATIC_FILE_UTIL_H_ */
Loading…
Cancel
Save