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

Add version gating for Zmq and Qt deprecations #470

Merged
merged 3 commits into from
Mar 23, 2020

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Mar 20, 2020

This PR resolves both of the deprecations showing up in the codebase when building with current dependency versions.

  • Qt's QImage::sizeInBytes(), used once in QtImageReader, is deprecated starting with Qt 5.10. (Correction: QImage::byteCount() is deprecated, QImage::sizeInBytes() is its replacement.)
  • ZeroMQ deprecated the send() form we've been using starting with version 4.3.1.

The replacement ZMQ API includes a second flags argument. We take advantage of the new field to specify zmq::send_flags::dontwait, flagging the message for immediate delivery. (It's possible we could use dontwait in older ZMQ versions, so perhaps the version check could be broadened. It's also possible that dontwait has a negative performance impact, in which case it might be better to remove it. Unit tests would be helpful, but they do not yet exist.)

@ferdnyc ferdnyc added the code Source code cleanup, streamlining, or style tweaks label Mar 20, 2020
@codecov-io
Copy link

Codecov Report

Merging #470 into develop will increase coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #470   +/-   ##
========================================
  Coverage    48.12%   48.13%           
========================================
  Files          128      128           
  Lines         9934     9933    -1     
========================================
  Hits          4781     4781           
+ Misses        5153     5152    -1     
Impacted Files Coverage Δ
src/ZmqLogger.cpp 29.33% <0.00%> (+0.38%) ⬆️
src/QtImageReader.cpp 56.60% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c6d25e...8706a07. Read the comment docs.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Mar 21, 2020

Oh, hey, Travis finally woke up. Neat.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Mar 23, 2020

Merging this, as these are both small, future-proofing changes to the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Source code cleanup, streamlining, or style tweaks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We're using a deprecated ZeroMQ method image->byteCount() marked deprecated in Qt
2 participants