QPromise not found...wrong kit in use ?
-
I have cloned concurrency examples from QT 6.2.2 and trying to use QPromise
Added QFuture.
Getting QPromise has not been declared.QPromise was added in 6.2 , I have kit 6.2.2...
Assuming that is the issue - wrong klt being used - how do I specifically enable 6.2.2 ?
I have verbose enabled and I am getting indication that 5.12.12 may be used .
I do not just want to disable every kit and have only 6.2.2. unless somebody tells me that is the only way to force 6.2.2.My concurrency test is a part of subproject and I do not want to mess-up something else .
I went into kit options and changed to "default to 6.2.2" - still getting same problem.
Maybe I need to reboot ??After reboot I am getting this :
11:19:59: Running steps for project MDI_Bluetooth_JAN9_17... 11:19:59: Starting: "/usr/bin/make" clean -j4 rm -f moc_predefs.h rm -f moc_form.cpp moc_mainwindow.cpp moc_operation.cpp moc_tabwidget.cpp rm -f form.moc operation.moc rm -f ui_form.h ui_mainwindow.h ui_tabwidget.h rm -f form.o main.o mainwindow.o operation.o tabwidget.o moc_form.o moc_mainwindow.o moc_operation.o moc_tabwidget.o rm -f *~ core *.core 11:19:59: The process "/usr/bin/make" exited normally. 11:19:59: Starting: "/home/qy/Qt/5.12.12/gcc_64/bin/qmake" /mnt/sdd6/MDI_Bluetooth_JAN9_17/HCI/HCI.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug Project MESSAGE: suppress compiler warnings Project MESSAGE: WORKING JAN5 11:20:00: The process "/home/qy/Qt/5.12.12/gcc_64/bin/qmake" exited normally. 11:20:00: Starting: "/usr/bin/make" -f /mnt/sdd6/build-MDI_Bluetooth_JAN9_17-Desktop_Qt_5_12_12_GCC_64bit-Debug/HCI/Makefile qmake_all make: Nothing to be done for 'qmake_all'. 11:20:00: The process "/usr/bin/make" exited normally. 11:20:00: Starting: "/usr/bin/make" -j4 /home/qy/Qt/5.12.12/gcc_64/bin/uic ../../MDI_Bluetooth_JAN9_17/HCI/form.ui -o ui_form.h /home/qy/Qt/5.12.12/gcc_64/bin/uic ../../MDI_Bluetooth_JAN9_17/HCI/mainwindow.ui -o ui_mainwindow.h /home/qy/Qt/5.12.12/gcc_64/bin/uic ../../MDI_Bluetooth_JAN9_17/HCI/tabwidget.ui -o ui_tabwidget.h
I am still using 5.12.12...
-
Hi, probably easiest to reconfigure your project to use a 6.2.2 kit.
Quit Qt Creator and make a backup of your project
Delete your .pro.user file, in your case:
rm /mnt/sdd6/MDI_Bluetooth_JAN9_17/HCI/HCI.pro.user
Then start Qt Creator again, now you should see the "Configure project" page, select a 6.2.2 kit. -
You can also configure more than one Kit at a time and then switch between them. For your case, you could conditionally include your QPromise sub-project in your top-level project file based on the QT_VERSION of the currently selected Kit:
versionAtLeast(QT_VERSION, 6.2.2){ SUBDIRS += myPromiseTest/myPromiseTest.pro } else { message("QT Version is less than 6.2.2, excluding QPromise test project") }
-
@mchinand said in QPromise not found...wrong kit in use ?:
You can also configure more than one Kit at a time and then switch between them. For your case, you could conditionally include your QPromise sub-project in your top-level project file based on the QT_VERSION of the currently selected Kit:
versionAtLeast(QT_VERSION, 6.2.2){ SUBDIRS += myPromiseTest/myPromiseTest.pro } else { message("QT Version is less than 6.2.2, excluding QPromise test project") }
The subproject I a, doing the testiong has this in .pro
QT += core gui concurrent # promise no module QPromise # concurent TEMPLATE = lib greaterThan(QT_MAJOR_VERSION, 4): QT += widgets ```Am I reading it correctly - it sets QT version specifically for widgets... I have no major issues with 5.12.12 so if I change ONLY the subproject using "concurrency" I'll be a happy camper. At preset , under construction, it takes too long to keep rebuilding the entire project - so I started an independent project to test concurrency. It is progressing slowly - learning about"lambda" and "templates" .... Thanks.
-
@hskoglund said in QPromise not found...wrong kit in use ?:
Hi, probably easiest to reconfigure your project to use a 6.2.2 kit.
Quit Qt Creator and make a backup of your project
Delete your .pro.user file, in your case:
rm /mnt/sdd6/MDI_Bluetooth_JAN9_17/HCI/HCI.pro.user
Then start Qt Creator again, now you should see the "Configure project" page, select a 6.2.2 kit.OK, I am ready to bite the bullet and change the entire project ( yes I have a backup) to new configuration by removing pro.user.
Which one ?
My current .pro is "...JAN9_17.pro"
I assume I need to remove "..JAN9_17.pro.user"Which brings up a new question - why do I have the other .pro.user in a folder which has "JAN9_17" project only ?
( But I can look it up myself... all about "pro.user " file ) -
Whoops - I get no "configure " project and the "...pro.user" gets rebuild....
Maybe this won't work on "subdirs " project ?Should I just disable all other versions and have only 6.2.2 ?
-
To re-configure, delete all of the .pro.user files. Do you not get something like the screenshot below when you then open the .pro file of your project? Then select the Kits (Qt versions) and build types (Release, Debug, etc) you want to have. You can try it for one of the examples as I have done for this screenshot. Note in my screenshot, the Qt 6.2.1 Kit is not selected (but could have been) so the project won't be configured for that kit.
-
-
SUCCESS
Manged to rebuild, with lots of errors (to work on) , the entire project using 6.2.2.
I did two things wrong- I did not delete the user files , just renamed them
- I did not delete ALL user files.
Thanks for your help.