En effet,
ma clé s'appelle :
CFBundleDocumentTypes
je peux l'ajouter au .plist avec QSettings, mais il ne permet qu'une valeur :
QSettings::setKey("CFBundleDocumentTypes", 10);
Les données que je veux appliquer ressemblent à ca
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| <key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>sam</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>SAM</string>
<key>CFBundleTypeName</key>
<string>SAM Project</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSTypeIsPackage</key>
<true/>
<key>NSPersistentStoreTypeKey</key>
<string>XML</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pb</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>SAM</string>
<key>CFBundleTypeName</key>
<string>SAM Processing Box</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSTypeIsPackage</key>
<true/>
<key>NSPersistentStoreTypeKey</key>
<string>XML</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>uio</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>SAM</string>
<key>CFBundleTypeName</key>
<string>SAM User Interface Object</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSTypeIsPackage</key>
<true/>
<key>NSPersistentStoreTypeKey</key>
<string>XML</string>
</dict>
</array> |
Partager