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

QT Deprecation Warnings: QFlags for AbstractSpinBox #994

Open
flipmcf opened this issue Nov 25, 2024 · 1 comment
Open

QT Deprecation Warnings: QFlags for AbstractSpinBox #994

flipmcf opened this issue Nov 25, 2024 · 1 comment

Comments

@flipmcf
Copy link
Contributor

flipmcf commented Nov 25, 2024

rdtimeedit.cpp:209:22: warning: ‘constexpr QFlags::QFlags(QFlags::Zero) [with Enum = QAbstractSpinBox::StepEnabledFlag; QFlags::Zero = int QFlagsQAbstractSpinBox::StepEnabledFlag::Private::*]’ is deprecated: Use default constructor instead [-Wdeprecated-declarations]

if(tenths<0) {
   d_step_enabled=QTimeEdit::stepEnabled();
 }
 else {
   d_step_enabled=0;  <---- Here

d_step_enabled is a QAbstractSpinBox so we need some kind of actual flag in there, not just zero.

@flipmcf
Copy link
Contributor Author

flipmcf commented Nov 25, 2024

This was interesting, and is extremely hard to replicate and test, because I have found no places yet where one can set a negative time in rivendell. Or more specifcally, negative tenths of a second.

However, I do like "QAbstractSpinBox::StepEnabledFlag::StepNone" which is defined as 0x00 and makes the warning go away.

https://doc.qt.io/qt-6/qabstractspinbox.html#StepEnabledFlag-enum

But honestly, the code can be re-written to be simpler. I'm just not mature enough in this software to properly test it.

flipmcf added a commit to flipmcf/rivendell that referenced this issue Nov 25, 2024
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

No branches or pull requests

1 participant