Disable API prior to 6.2 - no go
-
QPromise was added in 6.2 , my kit is set to 6.2.2 and QPromise is not valid.
Per note in .pro
I enabled this DEFINES and still cannot use QPromise.Is my "number " 0x060200 correct ?
Am I missing something else ?#QPromise # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060200 # disables all the APIs deprecated before Qt 6.2.0 -
Is my "number " 0x060200 correct ?
Yes.
I enabled this DEFINES and still cannot use QPromise.
As a new API it is unrelated to "deprecated before" stuff.
From documentation it seems all you need for it to work is
QT+=corewhich is there by default. Strange, it should work! What error message are you getting? -
What difference does it makes what error I am getting?
Is the title of post enough "description"?Can anybody answer my " is the number " correct question ?
Now you can see same
error" I am getting . Hope it helps.
-
I have build an independent t, not part of my main project, project and selected kit 6.2.2.
It still fails to find QPromise.
I am going to load another 6.2 and see if that is the problem .
Stand by. -
@sierdzio already answered that question and correctly stated that setting that variable is unrelated to your problem since you are not working with a deprecated class or function. You either have an error in your .pro file, you're using the wrong kit, and/or didn't start with a clean (empty) build folder. Share your .pro file and a screenshot of your 'Projects' page from QtCreator. And the full compile output.
-
I have found that mixing versions in "subproject" is a bad thing.
But it can be done - so I am back to RTFM
Until then I cannot honestly say this has been solved.PS I wonder if I can add the 6.2.2 version subproject as a complied library - after all that is how it is going to be a part of "subdirs" project anyway - as a library. .
-
You must not mix Qt libraries with different version. Especially you must not mix Qt5 and Qt6.