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...

Bug #896335

Qt deprecation warnings in S2_6/S3_0 when --enable-debug NOT used

Added by Alexandro Ignatiev 11 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Compiled the project on latest Ubuntu release with gcc10.2, got lots of warnings (mostly from Qt deprecations but other things as well). The error in Lua 5.3 is probably a false positive that will be fixed in the compiler but maybe I just don't see, the fix attached is just a kludge that seems to work.

lua53-gcc10-kludge.patch (916 Bytes) lua53-gcc10-kludge.patch Alexandro Ignatiev, 2020-11-12 08:42 PM
other-c-update-gcc10_2.patch (2.19 KB) other-c-update-gcc10_2.patch Alexandro Ignatiev, 2020-11-12 09:00 PM
qt5_4-update.patch (12.3 KB) qt5_4-update.patch Alexandro Ignatiev, 2020-11-12 09:01 PM
3623-S2_6_2-Qt-updated-from-deprecated-Qt5-APIs.patch (13.4 KB) 3623-S2_6_2-Qt-updated-from-deprecated-Qt5-APIs.patch John Robertson, 2020-12-04 08:01 PM
0032-Restore-deprecation-warnings-to-CXXFLAGS-in-enable-d.patch (1021 Bytes) 0032-Restore-deprecation-warnings-to-CXXFLAGS-in-enable-d.patch Marko Lindqvist, 2020-12-28 06:11 AM

Related issues

Related to Freeciv - Feature #899340: msys2: -Werror on snapshot buildsClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocked by Freeciv - Feature #910441: S2_6/S3_0 Qt: Replace QApplication::desktop()->screenGeometry() with QApplication::primaryScreen()->geometry()Closed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocked by Freeciv - Feature #910460: S2_6/S3_0 Qt: Deprecated qVariantFromValue()Closed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocked by Freeciv - Feature #910547: S2_6/S3_0 Qt: Deprecated QFontMetrics::widthClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Marko Lindqvist 11 months ago

What is the freeciv version you are building? Things in other-c-update-gcc-10_2.patch seem something that has been fixed a long time (a year) ago already.

Fixing Qt warnings is not that straightforward. In S2_6 and S3_0 we are supporting Qt versions as old as 5.2, so we can't replace deprecated constructs with something that has been introduced in later versions only. See for example Bug #870968 for what has been done so far. By the way, do you really mean Qt-5.4? It sounds weird combination to have so old Qt version and gcc-10 in the same system.

I haven't checked lua patch yet. I know lua gives errors about lua code, but I haven't seen any problems with gcc. Maybe all my systems just use syslua, so I have not happened to build lua with latest gcc versions.

#2 Updated by Marko Lindqvist 11 months ago

Marko Lindqvist wrote:

I haven't checked lua patch yet. I know lua gives errors about lua code, but I haven't seen any problems with gcc. Maybe all my systems just use syslua, so I have not happened to build lua with latest gcc versions.

It's probably what is fixed by a different patch in Bug #889511. At least I can't reproduce any compile error by building current version of included lua with gcc-10.

#3 Updated by Alexandro Ignatiev 11 months ago

Ah yes, it was a branch code. I checked Qt files and considered that they are consistent but seems like no 0_0 I got Qt ver from qmake --version, is it wrong?

#4 Updated by Marko Lindqvist 11 months ago

Alexandro Ignatiev wrote:

I got Qt ver from qmake --version, is it wrong?

I think latest Ubuntu (20.10) has Qt-5.14. What does freeciv say in Help->About Freeciv?

#5 Updated by Alexandro Ignatiev 11 months ago

Ah yes, "About Qt" help says 5.14.2. What you do to avoid deprecation warnings?

#6 Updated by Marko Lindqvist 11 months ago

Alexandro Ignatiev wrote:

What you do to avoid deprecation warnings?

They are already disabled for --enable-debug builds (where they would be errors) in S2_6 and S3_0 (in master there should be no such warnings, and if new ones appear, we want to see them). Maybe we should do the same also for regular builds.

#7 Updated by Marko Lindqvist 11 months ago

  • Subject changed from Update code to avoid gcc10/Qt5.4 warnings to Qt deprecation warnings in S2_6/S3_0 when --enable-debug NOT used

#8 Updated by Marko Lindqvist 11 months ago

QApplication::primaryScreen() changes should be safe even in Qt-5.2. Can you make a patch that has just those changes? (Preferably in a new ticket, reserving this one for the more general question of deprecation warning handling)

#9 Updated by Marko Lindqvist 11 months ago

#11 Updated by Marko Lindqvist 11 months ago

Read the ticket's comment so far. Your patch is practically identical to already rejected one.

#12 Updated by Marko Lindqvist 10 months ago

  • Sprint/Milestone changed from 2.6.3 to 2.6.4

#13 Updated by Marko Lindqvist 10 months ago

Marko Lindqvist wrote:

QApplication::primaryScreen() changes should be safe even in Qt-5.2. Can you make a patch that has just those changes? (Preferably in a new ticket, reserving this one for the more general question of deprecation warning handling)

-> Feature #910441

#14 Updated by Marko Lindqvist 10 months ago

  • Blocked by Feature #910441: S2_6/S3_0 Qt: Replace QApplication::desktop()->screenGeometry() with QApplication::primaryScreen()->geometry() added

#15 Updated by Marko Lindqvist 10 months ago

  • Blocked by Feature #910460: S2_6/S3_0 Qt: Deprecated qVariantFromValue() added

#16 Updated by Marko Lindqvist 10 months ago

  • Blocked by Feature #910547: S2_6/S3_0 Qt: Deprecated QFontMetrics::width added

#17 Updated by Marko Lindqvist 10 months ago

Patch to restore deprecation warnings in --enable-debug builds after all the issues (blocking tickets) have been resolved.

#18 Updated by Marko Lindqvist 9 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF