delay import to not load Qt* when running under idalib

closes #2752
This commit is contained in:
mr-tz
2025-11-10 12:13:35 +00:00
parent cbd1cb2b7d
commit 7525de7bbd
2 changed files with 4 additions and 1 deletions

View File

@@ -44,6 +44,7 @@
- add `ida-plugin.json` for inclusion in the IDA Pro plugin repository @williballenthin - add `ida-plugin.json` for inclusion in the IDA Pro plugin repository @williballenthin
- ida plugin: add Qt compatibility layer for PyQt5 and PySide6 support @williballenthin #2707 - ida plugin: add Qt compatibility layer for PyQt5 and PySide6 support @williballenthin #2707
- delay import to not load Qt* when running under idalib @mr-tz #2752
### Development ### Development

View File

@@ -17,7 +17,6 @@ import logging
import idaapi import idaapi
import ida_kernwin import ida_kernwin
from capa.ida.plugin.form import CapaExplorerForm
from capa.ida.plugin.icon import ICON from capa.ida.plugin.icon import ICON
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -74,6 +73,9 @@ class CapaExplorerPlugin(idaapi.plugin_t):
arg (int): bitflag. Setting LSB enables automatic analysis upon arg (int): bitflag. Setting LSB enables automatic analysis upon
loading. The other bits are currently undefined. See `form.Options`. loading. The other bits are currently undefined. See `form.Options`.
""" """
# delay import to not trigger load of Qt components when not running in idaq, i.e., in idalib
from capa.ida.plugin.form import CapaExplorerForm
if not self.form: if not self.form:
self.form = CapaExplorerForm(self.PLUGIN_NAME, arg) self.form = CapaExplorerForm(self.PLUGIN_NAME, arg)
else: else: