patchFreeciv - Patches: patch #3417, Qt-client against Qt5

 
 
Show feedback again

patch #3417: Qt-client against Qt5

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat 14 Jul 2012 11:19:02 PM UTC  
 
Category: client-qtPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 05 Nov 2013 10:33:02 PM UTC, SVN revision 23688:

Made qt-client source to compile against Qt5 too. Configure still always
sets flags for Qt4.

See patch #3417

(Browse SVN revision 23688)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 05 Nov 2013 10:31:55 PM UTC, SVN revision 23687:

Made qt-client source to compile against Qt5 too. Configure still always
sets flags for Qt4.

See patch #3417

(Browse SVN revision 23687)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 29 Oct 2013 08:05:23 PM UTC, comment #10:

Attached patch does all code changes to qt-client needed to build it against Qt5. Configure still selects always to build against Qt4.

(file #19285)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 27 Sep 2013 02:53:04 AM UTC, comment #9:

> Yeah, qt5 should be fully compatible with qt4, there is no much
> changes


I now tried to build against qt5. Configure checks to find qt5, and to set flags should work. Some "#if QT_VERSION_CHECK(5, 0, 0) ... #else ... #endif" blocks have been added as calls to deprecated functions were giving hard errors. I gave up when I encountered setCodecForCStrings() call in fc_client.cpp and found out that it's simply been removed (not deprecated and replaced, but completely removed).

Attached is what I got done.

(file #19092)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 07 Aug 2012 12:12:35 PM UTC, comment #8:

Yeah, qt5 should be fully compatible with qt4, there is no much changes, btw there should be easy switch to openGL rendering instead X11 ( in qt4 ) but I doubt if there would be any benefits from it, seems both are accelerated by hardware, no idea how under windows.
On other hand I've read that sdl 2.0 is coming
http://www.phoronix.com/scan.php?page=news_item&px=MTE0MDU

mir3x <mir3x>
Project Member
Tue 07 Aug 2012 12:06:47 PM UTC, comment #7:

Also, how is compatibility between major Qt versions? If we develop Qt4 client, will it work in Qt5 too? It makes no sense to develop Qt4-only client when world starts to move to Qt5.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 07 Aug 2012 11:57:34 AM UTC, comment #6:

With new client written from scratch we have an good opportunity to do things in a new way compared to existing clients. From the talks in several forums, one thing that always comes up, is how freeciv's 2D sprites based graphics turn most users out, only some playing for nostalgic reasons ("freeciv is like games were in my childhood"). So I could consider even 5.0 as minimum Qt requirement once it (Qt5) comes out. Reason being that Qt3D will be part (not just extension) of it http://labs.qt.nokia.com/2012/04/11/qt-3d-and-qt5-qt4-news-and-releases/ Maybe it would be useful for us?

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 20 Jul 2012 10:31:27 PM UTC, comment #5:

As of patch #3424, Qt 4.7 is no longer a requirement -- it now builds fine on my 4.6.2 system.

Jacob Nevins <jtn>
Project Administrator
Sun 15 Jul 2012 05:57:26 AM UTC, comment #4:

Just a thought, but given that given that 5.0 is planned within next 3 months, even if it turn out to be a disaster (due to excessive qml or otherwise) and that qt client wasn't functional till now, is there a point of targeting anything below 4.8 ?

Anonymous
Sat 14 Jul 2012 11:34:38 PM UTC, comment #3:

> That placeholder isn't much useful, I'll remove it in next
> patch, ok ? So maybe no need to increase qt version.

OK, and I'd love to see the result of your work, but as Marko said in email, don't feel you have to bend over backwards for compatibility -- it's OK to use new Qt features if it makes things easier.

Jacob Nevins <jtn>
Project Administrator
Sat 14 Jul 2012 11:30:26 PM UTC, comment #2:

That placeholder isn't much useful, I'll remove it in next patch, ok ? So maybe no need to increase qt version.
( Meanwhile I fixed map view update - there were some glitches on down of screen and is working now with isometric tiles, + some fix in tax rate dialog and completed first page of city dialog, I'll post it probably tomorrow )

mir3x <mir3x>
Project Member
Sat 14 Jul 2012 11:22:25 PM UTC, comment #1:

Result of my testing:

configure bails out on my Qt 4.6.2 system, which is what we want, although the error message could lead to headscratching:

config.log attached for reference, in case it's useful.

(file #16092)

Jacob Nevins <jtn>
Project Administrator
Sat 14 Jul 2012 11:19:02 PM UTC, original submission:

Split out from patch #3367, based on a post by cazfi to freeciv-dev.

The newly fleshed out Qt code uses at least one feature from Qt 4.7, so needs a configure check. The attached patch from cazfi adds one.

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #19285:  Qt5-2.patch added by cazfi (11kB - text/x-diff)
file #19092:  Qt5.patch added by cazfi (10kB - text/x-diff)
file #16092:  config.log added by jtn (89kB - text/x-log - unsuccessful configure attempt from system with old Qt (Ubuntu Lucid, Qt 4.6.2))
file #16091:  Qt47Check.patch added by jtn (1kB - text/x-diff - Qt configure check from cazfi)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by mir3x (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 05 Nov 2013 10:32:05 PM UTCcazfiStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Tue 29 Oct 2013 08:05:23 PM UTCcazfiAttached File-=>Added Qt5-2.patch, #19285
      Categorybootstrap=>client-qt
      StatusNone=>Ready For Test
      Planned Release=>2.5.0, 2.6.0
    Fri 27 Sep 2013 02:53:04 AM UTCcazfiAttached File-=>Added Qt5.patch, #19092
      SummaryConfigure check for Qt version=>Qt-client against Qt5
    Thu 18 Apr 2013 09:55:37 PM UTCcazfiCategoryclient-qt=>bootstrap
      StatusReady For Test=>None
      Planned Release2.5.0=>
    Sat 14 Jul 2012 11:22:25 PM UTCjtnAttached File-=>Added config.log, #16092
    Sat 14 Jul 2012 11:19:02 PM UTCjtnAttached File-=>Added Qt47Check.patch, #16091
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup