HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Bug #863755
Qt client HUD prints "Gold: ... (+-2)" if player is losing gold per turn
0%
Description
It's got a hardcoded + sign rather than a %+d style construction, so it only works well while you are saving gold.
QString doesn't make it easy to fix this, but it's possible with a bit of fiddling.
Related issues
History
#1
Updated by Jacob Nevins over 2 years ago
- File m-30-26-qt-hud-losing-gold.patch m-30-26-qt-hud-losing-gold.patch added
- Status changed from In Progress to Resolved
#2
Updated by Jacob Nevins over 2 years ago
- Status changed from Resolved to Closed
#3
Updated by Marko Lindqvist over 2 years ago
I suspect this one broke msys2 build. More likely by revealing an existing bug than by having an bug in itself. More info when I have it, but 'sprintf()' might be a macro that fits badly to QString::sprintf() usage.
#4
Updated by Marko Lindqvist over 2 years ago
- Status changed from Closed to New
Not yet sure if the msys2 issue should be resolved as adjustment to this ticket or as a separate change, but reopening this until otherwise decided.
#5
Updated by Marko Lindqvist over 2 years ago
- Blocks Task #851229: S3_0 alpha4 added
#6
Updated by Jacob Nevins over 2 years ago
Fine to reopen from my point of view.
Can you quote the error message (or whatever) from the msys2 build?
#7
Updated by Marko Lindqvist over 2 years ago
Error message:
In file included from ../../../../../utility/fcintl.h:34,
from ../../../../../utility/specenum_gen.h:123,
from ../../../../../common/fc_types.h:145,
from ../../../../../common/movement.h:20,
from ../../../../../client/gui-qt/hudwidget.cpp:35:
../../../../../client/gui-qt/hudwidget.cpp: In function 'void show_new_turn_info()':
../../../../../client/gui-qt/hudwidget.cpp:1690:22: error: 'class QString' has no member named 'libintl_sprintf'
1690 | .arg(QString().sprintf("%+d",
with 'sprintf' in the last line colored.
#8
Updated by Marko Lindqvist over 2 years ago
In S2_6, also msys1 build is affected.
#9
Updated by Marko Lindqvist over 2 years ago
- File 0001-Fix-a-QString-.sprintf-call-even-when-libintl.h-make.patch 0001-Fix-a-QString-.sprintf-call-even-when-libintl.h-make.patch added
- Status changed from New to Resolved
- Assignee deleted (
Jacob Nevins)
#10
Updated by Marko Lindqvist over 2 years ago
- Status changed from Resolved to New
The patch didn't help.
#11
Updated by Marko Lindqvist about 2 years ago
- File 0001-Fix-msys-Qt-client-build.patch 0001-Fix-msys-Qt-client-build.patch added
- Status changed from New to Resolved
New patch for testing
#12
Updated by Marko Lindqvist about 2 years ago
Marko Lindqvist wrote:
New patch for testing
It works, so pushing the commit tonight.
#13
Updated by Marko Lindqvist about 2 years ago
It's also worth noting that QString().sprintf() is deprecated in newer Qt versions.
#14
Updated by Marko Lindqvist about 2 years ago
- Status changed from Resolved to Closed
- Assignee set to Marko Lindqvist