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

Use QString literals #16669

Merged
merged 2 commits into from
Mar 21, 2022
Merged

Use QString literals #16669

merged 2 commits into from
Mar 21, 2022

Conversation

Chocobo1
Copy link
Member

It covers src/webui and enables QT_NO_CAST_FROM_ASCII.

@Chocobo1 Chocobo1 added the Code cleanup Clean up the code while preserving the same outcome label Mar 19, 2022
@Chocobo1 Chocobo1 added this to the 4.5.0 milestone Mar 19, 2022
@Chocobo1 Chocobo1 mentioned this pull request Mar 19, 2022
Copy link
Member

@glassez glassez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also noticed places like QString::fromLatin1("some string") in the code that need to be replaced with u"some string"_qs.

src/app/stacktrace_win.h Outdated Show resolved Hide resolved
src/gui/programupdater.cpp Outdated Show resolved Hide resolved
@@ -72,8 +72,8 @@ namespace
{
QJsonArray categoriesInfo
{QJsonObject {
{QLatin1String("id"), "all"},
{QLatin1String("name"), SearchPluginManager::categoryFullName("all")}
{QLatin1String("id"), u"all"_qs},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intentionally skip these QLatin1String entries?

Copy link
Member Author

@Chocobo1 Chocobo1 Mar 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I want to have QT_NO_CAST_FROM_ASCII defined first.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also noticed places like QString::fromLatin1("some string") in the code that need to be replaced with u"some string"_qs.

This will come later too.

src/webui/webui.cpp Outdated Show resolved Hide resolved
src/webui/webapplication.cpp Show resolved Hide resolved
It covers src/webui and enables `QT_NO_CAST_FROM_ASCII`.
@Chocobo1 Chocobo1 merged commit e1ca0f3 into qbittorrent:master Mar 21, 2022
@Chocobo1 Chocobo1 deleted the literal branch March 21, 2022 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code cleanup Clean up the code while preserving the same outcome
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants