Skip to content

fix: use Qt flag_val() for PySide6 compat in IDA plugin#3096

Open
BHARATH0153 wants to merge 2 commits into
mandiant:masterfrom
BHARATH0153:feat/pyside6-flag-compat
Open

fix: use Qt flag_val() for PySide6 compat in IDA plugin#3096
BHARATH0153 wants to merge 2 commits into
mandiant:masterfrom
BHARATH0153:feat/pyside6-flag-compat

Conversation

@BHARATH0153
Copy link
Copy Markdown

@BHARATH0153 BHARATH0153 commented Jun 8, 2026

Resolves #3095

Replace direct bitwise operations on module-level Qt flag constants with flag_val() helper that extracts int values from enum members. This resolves RuntimeWarning in IDA 9.3+ where PyQt5 shim is deprecated.

  • qt_compat.py: add flag_val(), fix qt_get_item_flag_tristate() to return int value using proper enum path
  • item.py: use flag_val() for all flag bitwise operations
  • view.py: use flag_val() for all flag bitwise operations

[x] No CHANGELOG update needed

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Jun 8, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add bug fixes, new features, breaking changes and anything else you think is worthwhile mentioning to the master (unreleased) section of CHANGELOG.md. If no CHANGELOG update is needed add the following to the PR description: [x] No CHANGELOG update needed

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces compatibility fixes for Qt5 and Qt6 (PySide6) flag handling by introducing a flag_val helper function to extract raw integer values from Qt enum flags, and wrapping bitwise operations on flags with int() and flag_val(). The review feedback highlights a potential regression in qt_get_item_flag_tristate() where removing the direct check for ItemIsAutoTristate on Qt might break compatibility with certain PySide6 versions, and suggests restoring this check while wrapping all returned flags in flag_val().

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread capa/ida/plugin/qt_compat.py Outdated
@github-actions github-actions Bot dismissed their stale review June 8, 2026 04:13

CHANGELOG updated or no update needed, thanks! 😄

@BHARATH0153 BHARATH0153 force-pushed the feat/pyside6-flag-compat branch 2 times, most recently from 8b01034 to bd8403b Compare June 8, 2026 04:15
@BHARATH0153 BHARATH0153 closed this Jun 8, 2026
@BHARATH0153 BHARATH0153 reopened this Jun 8, 2026
@BHARATH0153 BHARATH0153 force-pushed the feat/pyside6-flag-compat branch from bd8403b to 594c1cc Compare June 8, 2026 04:50
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

capa explorer: PyQt / PySide upgrade

1 participant