-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Homogenize window title separator #36998
Homogenize window title separator #36998
Conversation
src/app/qgisapp.cpp
Outdated
@@ -547,7 +547,7 @@ static void setTitleBarText_( QWidget &qgisApp ) | |||
} | |||
if ( !caption.isEmpty() ) | |||
{ | |||
caption += QLatin1String( " - " ); | |||
caption += QStringLiteral( " — " ); |
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 results in corrupt strings on windows builds... You need to use the character code instead
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.
Sure (like for the three dots) I guess. But let me ask you a questions, is there anything particular in this line of code or should we change the other 27 occurrences of that character, because I just copy-pasted that character from one of the many other another pre-existing string in the code and I don't understand why it suddenly became a problem after my changes if it wasn't before.
$ grep -r '—' src|egrep 'cpp:'|wc -l
27
... or maybe you are just saying that it is always been a problem but this is an opportunity to fix it?
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 see it's been used mostly inside tr:
QObject::tr( "Warning — this algorithm modifies......
does that need replacing too?
or is it just when it is inside a QStringLiteral
?
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.
It's fine when it's inside tr, and it's fine from Python -- it's only QStringLiteral and raw characters strings which are an issue. That said, this may have changed since #35737. I'd probably still err on the side of caution though!
Fixes #35761