Project

Profile

Help

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...":https://support.plan.io/news/187

Bug #874406

closed

Trade plan calculation fails Qt 2.6.2 client

Added by Alexandro Ignatiev almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
gui-qt
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The client hangs for a while and then fails. 2.6.1 does not have this bug.


Files


Related issues

Blocks Freeciv - Feature #893343: QT_DISABLE_DEPRECATED_BEFORE to match Qt-5.15ClosedMarko Lindqvist

Actions
Actions #1

Updated by Alexandro Ignatiev almost 3 years ago

Most probably, the error comes from a wrong resolution in bug #852857: std::sort requires a function that behaves as a stable comparison operator, qrand() is not one. It seems to be no standard random shuffle function in stdlib.h, but there are lots of code patterns around that do the task.

Actions #2

Updated by Marko Lindqvist almost 3 years ago

Alexandro Ignatiev wrote:

Most probably, the error comes from a wrong resolution in bug #852857

It should be easy to test by reverting that patch. I don't think anything has built on top of it since.

Actions #3

Updated by Marko Lindqvist over 2 years ago

Alexandro Ignatiev wrote:

qrand() is not one.

Also, it seems qrand() has been deprecated in Qt-5.15.

Actions #5

Updated by Marko Lindqvist over 2 years ago

  • Status changed from Resolved to In Progress

clang gives a warning:
../../../../src/client/gui-qt/menu.cpp:222:5: error: struct 'trade_city' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct trade_city *cities_order[count];
^
../../../../src/client/gui-qt/menu.h:136:7: note: previous use is here
class trade_city
^
../../../../src/client/gui-qt/menu.cpp:222:5: note: did you mean class here?
struct trade_city *cities_order[count];
^~~~
class
1 error generated.

Actions #7

Updated by Marko Lindqvist over 2 years ago

  • Blocks Feature #892509: Make Qt-5.15 minimum requirement for --with-qt5x builds added
Actions #8

Updated by Marko Lindqvist over 2 years ago

Marko Lindqvist wrote:

Does this patch help?

Ping, Alexandro Ignatiev

Actions #9

Updated by Marko Lindqvist over 2 years ago

  • Blocks Feature #893343: QT_DISABLE_DEPRECATED_BEFORE to match Qt-5.15 added
Actions #10

Updated by Marko Lindqvist over 2 years ago

  • Blocks deleted (Feature #892509: Make Qt-5.15 minimum requirement for --with-qt5x builds)
Actions #11

Updated by Marko Lindqvist over 2 years ago

Marko Lindqvist wrote:

Does this patch help?

Worked at least in my own quick test, so pushing soon.

Actions #12

Updated by Marko Lindqvist over 2 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist
Actions #13

Updated by Marko Lindqvist over 2 years ago

  • Sprint/Milestone changed from 2.6.3 to 2.6.2.1

Also available in: Atom PDF