-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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 #16652
Use QString literals #16652
Conversation
300431e
to
ed29427
Compare
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 hope it doesn't contain any inappropriate changes. I can't check all this thoroughly.
@now-im @xavier2k6 The solution is simple, see below: UIThemeManager::instance()->getIcon("document-properties"); // if the conflict is here
UIThemeManager::instance()->getIcon(u"document-properties"_qs); // add the 'u' prefix and '_qs' postfix to fix it
UIThemeManager::instance()->getIcon(QLatin1String("document-properties")); // here there should be no conflict so you don't have to do modify anything *for now*
// in the future it will be changed to the following as well
UIThemeManager::instance()->getIcon(u"document-properties"_qs); |
@Chocobo1 Got it. Thanks. |
Thank you, shouldn't be too much of a problem. @now-im If you run in to problems re-basing etc. give me a shout. (I'm still currently not getting notification from mentions etc. but I should come across things when I'm looking through the Issues tickets/PR's) |
Ok. |
This patch covers src/gui and some leftovers from previous commit.
@glassez |
@Chocobo1 @xavier2k6 Successfully rebased. |
@@ -168,7 +168,7 @@ QVariant TransferListModel::headerData(int section, Qt::Orientation orientation, | |||
{ | |||
switch (section) | |||
{ | |||
case TR_QUEUE_POSITION: return QChar('#'); | |||
case TR_QUEUE_POSITION: return u'#'; |
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.
This column is now shown as "35". Any char in place of # here returns a number as column name.
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.
Well, QVariant
treats char16_t
as numeric type so you still need to explicitly tell it that we want QChar
or QString
:
case TR_QUEUE_POSITION: return QChar(u'#');
or case TR_QUEUE_POSITION: return u'#'_qs;
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.
thanks, will fix.
UPDATE: fixed in PR #16669.
This patch covers src/gui and some leftovers from previous commit.