Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to reset QT Creator's intellisense



  • I was quite happy with how intellisense works under QT Creator until my project became complex enough. Now intellisense sends me to wrong places and generally misbehaves.

    I could not figure out how to reset intellisense database and where this information is kept on disk.

    Does anyone know how to rebuild the intellisense database from scratch without re-creating whole project and session?



  • intellisence (precisely, code model) should be refreshed on evry project property change or project opening...
    You can delete "QtCreator.db" and "QtCreator.ini" files at you user setting directory (~/.config, AppData/Roaming/Qtc or similar), but i not quite sure that it really helps. Code memory in memory afaik...
    maybe you shoul tune your build environment, such as available include paths, to be "sent in right places"?
    Could you describe examples of incorrect behaviour? if it is a definetly bug, you maybe welcome at https://bugreports.qt-project.org/browse/QTCREATORBUG



  • I would think that db must be per project and not for the whole QT. Thanks for the tip, I will play with it.

    I now think that it is related to the fact that I am using file names with some letters capitalized. I noticed that those files sometimes appear in the list of Open Documents twice, with their actual name and with all-lower case name. My current theory is that this what messes up the internal db.

    I now close those duplicates as soon as I spot them and code model seems to recover the correct behavior, after all the duplicates closed.

    I also restart QT Creator more frequently, which seems to help too.


  • Moderators

    [quote author="John.Curious" date="1388285012"]I now think that it is related to the fact that I am using file names with some letters capitalized. I noticed that those files sometimes appear in the list of Open Documents twice, with their actual name and with all-lower case name.[/quote]This sounds a lot like a bug found in Qt Creator 3.0-RC1, which was fixed in the final release: https://bugreports.qt-project.org/browse/QTCREATORBUG-10994

    Did you install the final version of Qt 5.2.0 + Qt Creator 3.0? They were released on 12 December 2013.



  • Yes, it sounds similar, but not the same exactly.
    I now upgraded to 5.2.0, and, after a while of working, I realized that the problem I am observing still there. I may need to submit a bug report at this point?




  • Moderators

    Can you please open Qt Creator and select Help -> About Qt Creator... and check the version info? Mine is:

    Based on Qt 5.2.0 (MSVC 2010, 32 bit)

    Built on Dec 10 2013 at 11:49:18

    From revision 27d10d8dcd

    If yours is the same, then you've found a new bug. If yours is older, upgrade.

    See https://bugreports.qt-project.org/browse/QTCREATORBUG-10823 -- this has different symptoms from my previous link, but it has the same root cause (that's why they were marked 'Duplicate'). Once the case-sensitivity issue goes away, your Intellisense issue might disappear too



  • Yes, my version is the same:
    Qt Creator 3.0.0
    Based on Qt 5.2.0 (MSVC 2010, 32 bit)
    Built on Dec 10 2013 at 11:49:18
    From revision 27d10d8dcd

    Yes, I also hope that intellisense issue will disappear after the case-sensitivity is straighten out.


  • Moderators

    Odd, I thought that bug was fixed by now. Thanks for submitting the report. I hope if gets resolved soon.



  • I had these problems also, after my project was a little bit bigger, and some refactorings were made.
    The problem was completely solved, after I had renamed the pro.user file.
    Ok, the output directories were away, but I use the automatic settings here anyway. So it was not so angry.


Log in to reply