Working example of a .pro.shared file
I want to apply the make flags -j16 to a qt project every time i open it on a different machine / for a different Qt Kit.
I tried to achieve this with the .pro.shared file attached, but no luck.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProject> <!-- Written by QtCreator 4.5.0, 2018-01-08T05:13:01. --> <qtcreator> <data> <variable>ProjectExplorer.Project.Target.0</variable> <valuemap type="QVariantMap"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-j16</value> </valuemap> </valuemap> </valuemap> </valuemap> </data> </qtcreator>
I save this as <projectname>.pro.shared in the same location as the <projectname>.pro but the setting is no being applied when i reopen the project.
What am i doing wrong?
I also tried with the example file from here http://doc.qt.io/qtcreator/creator-sharing-project-settings.html
but the settings were not picked up.
AFAIK, the pro.shared was never not thought to share build-related settings, as that would require to have the same Kits on each installation.
It may work nevertheless. Have you read the sentence "Note: You must always specify the ProjectExplorer.Project.Updater.FileVersion variable and use the same value for it as in the .pro.user file." from your shared doc page? Have you compared the FileVersion with your pro.user file?
However, to solve your original problem, you can vote for QTCREATORBUG-18414.