No the message comes from Qt not Windows (and we call exit(-1))
<qtconnectivity>\src\bluetooth\qbluetoothutils_win.cpp. If we would not
show the message, windows would show a more cryptic error message if I
remember correctly.
On 23/08/2018 15:34, Maurice Kalinowski wrote:
The message resides from Windows as it is not able to resolve all dependencies
and hence the application is not launched at all.
Plugins getting loaded is an API call at runtime, which simply returns a
nullptr and you could add error handling to this. So there is no system dialog
involved or such.
Hence this is a valid workaround. However, as Olli mentioned, you then need to
resolve all functions you need.
BR,
Maurice
-----Original Message-----
From: Interest <interest-bounces+maurice.kalinowski=qt...@qt-project.org> On
Behalf Of maitai
Sent: Thursday, August 23, 2018 3:32 PM
To: interest@qt-project.org
Subject: Re: [Interest] Bluetooth library and old windows versions
Hi Oliver, thanks for your reply
This message is from Qt or from Windows? Because if it is from Qt then maybe it is worth
adding a "compatibility-check" method and let the developer decide if it is
fatal or not?
We could mirror the dummy plugin's behavior in this case, but that would
mean a lot of ifdefery in the windows code. Not sure about the
compatibility check, because the problem is that loading the dll will
fail on runtime on an older Windows version (as mentioned above).
Otherwise I will go with yet another build and install option I think.
The plugin method will probably display the message each time the app is
launched and that is annoying.
Philippe
Le 23-08-2018 15:00, Oliver Wolff a écrit :
Hi,
On 23/08/2018 13:30, maitai wrote:
Hello,
I have a problem with users equipped with an old version of Windows
(8, or 7). The latest version of my app (Qt 5.11.1/MSVC 2017 based)
required QtBluetooth but when users load the app they get a message
saying:
"This Windows version does not support the required Bluetooth API.
Consider updating to a more recent Windows (10.0.10586 or above)"
Then they press OK and the app shuts down.
I understand the message and have no problem removing BT
functionalities for these users with old Windows versions, but my
question is: can I avoid to build several binaries, i.e. is there a
way not to load QtBluetooth if windows version is not recent enough ?
Any other suggestion ?
The message is shown when the dll is loaded, so unfortunately I only
see two other ways of working around the problem.
1) You could try to dlopen the library and lazy load all the
functionality you need. That would mean, that you have to resolve
every function though...
2) You could put your Bluetooth code into a plugin. If that fails to
load, the application will not exit immediately, but only the plugin
loading will fail then.
Thanks
Philippe.
BR,
Olli
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest