Update pluginmanager.cpp

This commit is contained in:
恍兮惚兮 2024-03-29 15:12:04 +08:00
parent bf9a4f6320
commit 86cb1ec962

View File

@ -128,9 +128,10 @@ void Pluginmanager::loadqtdlls(std::vector<std::wstring>&collectQtplugs){
}
SetEnvironmentVariableW(L"PATH",envs.c_str());
// auto modules=QtLoadLibrarys(collectQtplugs);
// if(modules.empty())return;
#if 1
auto modules=QtLoadLibrarys(collectQtplugs);
if(modules.empty())return;
#else
auto QtLoadLibrary = loadqtloader(pluginpath);
if(!QtLoadLibrary){
@ -145,7 +146,7 @@ void Pluginmanager::loadqtdlls(std::vector<std::wstring>&collectQtplugs){
}
auto modules=QtLoadLibrary(saves.data(),collectQtplugs.size());
for(auto str:saves)delete str;
#endif
for(int i=0;i<collectQtplugs.size();i++){
OnNewSentenceS[collectQtplugs[i]]=GetProcAddress(modules[i],"OnNewSentence");
}