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

Build fails with -DQT_NO_CAST_FROM_ASCII #170

Closed
tim-gromeyer opened this issue Sep 2, 2022 · 3 comments · Fixed by #171
Closed

Build fails with -DQT_NO_CAST_FROM_ASCII #170

tim-gromeyer opened this issue Sep 2, 2022 · 3 comments · Fixed by #171

Comments

@tim-gromeyer
Copy link
Contributor

When -DQT_NO_CAST_FROM_ASCII is defined, you cant call QChar(' ')(char) and QString("String")(const char*).
To avoid the QChar error we could use QChar(u' ') but this requires Qt >= 5.10.
For QString we could use QStringLiteral.

I created a issue because i don't want to create a pull request that requires Qt 5.10 without having your OK.

@pbek
Copy link
Owner

pbek commented Sep 2, 2022

Qt 5.5+ must be supported. So best use some #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) directives.
@Waqar144, any objections?

@Waqar144
Copy link
Contributor

Waqar144 commented Sep 2, 2022

just QLatin1Char(...) should be enough for us I think.

@tim-gromeyer
Copy link
Contributor Author

tim-gromeyer commented Sep 2, 2022

QLatin1Char doesn't work everywhere(for example here and here)

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

Successfully merging a pull request may close this issue.

3 participants