Skip to content

Replace deprecated constructor for QMouseEvent and avoid unnecessary …#4807

Open
pkrawczun wants to merge 4 commits intoStellarium:masterfrom
pkrawczun:fix-qmouseevent-constructor
Open

Replace deprecated constructor for QMouseEvent and avoid unnecessary …#4807
pkrawczun wants to merge 4 commits intoStellarium:masterfrom
pkrawczun:fix-qmouseevent-constructor

Conversation

@pkrawczun
Copy link
Contributor

…implicit conversion from QPoint to QPointF

Description

Fixes # (issue)

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • Housekeeping

How Has This Been Tested?

Test Configuration:

  • Operating system: <Name, version number>
  • Graphics Card: <Manufacturer (likely Intel, NVidia, AMD?), Model (HD, Geforce, Radeon..., with model number), driver version?>

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

This is an automatically generated QA checklist based on modified files.

@10110111
Copy link
Contributor

10110111 commented Mar 8, 2026

Shouldn't the global position also be multiplied by devicePixelsPerPixel, as it's done in StelApp::handleWheel?

@pkrawczun
Copy link
Contributor Author

Shouldn't the global position also be multiplied by devicePixelsPerPixel, as it's done in StelApp::handleWheel?

But aren't wheel events different and scaling them by devicePixelsPerPixel is essentially a preference to keep zoom speeds consistent? I should actually test this empirically on a 4K screen to see what happens.

@10110111
Copy link
Contributor

10110111 commented Mar 9, 2026

I should actually test this empirically on a 4K screen to see what happens.

You don't have to use a 4K screen, screen scaling is a user-level option that you can just as well enable on FullHD screens.

@pkrawczun
Copy link
Contributor Author

I should actually test this empirically on a 4K screen to see what happens.

You don't have to use a 4K screen, screen scaling is a user-level option that you can just as well enable on FullHD screens.

You're right. I just wanted to remove a deprecated piece of code.

@pkrawczun pkrawczun requested a review from 10110111 March 14, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants