-
Notifications
You must be signed in to change notification settings - Fork 156
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
Feature/qt6 - Remove usage of Core5Compat library #710
base: feature/qt6
Are you sure you want to change the base?
Feature/qt6 - Remove usage of Core5Compat library #710
Conversation
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
#if defined(RV_VFX_CY2023) | ||
QTextCodec* codec = QTextCodec::codecForHtml(array); | ||
QString u = codec->toUnicode(array); | ||
#else | ||
// Assume that the data is utf-8 encoded because about 98-99% of | ||
// websites uses utf-8. The second closest is ISO-8859-1 | ||
// with 1.1%. | ||
QStringDecoder decoder(QStringDecoder::Utf8); | ||
QString u = decoder.decode(array); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bernie-laberge @eloisebrosseau Is this a reasonable assumption?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I believe this is a valid assumption.
In any case, this code path is no longer used by RV anymore. So I think this is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick search, and I also believe we can make that assumption
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#if defined(RV_VFX_CY2023) | ||
QTextCodec* codec = QTextCodec::codecForHtml(array); | ||
QString u = codec->toUnicode(array); | ||
#else | ||
// Assume that the data is utf-8 encoded because about 98-99% of | ||
// websites uses utf-8. The second closest is ISO-8859-1 | ||
// with 1.1%. | ||
QStringDecoder decoder(QStringDecoder::Utf8); | ||
QString u = decoder.decode(array); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick search, and I also believe we can make that assumption
Feature/qt6 - Remove usage of Core5Compat library
Linked issues
n/a
Summarize your change.
I have eliminated all instances of QTextCodec, as this class is no longer supported in Qt 6. Previously, the code relied on the Core5Compat library, which incorporates deprecated and obsolete Qt 5 classes.
Describe what you have tested and on which operating system.
I created a python plugin to execute the httpGet method from the RvWebManager class.