[libcalamaresui] Make Python code const
- This is always loaded into the Python context, so it may as well be done only once.
This commit is contained in:
parent
45b95e1b65
commit
f26ac63c07
@ -143,12 +143,12 @@ PythonQtViewModule::loadSelf()
|
||||
return;
|
||||
}
|
||||
|
||||
QString calamares_module_annotation =
|
||||
static const QLatin1Literal calamares_module_annotation(
|
||||
"_calamares_module_typename = ''\n"
|
||||
"def calamares_module(viewmodule_type):\n"
|
||||
" global _calamares_module_typename\n"
|
||||
" _calamares_module_typename = viewmodule_type.__name__\n"
|
||||
" return viewmodule_type\n";
|
||||
" return viewmodule_type\n");
|
||||
|
||||
// Load in the decorator
|
||||
PythonQt::self()->evalScript( cxt, calamares_module_annotation );
|
||||
|
Loading…
Reference in New Issue
Block a user