Bläddra i källkod

Xcode: Fix storyboard view

Since commit 56831461 (Xcode: Use explicitFileType to mark source types,
2013-04-16) the Xcode generator prefers to use explicitFileType to tell
Xcode about each source file type.  This works better than
lastKnownFileType for some file types, but not for "file.storyboard".

If storyboard file has attribute 'explicitFileType' it is displayed
incorrectly (as raw xml).  Switch it back to 'lastKnownFileType'.
Ruslan Baratov 12 år sedan
förälder
incheckning
2d23c1f177
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4 1
      Source/cmGlobalXCodeGenerator.cxx

+ 4 - 1
Source/cmGlobalXCodeGenerator.cxx

@@ -876,7 +876,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
   else
     {
     std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
-    fileRef->AddAttribute("explicitFileType",
+    const char* attribute = (sourcecode == "file.storyboard") ?
+                             "lastKnownFileType" :
+                             "explicitFileType";
+    fileRef->AddAttribute(attribute,
                           this->CreateString(sourcecode.c_str()));
     }