Skip to content

Commit 480bd2e

Browse files
authored
Expose Signal and Slot regardless of qt package (#5)
Signed-off-by: Nir Izraeli <[email protected]>
1 parent 08c9bc8 commit 480bd2e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Currently addressed issues are:
1818

1919
1. `action_handler_t` is not a python class (Doesn't inherit `Object`) before IDA version 6.95. idasix makes sure `action_handler_t` always inherits `Object`, which enables some more python magic.
2020
2. Linux IDA versions have an issue with using packages installed by the external python interpreter. This is a mishap by IDA. idasix adds the right "site-packages" directory to the list of python packages.
21-
3. with IDA version 6.9, PySide (a python Qt4 library) was replaced with pyqt (using newer Qt5). idasix exposes one interface (`form idasix import QtGui`) to the appropriate version and tries mitigating some of the differences between Qt5 and 4.
21+
3. With IDA version 6.9, PySide (a python Qt4 library) was replaced with pyqt (using newer Qt5). idasix exposes one interface (`form idasix import QtGui`) to the appropriate version and tries mitigating some of the differences between Qt5 and 4.
22+
4. Expose `QtCore.Signal` and `QtCore.Slot` from `idasix.QtCore` in IDA versions using pyqt5.
2223

2324
# Projects using idasix
2425

idasix.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,19 @@ class action_handler_t_objprotector(action_handler_t_object):
9595

9696
ida_kernwin.action_handler_t = action_handler_t_objprotector
9797

98+
@staticmethod
99+
def qtsignalslot():
100+
"""While pre-6.8 qt4 library pyside exposted `Qtcore.Signal` and
101+
`QtCore.Slot`, new pyqt library exposes those same methods as
102+
`QtCore.pyqtSignal` and `QtCore.pyqtSlot`. This fix makes sure
103+
`Qtcore.Signal` and `QtCore.Slot` are always available"""
104+
if IDA_SDK_VERSION >= 690:
105+
QtCore.Signal = QtCore.pyqtSignal
106+
QtCore.Slot = QtCore.pyqtSlot
107+
elif IDA_SDK_VERSION < 690:
108+
pass
109+
110+
98111
Fix.packagespath()
99112
Fix.actionhandlerobject()
113+
Fix.qtsignalslot()

0 commit comments

Comments
 (0)