-
Notifications
You must be signed in to change notification settings - Fork 11
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
Ported the application to Qt5 #61
Conversation
QString::toAscii() has been deprecated since Qt5 which causes build failure. Using QString::toLatin1() instead.
@@ -28,7 +28,7 @@ FirstScreen::FirstScreen( PackageBackend *backend, QString *tmpFileName, const Q | |||
QVBoxLayout *mainLayout = new QVBoxLayout; | |||
mainLayout->setSpacing( 0 ); | |||
|
|||
QFile dataFile( m_tmpFileName->toAscii() ); | |||
QFile dataFile( m_tmpFileName->toLatin1() ); |
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.
Curious to know why converting to Latin1 not UTF?
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.
Cause Latin1 and Ascii encodings have a bit more in common than with UTF. Changing it to UTF ( toUtf8() ) is not a problem though.
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.
Note that we don't know what's the encoding used by the system of every user, so the right way to do it would be to use QString::toLocal8Bit, since that will use whatever the system is configured with, be it utf8 (usually), latin1 or whatever. Can you change that?
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, sure. I'm on it
FirstScreen.cpp (Line 31) - QString::toAscii() is not longer supported. Therefore, using QString::toLatin1() instead.