Add New..., Add Existing Files..., Add Existing Directory... all greyed out in a qMake project



  • Hello everyone,

    So strange issue I ran into today, basically my project no longer allows me to add files/directories. I did a quick search and found some bugs with this problem back with Creator 2.7 but the issue seems to have been solved long ago.

    So I am running QT 5.10 with Creator 4.5
    This is a fresh install (Im evaluating Qt for work) with a fresh project (simple adding a directory structure for eventual code/unit testing ). It was as I was adding this structure that the problem occurred. If I create a new project the issue disappears and I can add freely again.

    So what would cause any particular project to exhibit this behavior?


  • Qt Champions 2016

    Hi
    I have only seen this one time where it would hang while parsing the
    .pro file upon open the project.
    Anything fancy in the .pro file ?



  • I don't know about fancy. Right now I have 4 .pro files and a .pri file (with a script to select configuration). But I was able to add and modify (add files, etc) the existing project long after I added the initial .pro and .pri files.


  • Qt Champions 2016

    Hmm, sounds pretty standard.
    Did you try to delete/rename the .user file and reselect compiler ?
    When its grey, have you check if it consumes CPU ?
    Im wondering if its possible to create some sort of circular structure and it
    simply never finishes.



  • Yup I deleted the .user file (and all its clones) and that didn't seem to have any affect.

    I don't think its actually doing any work. All the processes seem to be running at idle. But at this point I don't want to rule out anything. It just seems highly unlikely that when using a managed make system (qMake) the IDE would ever block the ability of adding files to the project.


  • Qt Champions 2016

    @Rlkcpo
    Ok. was just a thought.
    Yeah i cant think of a situation where it should stay locked.
    When its grey. It just stay grey for ever?
    What if you alter the .pro file from outside. does it prompt to reload?



  • Nope you were correct. It was the compiler. Not sure how or when it got changed but my kit deselected both the compilers associated with default kit (Desktop Qt 5.10.0 GCC 64bit). This caused the behavior I was seeing.


  • Qt Champions 2016

    Super!
    Good to know as its clearly not easy to spot.



  • @Rlkcpo

    Yup I deleted the .user file (and all its clones) and that didn't seem to have any affect.

    that (clones) sounds as if you opened the project with different Creator versions. that can indeed lead to corrupted compiler settings for the project. especially 'downgrades' seem problematic.


  • Qt Champions 2016

    @aha_1980
    Oh good spotted. I totally missed the cloned part.



  • I only have one version of creator. I assumed the clones were some function of the software. I end up with:

    project.pro.user
    project.pro.user.b34a037
    project.pro.user.a256d45
    etc

    This might be why I continue to lose my settings between sessions. (I end up having to delete everything in the ~/.config/ directory to clear it.)


  • Qt Champions 2016

    @Rlkcpo

    Hmm that is a bit odd then as it how it has multiple .user files.
    if you only use one Creator then im not sure what is going on then.
    and yes, a new .user file forgets all settings from the old.



  • Hmmm ok im going to mark this as unsolved again. It seems as if the problem is back and this time the compilers are not the problem. Again my ability to add files/directories is greyed out.

    I think maybe at this point im getting a bit disillusioned about Qt. I think there is some kind of link to a previously installed version of Qt on this work machine...but for the life of me I cannot find it to remove it.


  • Qt Champions 2016

    Hi
    I assume you on some linux?
    So this time when GREY happened, there was not extra .pro.user.xxxx files?

    Check the icon for Creator (in menu/bar) that it links to the right place.
    and not run qtchooser but directly links to qtcreator in the Qt install folder.

    Also change the theme in Creator so if another should popup you can spot in on colors.

    I assume you tried
    sudo updatedb
    locate qtcreator
    and found only one ?

    Also, you are not using same project from different user profiles ?



  • Hi @Rlkcpo,

    I only have one version of creator. I assumed the clones were some function of the software. I end up with:
    project.pro.user
    project.pro.user.b34a037
    project.pro.user.a256d45

    Ok, these backups are not because of a different version, but because of a different Kit setup. Usually this happens if you open the project with Creators from different computers (e.g. if it is on a network share). It can also happen if you check in the *.pro.user into version control.

    This might be why I continue to lose my settings between sessions.

    No, it's rather other way round.

    (I end up having to delete everything in the ~/.config/ directory to clear it.)

    Ah-ha! This will possible change your kit settings and therefore the *.pro.user becomes invalid.

    The questions if rather, what makes your settings in the .config directory invalid? Today I had an effect that may be related. We had several Creator windows open and added a manual Qt version including debugger and compiler. We did save the setting, but it seems it was overwritten after the last Creator (which did not have this setting) was closed.

    So this is my tip: if you need to change Kit settings, have only one instance open and close it after you changed the setting. Then everything should be fine.



  • @mrjj said in Add New..., Add Existing Files..., Add Existing Directory... all greyed out in a qMake project:

    Hi
    I assume you on some linux?
    So this time when GREY happened, there was not extra .pro.user.xxxx files?

    Check the icon for Creator (in menu/bar) that it links to the right place.
    and not run qtchooser but directly links to qtcreator in the Qt install folder.

    Yes I am running Ubuntu 16.04 and the shortcut is linking to the correct qtcreator executable.

    Also change the theme in Creator so if another should popup you can spot in on colors.

    Yup been running the dark theme to quickly spot when this occurs.

    I assume you tried
    sudo updatedb
    locate qtcreator
    and found only one ?

    Correct there is only one version.

    Also, you are not using same project from different user profiles ?

    Nope. Im the only one on this machine (for the time being).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.