This commit is contained in:
恍兮惚兮 2024-08-17 21:59:43 +08:00
parent e05aed69bc
commit 51f0688011
2 changed files with 7 additions and 14 deletions

View File

@ -764,16 +764,15 @@ class MAINUI:
aclass = importlib.import_module("translator." + classname).TS
elif which == 1:
aclass = importlib.import_module("userconfig.copyed." + classname).TS
return aclass(classname)
except Exception as e:
print_exc()
self.displayinfomessage(
globalconfig["fanyi"][classname]["name"]
+ " import failed : "
+ str(stringfyerror(e)),
"<msg_error_not_refresh>",
)
return None
return aclass(classname)
raise e
@threader
def prepare(self, now=None, _=None):
@ -802,17 +801,15 @@ class MAINUI:
if _type not in globalconfig[rankkey]:
globalconfig[rankkey].append(_type)
else:
if _type in globalconfig[rankkey]:
globalconfig[rankkey].remove(_type)
if not use:
return
item = initmethod(_type)
if item:
dictobject[_type] = item
except:
if _type in globalconfig[rankkey]:
globalconfig[rankkey].remove(_type)
print_exc()
@threader
@ -820,13 +817,9 @@ class MAINUI:
self.commonloader("cishu", self.cishus, self.cishuinitmethod, type_)
def cishuinitmethod(self, type_):
try:
aclass = importlib.import_module("cishu." + type_)
aclass = getattr(aclass, type_)
except:
print_exc()
return
aclass = importlib.import_module("cishu." + type_)
aclass = getattr(aclass, type_)
return aclass(type_)
def maybesetedittext(self, text):

View File

@ -29,7 +29,7 @@ include(generate_product_version)
set(VERSION_MAJOR 5)
set(VERSION_MINOR 28)
set(VERSION_PATCH 2)
set(VERSION_PATCH 3)
add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h)