qhttpengine icon indicating copy to clipboard operation
qhttpengine copied to clipboard

Made it compile and work on Qt4.8, bar some tests.

Open falemagn opened this issue 9 years ago • 2 comments

The proposed changes make the library compile and work also on Qt4.8, except for some of the tests, for I didn't put much effort into understanding how to backport them. The missing tests are:

  • TestQFilesystemHandler
  • TestQHttpHandler
  • TestQHttpServer
  • TestQHttpSocket
  • TestQIODeviceCopier
  • TestQObjectHandler

I had to fix the class QIByteArray because of the change in constructor semantics between Qt 4.8 and 5.1.

The other three tests thus compile and pass.

The examples work too, as far as I could see.

I did my best to reduce the changes at a minimum, but it's the first time I work with CMake so the odds I might have done something not quite smart are not quite low.

The backport relies on two external projects which are included in the repository as submodules and automatically updated when CMake is run. These projects are:

falemagn avatar Apr 14 '16 01:04 falemagn

Awesome! I'll take a look when I get home this evening.

nathan-osman avatar Apr 14 '16 19:04 nathan-osman

Thank-you so much for contributing some code. I would love to add support for Qt 4.x but there are a couple of issues with the pull request that would need to be addressed in some way before I could merge it:

  • Updating Git submodules from CMake is something I would like avoid since it prevents the library from building on machines that aren't connected directly to the Internet.
  • Using submodules breaks the daily build over on Launchpad. The code is imported from Git -> Bazaar, which doesn't support submodules. (In fact, it won't import a Git repository if any part of the history contains submodules.)

My suggestion for avoiding both of these problems is to simply copy the code from those two repositories into the source tree. They are both licensed under the LGPL. Neither has been updated in the last 2-3 years so there isn't a lot of benefit in linking upstream anyway.

As far as Launchpad goes, I think you can work around the problem by removing the submodules and squashing your commits (using git rebase -i). You will then need to use the -f flag when pushing.

Thanks again!

nathan-osman avatar Apr 15 '16 03:04 nathan-osman