Bug 600900 - [clang]: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'NSString const in nsDragService.mm, r=josh, a=josh
authorScott Greenlay <sgreenlay@mozilla.com>
Wed, 17 Nov 2010 13:46:39 -0800
changeset 57861 0fab20410b0ae45a8ed43a8de77099deb7407dc6
parent 57860 0e4ab404540dcdedd3f177017c59249c41869b7b
child 57862 62b716f5e267da22e4eff6e25b60786709f037b5
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersjosh, josh
bugs600900
milestone2.0b8pre
Bug 600900 - [clang]: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'NSString const in nsDragService.mm, r=josh, a=josh
widget/src/cocoa/nsDragService.mm
--- a/widget/src/cocoa/nsDragService.mm
+++ b/widget/src/cocoa/nsDragService.mm
@@ -407,17 +407,17 @@ nsDragService::GetData(nsITransferable* 
 
       nsCOMPtr<nsISupports> genericDataWrapper;
       genericDataWrapper = do_QueryInterface(file);
       aTransferable->SetTransferData(flavorStr, genericDataWrapper, dataLength);
       
       break;
     }
 
-    const NSString *pboardType = NSStringPboardType;
+    NSString *pboardType = NSStringPboardType;
 
     if (nsClipboard::IsStringType(flavorStr, &pboardType) ||
         flavorStr.EqualsLiteral(kURLMime) ||
         flavorStr.EqualsLiteral(kURLDataMime) ||
         flavorStr.EqualsLiteral(kURLDescriptionMime)) {
       NSString* pString = [globalDragPboard stringForType:pboardType];
       if (!pString)
         continue;
@@ -509,17 +509,17 @@ nsDragService::IsDataFlavorSupported(con
         if (dataFlavor.Equals(flavorStr)) {
           *_retval = PR_TRUE;
           return NS_OK;
         }
       }
     }
   }
 
-  const NSString *pboardType;
+  NSString *pboardType = nil;
 
   if (dataFlavor.EqualsLiteral(kFileMime)) {
     NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObject:NSFilenamesPboardType]];
     if (availableType && [availableType isEqualToString:NSFilenamesPboardType])
       *_retval = PR_TRUE;
   }
   else if (dataFlavor.EqualsLiteral(kURLMime)) {
     NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObject:kCorePboardType_url]];