capa explorer: PyQt / PySide upgrade
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 726
- Avg merge
- 11d 11h
- Merged PRs (30d)
- 7
Description
warning in IDA 9.3 with
```
cat ~/.idapro/cfg/idapython.cfg
#if __IDAVER__ >= 920
IDAPYTHON_USE_PYQT5_SHIM = 1
#endif
```
```
######################################################################
# Please note that IDA is now using Qt 6, and PyQt5
# support will be dropped eventually.
# It is recommended to port your scripts/plugins to PySide6
# as soon as possible.
# Essentially, that means rewriting statement such as:
#
# import PyQt5
# import PyQt5.QtWidgets
# from PyQt5.QtGui import QGuiApplication
#
# into:
#
# import PySide6
# import PySide6.QtWidgets
# from PySide6.QtGui import QGuiApplication
#
# More information here https://docs.hex-rays.com/user-guide/plugins/migrating-pyqt5-code-to-pyside6
######################################################################
/usr/local/google/home/moritzraabe/code/capa/capa/ida/plugin/item.py:55: RuntimeWarning: This bitwise operation relies on a PyQt5 shim feature. If PyQt5 is not imported, it won't work. For PySide6, use .value for bitwise operations instead
self.flags = QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable
/usr/local/google/home/moritzraabe/code/capa/capa/ida/plugin/item.py:58: RuntimeWarning: This bitwise operation relies on a PyQt5 shim feature. If PyQt5 is not imported, it won't work. For PySide6, use .value for bitwise operations instead
self.flags = self.flags | QtCore.Qt.ItemIsUserCheckable | qt_get_item_flag_tristate()
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with capa/ida/plugin/item.py at the flag assignments on lines 55 and 58, then inspect nearby IDA plugin imports and other PyQt5 or PySide6 usage. Read the linked IDA migration guidance and run the capa IDA plugin checks available in the repository. Done means the explorer is compatible with the recommended Qt 6 bindings and no longer emits these PyQt5 shim warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop, reverse-engineering
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100