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 deprecated QDateTime warning ctor with Qt 6.8 #210

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

pradlol
Copy link
Contributor

@pradlol pradlol commented Oct 17, 2024

this change fix compilation warnings with Qt version 6.8

issue: #207

@cen1
Copy link
Collaborator

cen1 commented Oct 20, 2024

Please also replace what @sergeyy32 commented on, plus, there are a few usages in qztest that still emit a warning.

Also, consider QTimeZone::utc()

Otherwise lgtm.

since Qt 6.8 constructor of QDateTime, which accepts TimeSpec enum,
marked as deprecated. to compile at this version of Qt it necessary to
explicitly pass QTimeZone instead.

to save work with lower version of Qt, version check macro was added.

it is critical to code where warnings treats as errors.

issue: #207
@pradlol pradlol force-pushed the fix_build_with_qt_68 branch from 212427f to d272d43 Compare October 20, 2024 19:32
@pradlol
Copy link
Contributor Author

pradlol commented Oct 20, 2024

@cen1, @sergeyy32, thanks for review. fixed your comments.

there is another small question indirectly related to this PR: the readme mentions Qt4, is it still supported? just as far as I can see, Qt4 doesn't have QTimeZone class, and the test code in the develop branch uses it.

@cen1
Copy link
Collaborator

cen1 commented Oct 20, 2024

Looking good.

Qt4 is most likely broken at this point in time.

  1. Nobody uses and tests it
  2. Github action that installs Qt only supports 5 and 6 so pipeline is not checking if Qt4 builds and passes tests.
  3. I'm not even sure if it's installable on current distros or if it would build from source.
  4. Constantly adding more compat just to keep Qt4 alive seems counterproductive and will just make the code worse.

Considering all active projects are transitioning from Qt5 to Qt6 and there is only legacy software using Qt4 (which can simply use an old quazip release) the most likely result will be that Qt4 will be removed as supported version in the future.

@cen1 cen1 merged commit 8aeb3f7 into stachenov:master Oct 24, 2024
32 checks passed
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.

3 participants