diff --git a/mozilla/mailnews/local/src/nsLocalMailFolder.cpp b/mozilla/mailnews/local/src/nsLocalMailFolder.cpp index 89244a98471..50c4613629b 100644 --- a/mozilla/mailnews/local/src/nsLocalMailFolder.cpp +++ b/mozilla/mailnews/local/src/nsLocalMailFolder.cpp @@ -217,7 +217,7 @@ nsFolderCompactState::FinishCompact() // add the node back the tree nsCOMPtr child; - nsAutoString folderName = (const char*) idlName; + nsAutoString folderName; folderName.AssignWithConversion((const char*) idlName); rv = parentFolder->AddSubfolder(&folderName, getter_AddRefs(child)); if (child) { @@ -491,7 +491,7 @@ nsMsgLocalMailFolder::CreateSubFolders(nsFileSpec &path) nsFileSpec currentFolderPath = (nsFileSpec&)dir; folderName = currentFolderPath.GetLeafName(); - currentFolderNameStr = folderName; + currentFolderNameStr.AssignWithConversion(folderName); if (nsShouldIgnoreFile(currentFolderNameStr)) { PL_strfree(folderName); @@ -519,8 +519,8 @@ NS_IMETHODIMP nsMsgLocalMailFolder::AddSubfolder(nsAutoString *name, if(NS_FAILED(rv)) return rv; nsAutoString uri; - uri.Append(mURI); - uri.Append('/'); + uri.AppendWithConversion(mURI); + uri.AppendWithConversion('/'); uri.Append(*name); nsCOMPtr res; @@ -544,15 +544,15 @@ NS_IMETHODIMP nsMsgLocalMailFolder::AddSubfolder(nsAutoString *name, //Only set these is these are top level children. if(NS_SUCCEEDED(rv) && isServer) { - if(name->Compare("Inbox", PR_TRUE) == 0) + if(name->CompareWithConversion("Inbox", PR_TRUE) == 0) { flags |= MSG_FOLDER_FLAG_INBOX; mBiffState = nsMsgBiffState_Unknown; } - else if(name->Compare("Trash", PR_TRUE) == 0) + else if(name->CompareWithConversion("Trash", PR_TRUE) == 0) flags |= MSG_FOLDER_FLAG_TRASH; - else if(name->Compare("Unsent Messages", PR_TRUE) == 0 - || name->Compare("Outbox", PR_TRUE) == 0) + else if(name->CompareWithConversion("Unsent Messages", PR_TRUE) == 0 + || name->CompareWithConversion("Outbox", PR_TRUE) == 0) flags |= MSG_FOLDER_FLAG_QUEUE; #if 0 //These should probably be read in from a preference. Hacking in here for the moment. @@ -630,7 +630,7 @@ nsMsgLocalMailFolder::AddDirectorySeparator(nsFileSpec &path) // unfortunately we can't just say: // path += sep; // here because of the way nsFileSpec concatenates - nsAutoString str((nsFilePath)path); + nsAutoString str; str.AssignWithConversion(NS_STATIC_CAST(nsFilePath, path)); str += sep; path = nsFilePath(str); @@ -1281,13 +1281,13 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Rename(const PRUnichar *aNewName) parentFolder->PropagateDelete(this, PR_FALSE); } - nsCAutoString newNameStr(aNewName); + nsCAutoString newNameStr; newNameStr.AssignWithConversion(aNewName); oldPathSpec->Rename(newNameStr.GetBuffer()); newNameStr += ".msf"; oldSummarySpec.Rename(newNameStr.GetBuffer()); if (NS_SUCCEEDED(rv) && cnt > 0) { - nsCAutoString newNameDirStr(aNewName); + nsCAutoString newNameDirStr; newNameDirStr.AssignWithConversion(aNewName); newNameDirStr += ".sbd"; dirSpec.Rename(newNameDirStr.GetBuffer()); } diff --git a/mozilla/mailnews/local/src/nsLocalUndoTxn.cpp b/mozilla/mailnews/local/src/nsLocalUndoTxn.cpp index 6ed1bf59244..512cc3b4a9a 100644 --- a/mozilla/mailnews/local/src/nsLocalUndoTxn.cpp +++ b/mozilla/mailnews/local/src/nsLocalUndoTxn.cpp @@ -158,7 +158,7 @@ nsLocalMoveCopyMsgTxn::UndoImapDeleteFlag(nsIMsgFolder* folder, { if (msgIds.Length() > 0) msgIds.Append(','); - msgIds.Append((PRInt32) keyArray.GetAt(i)); + msgIds.AppendInt((PRInt32) keyArray.GetAt(i)); } nsCOMPtr eventQueue; NS_WITH_SERVICE(nsIEventQueueService, pEventQService, diff --git a/mozilla/mailnews/local/src/nsLocalUtils.cpp b/mozilla/mailnews/local/src/nsLocalUtils.cpp index 3db7874262f..a982759da2b 100644 --- a/mozilla/mailnews/local/src/nsLocalUtils.cpp +++ b/mozilla/mailnews/local/src/nsLocalUtils.cpp @@ -162,7 +162,7 @@ nsLocalURI2Path(const char* rootURI, const char* uriStr, } // verify that uristr starts with rooturi - nsAutoString uri = uriStr; + nsAutoString uri; uri.AssignWithConversion(uriStr); if (uri.Find(rootURI) != 0) return NS_ERROR_FAILURE; diff --git a/mozilla/mailnews/local/src/nsMailboxUrl.cpp b/mozilla/mailnews/local/src/nsMailboxUrl.cpp index 56e6d91d7b5..24d659c0584 100644 --- a/mozilla/mailnews/local/src/nsMailboxUrl.cpp +++ b/mozilla/mailnews/local/src/nsMailboxUrl.cpp @@ -388,7 +388,7 @@ NS_IMETHODIMP nsMailboxUrl::SetSpec(const char * aSpec) { nsresult rv = nsMsgMailNewsUrl::SetSpec(aSpec); if (NS_SUCCEEDED(rv)) - rv = ParseUrl(""); + rv = ParseUrl(nsAutoString()); return rv; } diff --git a/mozilla/mailnews/local/src/nsParseMailbox.cpp b/mozilla/mailnews/local/src/nsParseMailbox.cpp index 0e1afe8d8b9..96387953565 100644 --- a/mozilla/mailnews/local/src/nsParseMailbox.cpp +++ b/mozilla/mailnews/local/src/nsParseMailbox.cpp @@ -229,9 +229,9 @@ void nsMsgMailboxParser::UpdateStatusText (PRUint32 stringID) { // all this ugly conversion stuff is necessary because we can't sprintf a value // with a PRUnichar string. - nsCAutoString cstr (statusString); + nsCAutoString cstr; cstr.AssignWithConversion(statusString); char * finalString = PR_smprintf(cstr.GetBuffer(), (const char *) m_folderName); - nsAutoString uniFinalString(finalString); + nsAutoString uniFinalString; uniFinalString.AssignWithConversion(finalString); m_statusFeedback->ShowStatusString(uniFinalString.GetUnicode()); PL_strfree(finalString); } @@ -1712,7 +1712,7 @@ NS_IMETHODIMP nsParseNewMailState::ApplyFilterHit(nsIMsgFilter *filter, PRBool * // so we use an nsString from above. PRUnichar *folderName = nsnull; rv = trash->GetName(&folderName); - trashNameVal = nsCAutoString(folderName); + trashNameVal.AssignWithConversion(folderName); PR_FREEIF(folderName); value = (void *) trashNameVal.GetBuffer(); } diff --git a/mozilla/mailnews/local/src/nsPop3Protocol.cpp b/mozilla/mailnews/local/src/nsPop3Protocol.cpp index eb8f176d9d8..362a242e4fe 100644 --- a/mozilla/mailnews/local/src/nsPop3Protocol.cpp +++ b/mozilla/mailnews/local/src/nsPop3Protocol.cpp @@ -1970,9 +1970,9 @@ nsPop3Protocol::SendRetr() { // all this ugly conversion stuff is necessary because we can't sprintf a value // with a PRUnichar string. - nsCAutoString cstr (statusString); + nsCAutoString cstr; cstr.AssignWithConversion(statusString); char * finalString = PR_smprintf(cstr.GetBuffer(),m_pop3ConData->real_new_counter, m_pop3ConData->really_new_messages); - nsAutoString uniFinalString(finalString); + nsAutoString uniFinalString; uniFinalString.AssignWithConversion(finalString); if (m_statusFeedback) m_statusFeedback->ShowStatusString(uniFinalString.GetUnicode()); PL_strfree(finalString);