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

QCoreApplication::UnicodeUTF8 is deprecated #98

Closed
hdd opened this issue Aug 10, 2016 · 13 comments
Closed

QCoreApplication::UnicodeUTF8 is deprecated #98

hdd opened this issue Aug 10, 2016 · 13 comments

Comments

@hdd
Copy link
Contributor

hdd commented Aug 10, 2016

Found this :https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5
about this issue.

This gets raised, when trying to use compiled widget (pyside-uic....), which has the retranslateUi() .

QApplication::translate("Href_Gui", "Text:", 0, QApplication::UnicodeUTF8)
QApplication::translate("Href_Gui", "Text:", 0)

Not really sure how to tackle this down.

@hdd
Copy link
Contributor Author

hdd commented Aug 10, 2016

guess we can implement a mocked QApplication.UnicodeUTF8 property
and provide an override for PySide2/Qt5 on translate, so they can accept an argument more.

Thoughts ?

@hdd
Copy link
Contributor Author

hdd commented Aug 10, 2016

I've been opening a pull request : #99

@mottosso
Copy link
Owner

Sorry to ask, but is this a problem you need solved? Or are you trying to cover all incompatibilities?

@hdd
Copy link
Contributor Author

hdd commented Aug 11, 2016

I'm porting a quite complex stack of code over Qt.py and it does use compiled ui ( designer-qt4 ) through pyside-uic , which by default sneak in the translate function.

Without this fix, any interface build with PySide/PyQt won't simply be loading, and error, and possibly make the app segfault.

@mottosso
Copy link
Owner

Ah, excellent.

An example in the form of a test would be lovely to really drive this feature home.

@hdd
Copy link
Contributor Author

hdd commented Aug 11, 2016

thought the same, but I need #93 first .
So we can test both.

@mottosso
Copy link
Owner

#93 implemented.

@hdd
Copy link
Contributor Author

hdd commented Aug 22, 2016

tests are now available

@mottosso
Copy link
Owner

mottosso commented Sep 5, 2016

For completeness, the missing piece of information is an example that illustrates the problem.

@mottosso
Copy link
Owner

mottosso commented Sep 17, 2016

Implemented in 0.5.0.

@hdd, let me know how this works for you!

@hdd
Copy link
Contributor Author

hdd commented Sep 19, 2016

Hi Marcus,
Does this solve also the UnicodeUTF8 Remapping issue on QApplication ?
(as it can't simply be ignored on old PyQt4/PySide code)

@mottosso
Copy link
Owner

Hey @hdd,

It solves it by compiling your .ui files with PySide2. That compiler won't produce references to this member.

@mottosso
Copy link
Owner

For completeness, the solution is to compile with PySide2-compatible compiler, and then either replace references to PySide2 with Qt, or automatically do so with --compile. See the release for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants