Skip to content

gui: minor cleanups in Chiplet3DWidget#9486

Merged
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gui-chiplet-refactor
Feb 17, 2026
Merged

gui: minor cleanups in Chiplet3DWidget#9486
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gui-chiplet-refactor

Conversation

@openroad-ci
Copy link
Collaborator

No description provided.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@maliberty
Copy link
Member

@jferreiraOpenRoad FYI

@maliberty maliberty enabled auto-merge February 17, 2026 21:45
Copy link
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 provides several minor cleanups to the Chiplet3DWidget. The changes include renaming constants to follow a consistent naming convention, adding const to variables that are not modified, and refactoring some code for conciseness. These changes improve code readability and maintainability. I have one suggestion to further improve the code by replacing a magic number with a named constant, in line with the other changes in this PR.

QPen pen(color);
pen.setWidth(2);
painter.setPen(pen);
painter.setPen(QPen(color, 2));
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, it's better to replace the magic number 2 with a named constant. This is consistent with the other cleanups in this PR. Ideally, this constant would be defined at the top of the file with the others, but since that's outside the changed lines, a local constexpr is a good alternative.

Suggested change
painter.setPen(QPen(color, 2));
constexpr int kPenWidth = 2;
painter.setPen(QPen(color, kPenWidth));
References
  1. Define tunable parameters as named constants instead of using hardcoded magic numbers.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty maliberty merged commit dcf3613 into The-OpenROAD-Project:master Feb 17, 2026
12 of 13 checks passed
@maliberty maliberty deleted the gui-chiplet-refactor branch February 17, 2026 22:16
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.

2 participants