12-02-2012 01:34 PM
After uninstalling the Beta 3 Momentics IDE und installing the new Beta 4 I noticed that the IDE autocompletion does not work any more for Qt classes when I create a new project from a template (empty or non-empty). It appears that the IDE cannot find the Qt header files:
But I can compile the project without problems.
Also when I import my old projects created with Beta 3 the autocompletion works for Qt classes. When I compared them I noticed that the Makefiles have changed completely.
Of course I could stick with my old project structure but the Release Notes for Beta 4 mention something about changes in the Qt libraries, precompiled headers and so on which could require making changes in Beta 3 projects. To avoid running into problems I thought I could just create new projects in Beta 4 and reimport my source files from my Beta 3 projects. But I want to keep the autocompletition for Qt classes.
I assume it is just a problem in the automatically created files of the project. Is there a way to fix them?
Solved! Go to Solution.
12-02-2012 07:37 PM
12-03-2012 04:26 AM
12-03-2012 05:29 PM - edited 12-03-2012 05:38 PM
Thanks for your answers. The hint to rebuild the index was helpful but didn't solve the problem by itself.
But by comparing all files of some of my old Cascades projects generated in Beta 3 and newly generated in Beta 4 I found that in the Beta 4 projects the .cproject files were missing several tags which are setting the include path to the Qt headers for the IDE. Note, I'm not refering to the include pathes settings for the compiler here. Just autocompletion and also code analysis in the IDE did not work.
Anyway to fix this I found the following workaround:
There are four instances of these tags in the .cproject file of a Cascades project (Beta 4):
<option id="com.qnx.qcc.option.compiler.includePath.NNNNN" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath"> <listOptionValue builtIn="false" value=""/> </option>
Where NNNNN is some random number. When I change all these 4 instances to:
<option id="com.qnx.qcc.option.compiler.includePath.NNNNN" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath"> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/includ e"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/> </option>
...so they look again like they did in Beta 3 and then refresh the project or restart the whole IDE autocompletion starts working again for new Beta 4 projects. When I then invoke Index -> Rebuild as recommended in the other thread also C++ code analysis for syntax and semantics errors works again (if you have it enabled in the IDE).
I guess these lines could also be added to the template files somewhere in the BB NDK installation folder but I didn't want to patch files there.
I filed a new issue here:
https://www.blackberry.com/jira/browse/BBTEN-466
12-17-2012 03:21 PM
Is anyone else experiencing this in the SDK Gold release?
12-17-2012 09:07 PM - edited 12-17-2012 09:13 PM
Yes I do. The difference is only that in the Gold release it appears to work on the first time you create a new project in the IDE. But as soon as you restart the IDE the problem is back. (I made a clean installation of Gold and I created a new workspace folder before.)
But the same workaround I described above still works. Except that in Gold projects there are no empty "<option id="com.qnx.qcc.option.compiler.includePath.NNNNN" superClass="com.qnx.qcc.option.compiler.includePat
But you can add them by just adding some lib to the project using the new Library Wizard as I described here in the last posting:
http://supportforums.blackberry.com/t5/Cascades-De
For example just add QtCore. Then you will get these tags in the .cproject file and then you can apply the workaround I described above. But actually you only need to add the includePath lines you use in your project. After doing that everything works for me.
12-18-2012 03:36 AM
Thank youu tw - this worked a treat.
Just for reference I also had to right click project > index > rebuild
Thank you again
01-07-2013 02:36 PM
In Gold Version for a new Cascade Project:
1. Configure-->Add Library-->Qt Core
2. Add " QT += core " into Pro file
3. Properties-->C/C++ General-->Paths and Symbols--> GNU C-->Add--> C:\bbndk\target_10_0_9_1673\qnx6\usr\in
4. Clean and rebuilt project
04-04-2013 09:15 PM
04-05-2013 02:08 AM - edited 04-05-2013 03:17 AM
Hello,
I have tried all the suggestions posted in this thread and in this http://supportforums.blackberry.com/t5/Cascades-De
Every time I restart the IDE, I get this "unresolved inclusion" for each of my #include directives. It's getting annoying that I have to create new project and copy my files over, every time.
I tried several IDE versions : 10.0.1.0.1020 and 10.0.10.822 - same problem.
EDIT:
I don't understand how come I have no problem with the sample apps though.