Update pluginmanager.cpp

This commit is contained in:
恍兮惚兮 2024-03-26 15:06:17 +08:00
parent 8e65356e07
commit cda7fbaf53

View File

@ -66,7 +66,6 @@ Pluginmanager::Pluginmanager(LunaHost* _host):host(_host){
try { try {
std::scoped_lock lock(OnNewSentenceSLock); std::scoped_lock lock(OnNewSentenceSLock);
OnNewSentenceS[L"InternalClipBoard"]=GetProcAddress(GetModuleHandle(0),"OnNewSentence");//内部链接的剪贴板插件
std::vector<std::wstring>collectQtplugs; std::vector<std::wstring>collectQtplugs;
for (auto i=0;i<host->configs->pluginsnum();i++) { for (auto i=0;i<host->configs->pluginsnum();i++) {
auto plg=host->configs->pluginsget(i); auto plg=host->configs->pluginsget(i);
@ -82,6 +81,9 @@ Pluginmanager::Pluginmanager(LunaHost* _host):host(_host){
} }
loadqtdlls(collectQtplugs); loadqtdlls(collectQtplugs);
OnNewSentenceS[L"InternalClipBoard"]=GetProcAddress(GetModuleHandle(0),"OnNewSentence");//内部链接的剪贴板插件
} catch (const std::exception& ex) { } catch (const std::exception& ex) {
std::cerr << "Error: " << ex.what() << std::endl; std::cerr << "Error: " << ex.what() << std::endl;
} }