зеркало из https://github.com/mozilla/pjs.git
fixing code that relied on implicit string construction
This commit is contained in:
Родитель
68a02526c1
Коммит
26ac38b3c8
|
@ -626,7 +626,7 @@ NS_IMETHODIMP nsAbSync::PerformAbSync(nsIDOMWindow *aDOMWindow, PRInt32 *aTransa
|
|||
//
|
||||
if ( (mAbSyncAddressBook) && (*mAbSyncAddressBook) )
|
||||
{
|
||||
nsCString prefId = "ldap_2.servers.";
|
||||
nsCString prefId("ldap_2.servers.");
|
||||
prefId.Append(mAbSyncAddressBook);
|
||||
prefId.Append(".filename");
|
||||
|
||||
|
@ -2822,7 +2822,7 @@ nsAbSync::AddValueToNewCard(nsIAbCard *aCard, nsString *aTagName, nsString *aTag
|
|||
tValue = aTagValue->ToNewCString();
|
||||
if (tValue)
|
||||
{
|
||||
rv = nsMsgI18NConvertToUnicode(nsCString("UTF-8"), tValue, outValue);
|
||||
rv = nsMsgI18NConvertToUnicode(nsCString("UTF-8"), nsCString(tValue), outValue);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
aTagValue->Assign(outValue);
|
||||
PR_FREEIF(tValue);
|
||||
|
|
|
@ -115,7 +115,7 @@ void nsAbAutoCompleteSession::AddToResult(const PRUnichar* pNickNameStr, const P
|
|||
if (mDefaultDomain[0] == 0)
|
||||
return;
|
||||
|
||||
nsAutoString aStr = pNameStr;
|
||||
nsAutoString aStr(pNameStr);
|
||||
aStr.AppendWithConversion('@');
|
||||
aStr += mDefaultDomain;
|
||||
fullAddrStr = aStr.ToNewUnicode();
|
||||
|
@ -151,7 +151,7 @@ void nsAbAutoCompleteSession::AddToResult(const PRUnichar* pNickNameStr, const P
|
|||
if (!fullAddrStr)
|
||||
{
|
||||
//oops, parser problem! I will try to do my best...
|
||||
nsAutoString aStr = pNameStr;
|
||||
nsAutoString aStr(pNameStr);
|
||||
aStr.AppendWithConversion(" <");
|
||||
if (bIsMailList)
|
||||
{
|
||||
|
|
|
@ -146,7 +146,7 @@ nsresult nsAbRDFDataSource::NotifyPropertyChanged(nsIRDFResource *resource,
|
|||
const PRUnichar *newValue)
|
||||
{
|
||||
nsCOMPtr<nsIRDFNode> newValueNode;
|
||||
nsString newValueStr = newValue;
|
||||
nsString newValueStr(newValue);
|
||||
createNode(newValueStr, getter_AddRefs(newValueNode));
|
||||
NotifyObservers(resource, propertyResource, newValueNode, PR_FALSE, PR_TRUE);
|
||||
return NS_OK;
|
||||
|
|
|
@ -392,7 +392,7 @@ nsAddbookProtocolHandler::GeneratePrintOutput(nsIAddbookUrl *addbookUrl,
|
|||
if (NS_FAILED(rv) || !pPref)
|
||||
goto EarlyExit;
|
||||
|
||||
nsCString prefId = "ldap_2.servers.";
|
||||
nsCString prefId("ldap_2.servers.");
|
||||
prefId.Append(charAb);
|
||||
prefId.Append(".filename");
|
||||
|
||||
|
|
|
@ -117,8 +117,8 @@ nsAddbookUrl::CrackAddURL(char *searchPart)
|
|||
NS_IMETHODIMP
|
||||
nsAddbookUrl::CrackPrintURL(char *searchPart, PRInt32 aOperation)
|
||||
{
|
||||
nsCString emailAddr = "";
|
||||
nsCString folderName = "";
|
||||
nsCString emailAddr;
|
||||
nsCString folderName;
|
||||
|
||||
char *rest = searchPart;
|
||||
|
||||
|
|
|
@ -679,7 +679,7 @@ nsresult nsAbCardDataSource::DoNewCard(nsIAbCard *card, nsISupportsArray *argume
|
|||
{
|
||||
PRUnichar *name;
|
||||
literal->GetValue(&name);
|
||||
nsString tempStr = name;
|
||||
nsString tempStr(name);
|
||||
nsMemory::Free(name);
|
||||
nsCAutoString nameStr; nameStr.AssignWithConversion(tempStr);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче