Automatically adding new external files.



  • We're using Qt Creator to develop our project with our own build system.

    We keep the project files under version control, though they're often left out of updates, so when files get added/deleted via SVN, or manually copied within the project, there's often a cumbersome process whereby people need to go to File > Add External Files to get the new files to show up in the source tree.

    My current makeshift solution is that when my project.files gets out of sync I just use the following script, build-files.sh > project.files.

    #!/bin/bash
    
    find src -name *cc -o -name *hh
    find src -name *\.c -o -name *\.h
    find -L include -type d -o -print
    find python_src -name *py
    find -name -name Makefile -o -name \*java
    

    However this isn't the cleanest process since it requires manual intervention or a semi-frequent cron job. I thought about a slightly more complicated solution using inotify to run the script when the list of files got changed, but I was wondering if anyone else had encountered the same problem and found a proper solution? Is there a basic piece of Qt Creator that would fix this?


  • Lifetime Qt Champion

    Hi,

    What version of Qt are you using ?
    What version of Qt Creator are you using ?
    What Linux distribution are you running ?



  • @SGaist
    Qt Creator 3.0.1
    Based on Qt 5.5.1 (GCC 4.8.2 20140120 (Red Hat 4.8.2-16), 64 bit)
    CentOS Linux release 7.2.1511 (Core)


  • Lifetime Qt Champion

    Slightly out of date, current version of Qt Creator is 4.6. You should try that one.



  • @SGaist I updated to Qt Creator 4.1.0 (newest I can get without going external on CentOS 7.2)

    I go into my project, manually copy a source file outside of qtcreator, and Qt Creator doesn't see the new file or give any mechanism to automatically detect and add it.

    I can try looking for a 4.6 install but is this a piece of functionality that's supposed to exist in 4.6? I didn't see any mention of it when looking online.


Log in to reply
 

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