3
votes

I am using Qt Creator 4.6.2 on Ubuntu, and one of my projects has several build configurations that each have different custom process steps. Somehow my Qt Creator glitched out and my custom configurations were lost. I would like to back up these config files in case this happens again, but cannot figure out where Qt stores them. I found the directory where the kits and toolchains are stored, but no build settings for individual projects. Thanks in advance!

3

3 Answers

2
votes

As far as I know that information is stored in the file xxx.pro.user

project settings

0
votes

The settings are indeed stored in the .user-files. They are very specific to your Creator configuration and can not get transferee to other machines and will not work anymore once you do major changes to your kits, etc.

The best fix for your problem is IMHO to fix your build system to do those extra steps for you. Build systems are made to run commands under certain conditions, it usually is not had to make them do a couple more things:-) That would fix the problem for you and also make life easier for all other developers of your project.

0
votes

Add the .pro.user file to version control, so that it gets backed up along with the rest of the project. When Qt Creator loses it, you can recover your custom settings as follows: 1) let Qt Creator "configure the project" then exit. This leaves you with a new .pro.user file that has no custom settings and probably targets a new build directory. 2) use the merge facility of your vcs to restore the lost settings from the latest backup. Basically take the new file wherever there is a "text conflict" and the old one for "white space conflicts", but take the old text where it names the build directory or deals with run configurations.

It is no good just reverting the .pro.user file, Creator will ignore and replace it. This behavior may be due to Creator comparing the timestamp of the .pro.user file with the one in the .pro file, or one that it saves somewhere; so it might be enough just to revert and edit the timestamp.