Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #864 - QucsAttenuator 24.3.0 - Accept "." and "," as decimal separators #865

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

andresmmera
Copy link
Collaborator

This PR is intended to fix issue #864.

Prior to this PR, it was not possible to enter decimal values in the design input. To fix this, a custom subclass of QDoubleSpinBox has been created to accept "." and "," as decimal separators.

I will do more extensive tests later.

A custom subclass of QDoubleSpinBox was created to accept "." and "," as decimal separators.

DoubleVal validator was deleted from the code as it has not being used.
@ra3xdh ra3xdh modified the milestone: 864 Jul 25, 2024
@ra3xdh ra3xdh linked an issue Jul 25, 2024 that may be closed by this pull request
The "About Qt" message was not properly connected. As a consequence, when the user went to "Help-> About Qt..." nothing showed up.

This commit is intended to fix this by connecting the menu with the handler as it's done in the filter design tool
@andresmmera
Copy link
Collaborator Author

Hi there,

I've done some more extensive testing. As far as I know, everything works as expected.

You can find the test details here.

@csrabak Could you download the Windows build and see if it fixes issue #864 for you?

@wawuwo
Copy link
Collaborator

wawuwo commented Jul 25, 2024

I think more proper approach is to rely on locales mechanism, i.e. to remove the hardcoded C-locale (this line) and let QDoubleValidator use the default locale (which is equal to QLocale()) or to set validator's locale based on the app language setting. Subclassing a widget for this is a bit of an overkill IMO.

@andresmmera
Copy link
Collaborator Author

Hmm, I understand. It actually looks like it's a more elegant solution than mine.

If you already implemented it, I can close this PR and you may open a new one with your solution. Otherwise, I'll try to implement what you say as soon as I can (probably in a few days or the next week).

Thanks a lot @wawuwo

@csrabak
Copy link

csrabak commented Jul 26, 2024

@andresmmera I'll do and test it and get back to you.

@wawuwo
Copy link
Collaborator

wawuwo commented Jul 26, 2024

@andresmmera no, I haven't implemented anything :)

@ra3xdh ra3xdh added this to the 24.4.0 milestone Jul 26, 2024
@csrabak
Copy link

csrabak commented Jul 26, 2024

@andresmmera

The Windows Build pointed to by you now works as @ra3xdh proposes.

I leave to the team the aspect that in the i18n version, entry can be with commas but the result remains using dot for de radix separator.

@ra3xdh ra3xdh merged commit 12ddd12 into ra3xdh:current Jul 26, 2024
7 checks passed
@ra3xdh
Copy link
Owner

ra3xdh commented Jul 26, 2024

I am merging this. Thanks!

@ra3xdh ra3xdh added the tools label Jul 26, 2024
@ra3xdh ra3xdh modified the milestones: 24.4.0, 24.3.1 Sep 1, 2024
@andresmmera andresmmera deleted the fix_issue_864_QucsAttenuator branch February 20, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qucs attenuator 24.3.0 gets lost in i18n environment
4 participants