Browse Source

revert link-time plugin registration causing plugins to be incorrectly enumerated

pull/5/merge
Tomasz Włostowski 8 years ago
parent
commit
a67d24a34e
  1. 4
      pcbnew/eagle_plugin.cpp
  2. 4
      pcbnew/github/github_plugin.cpp
  3. 4
      pcbnew/gpcb_plugin.cpp
  4. 7
      pcbnew/io_mgr.cpp
  5. 4
      pcbnew/kicad_plugin.cpp
  6. 4
      pcbnew/legacy_plugin.cpp
  7. 4
      pcbnew/pcad2kicadpcb_plugin/pcad_plugin.cpp
  8. 4
      qa/pcb_test_window/CMakeLists.txt

4
pcbnew/eagle_plugin.cpp

@ -2254,7 +2254,3 @@ bool EAGLE_PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
}
*/
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::EAGLE, wxT("Eagle"), []() -> PLUGIN* { return new EAGLE_PLUGIN; } );
};

4
pcbnew/github/github_plugin.cpp

@ -594,10 +594,6 @@ void GITHUB_PLUGIN::remoteGetZip( const wxString& aRepoURL )
}
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::GITHUB, wxT("Github"), []() -> PLUGIN* { return new GITHUB_PLUGIN; } );
};
#if 0 && defined(STANDALONE)
int main( int argc, char** argv )

4
pcbnew/gpcb_plugin.cpp

@ -1141,7 +1141,3 @@ bool GPCB_PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
return m_cache->IsWritable();
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::GEDA_PCB, wxT("GEDA/Pcb"), []() -> PLUGIN* { return new GPCB_PLUGIN; } );
};

7
pcbnew/io_mgr.cpp

@ -204,3 +204,10 @@ void IO_MGR::Save( PCB_FILE_T aFileType, const wxString& aFileName, BOARD* aBoar
THROW_IO_ERROR( wxString::Format( FMT_NOTFOUND, ShowType( aFileType ).GetData() ) );
}
static IO_MGR::REGISTER_PLUGIN registerEaglePlugin( IO_MGR::EAGLE, wxT("Eagle"), []() -> PLUGIN* { return new EAGLE_PLUGIN; } );
static IO_MGR::REGISTER_PLUGIN registerKicadPlugin( IO_MGR::KICAD_SEXP, wxT("KiCad"), []() -> PLUGIN* { return new PCB_IO; } );
static IO_MGR::REGISTER_PLUGIN registerPcadPlugin( IO_MGR::PCAD, wxT("P-Cad"), []() -> PLUGIN* { return new PCAD_PLUGIN; } );
static IO_MGR::REGISTER_PLUGIN registerGithubPlugin( IO_MGR::GITHUB, wxT("Github"), []() -> PLUGIN* { return new GITHUB_PLUGIN; } );
static IO_MGR::REGISTER_PLUGIN registerLegacyPlugin( IO_MGR::LEGACY, wxT("Legacy"), []() -> PLUGIN* { return new LEGACY_PLUGIN; } );
static IO_MGR::REGISTER_PLUGIN registerGPCBPlugin( IO_MGR::GEDA_PCB, wxT("GEDA/Pcb"), []() -> PLUGIN* { return new GPCB_PLUGIN; } );

4
pcbnew/kicad_plugin.cpp

@ -2214,7 +2214,3 @@ bool PCB_IO::IsFootprintLibWritable( const wxString& aLibraryPath )
return m_cache->IsWritable();
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::KICAD_SEXP, wxT("KiCad"), []() -> PLUGIN* { return new PCB_IO; } );
};

4
pcbnew/legacy_plugin.cpp

@ -3505,7 +3505,3 @@ LEGACY_PLUGIN::~LEGACY_PLUGIN()
delete m_cache;
delete m_mapping;
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::LEGACY, wxT("Legacy"), []() -> PLUGIN* { return new LEGACY_PLUGIN; } );
};

4
pcbnew/pcad2kicadpcb_plugin/pcad_plugin.cpp

@ -89,7 +89,3 @@ BOARD* PCAD_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const P
return m_board;
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::PCAD, wxT("P-Cad"), []() -> PLUGIN* { return new PCAD_PLUGIN; } );
};

4
qa/pcb_test_window/CMakeLists.txt

@ -27,7 +27,7 @@ find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc R
add_definitions(-DBOOST_TEST_DYN_LINK -DPCBNEW)
add_dependencies( pnsrouter pcbcommon )
add_dependencies( pnsrouter pcbcommon pcad2kicadpcb github_plugin )
add_executable(test_window
test.cpp
@ -80,6 +80,8 @@ target_link_libraries( test_window
pcbcommon
bitmaps
gal
pcad2kicadpcb
github_plugin
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}

Loading…
Cancel
Save