Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt6: add postgresql #2957

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sabelka
Copy link

@sabelka sabelka commented Feb 16, 2023

Enable openssl and the PostgreSQL QSql plugin for qt6, like it is also in qt5
fixes #2950

@mabrand
Copy link
Member

mabrand commented Apr 4, 2023

Qt6 supports Window's native schannel. Is there a strong case for building with openssl support too, given the extra dependencies?

@sabelka
Copy link
Author

sabelka commented Apr 4, 2023

Actually, I wasn't aware of Qt's schannel support on Windows. I just noticed, that QNetworkManager was not able do establish https connections, and enabling openssl for Qt fixed my problem. But I quess schannel would be fine, too.
However, it looks like it is not enabled by default (or I did something wrong in my test).
So, I'd be fine with any ssl solution.

@mabrand
Copy link
Member

mabrand commented Apr 4, 2023

I think schannel is enabled. At least it works for me.

If we're going to enable the postgresql driver, that's going to drag in openssl anyway. Hmm.
Maybe you can do some checks with building support for both schannel and openssl and choosing the desired provider at runtime, just to make sure it works.

@sabelka
Copy link
Author

sabelka commented Apr 4, 2023

I'll try and let you know!

@stefanha
Copy link
Contributor

I've been using Qt6 QNetworkRequest successfully for HTTPS without explicitly enabling OpenSSL.

Enable openssl and the PostgreSQL QSql plugin for qt6, like it is also
in qt5
fixes mxe#2950
@sabelka sabelka force-pushed the qt6-add-openssl-and-postgresql branch from 2d82545 to 93d5404 Compare May 4, 2023 08:41
@sabelka
Copy link
Author

sabelka commented May 4, 2023

Yes SSL works also without OpenSSL! (I had a mistake in my packager script, so the schannel plugin was in the wrong directory). So you are absolutely right, we don't need it on Windows.
So, I've modified this PR to include PostgreSQL only.

@sabelka
Copy link
Author

sabelka commented May 4, 2023

Maybe you can do some checks with building support for both schannel and openssl and choosing the
desired provider at runtime, just to make sure it works.

It is possible to build both plugins, but I think it is not easily possible to choose the back end at runtime.
However, if you package just one of the two plugins with your application, Qt will use whatever it gets ;-)

@sabelka sabelka changed the title qt6: add openssl and postgresql qt6: add postgresql May 4, 2023
@fiesh
Copy link

fiesh commented Nov 29, 2023

This adds a very heavy dependency to Qt permanently... I wouldn't want this for our build images, for example.

mabrand added a commit that referenced this pull request Mar 22, 2024
Although Qt 6 supports schannel on Windows, it may not work for
all use cases. Now both openssl and schannel should be available.

#2957
schloegl pushed a commit to schloegl/mxe that referenced this pull request Mar 28, 2024
Although Qt 6 supports schannel on Windows, it may not work for
all use cases. Now both openssl and schannel should be available.

mxe#2957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

please enable openssl for qt6-base
4 participants