зеркало из https://github.com/mozilla/gecko-dev.git
Bug 700234 - get rid of *WithConversion (widget part). r=roc
This commit is contained in:
Родитель
08c605c230
Коммит
a9ee952c81
|
@ -768,10 +768,10 @@ GfxInfo::AddCrashReportAnnotations()
|
|||
|
||||
if (vendorID == 0) {
|
||||
/* if we didn't find a valid vendorID lets append the mDeviceID string to try to find out why */
|
||||
note.Append(", ");
|
||||
note.AppendWithConversion(mDeviceID);
|
||||
note.Append(", ");
|
||||
note.AppendWithConversion(mDeviceKeyDebug);
|
||||
note.AppendLiteral(", ");
|
||||
LossyAppendUTF16toASCII(mDeviceID, note);
|
||||
note.AppendLiteral(", ");
|
||||
LossyAppendUTF16toASCII(mDeviceKeyDebug, note);
|
||||
}
|
||||
note.Append("\n");
|
||||
|
||||
|
@ -779,7 +779,7 @@ GfxInfo::AddCrashReportAnnotations()
|
|||
PRUint32 deviceID2, vendorID2;
|
||||
nsAutoString adapterDriverVersionString2;
|
||||
|
||||
note.Append("Has dual GPUs. GPU #2: ");
|
||||
note.AppendLiteral("Has dual GPUs. GPU #2: ");
|
||||
GetAdapterDeviceID2(&deviceID2);
|
||||
GetAdapterVendorID2(&vendorID2);
|
||||
GetAdapterDriverVersion2(adapterDriverVersionString2);
|
||||
|
|
|
@ -1236,7 +1236,7 @@ nsBaseWidget::debug_GuiEventToString(nsGUIEvent * aGuiEvent)
|
|||
nsAutoString eventName(NS_LITERAL_STRING("UNKNOWN"));
|
||||
|
||||
#define _ASSIGN_eventName(_value,_name)\
|
||||
case _value: eventName.AssignWithConversion(_name) ; break
|
||||
case _value: eventName.AssignLiteral(_name) ; break
|
||||
|
||||
switch(aGuiEvent->message)
|
||||
{
|
||||
|
@ -1292,7 +1292,7 @@ case _value: eventName.AssignWithConversion(_name) ; break
|
|||
|
||||
sprintf(buf,"UNKNOWN: %d",aGuiEvent->message);
|
||||
|
||||
eventName.AssignWithConversion(buf);
|
||||
CopyASCIItoUTF16(buf, eventName);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1440,7 +1440,7 @@ nsBaseWidget::debug_DumpEvent(FILE * aFileOut,
|
|||
if (!debug_GetCachedBoolPref("nglayout.debug.event_dumping"))
|
||||
return;
|
||||
|
||||
nsCAutoString tempString; tempString.AssignWithConversion(debug_GuiEventToString(aGuiEvent).get());
|
||||
NS_LossyConvertUTF16toASCII tempString(debug_GuiEventToString(aGuiEvent).get());
|
||||
|
||||
fprintf(aFileOut,
|
||||
"%4d %-26s widget=%-8p name=%-12s id=%-8p refpt=%d,%d\n",
|
||||
|
|
|
@ -168,10 +168,7 @@ nsHTMLFormatConverter::CanConvert(const char *aFromDataFlavor, const char *aToDa
|
|||
if ( !_retval )
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
// STRING USE WARNING: reduce conversions here?
|
||||
|
||||
*_retval = false;
|
||||
nsAutoString fromFlavor; fromFlavor.AssignWithConversion( aFromDataFlavor );
|
||||
if ( !nsCRT::strcmp(aFromDataFlavor, kHTMLMime) ) {
|
||||
if ( !nsCRT::strcmp(aToDataFlavor, kHTMLMime) )
|
||||
*_retval = true;
|
||||
|
|
|
@ -1116,16 +1116,14 @@ void
|
|||
nsPrintOptions::ReadInchesToTwipsPref(const char * aPrefId, PRInt32& aTwips,
|
||||
const char * aMarginPref)
|
||||
{
|
||||
nsCAutoString str;
|
||||
nsresult rv = Preferences::GetCString(aPrefId, &str);
|
||||
nsAutoString str;
|
||||
nsresult rv = Preferences::GetString(aPrefId, &str);
|
||||
if (NS_FAILED(rv) || str.IsEmpty()) {
|
||||
rv = Preferences::GetCString(aMarginPref, &str);
|
||||
rv = Preferences::GetString(aMarginPref, &str);
|
||||
}
|
||||
if (NS_SUCCEEDED(rv) && !str.IsEmpty()) {
|
||||
nsAutoString justStr;
|
||||
justStr.AssignWithConversion(str);
|
||||
PRInt32 errCode;
|
||||
float inches = justStr.ToFloat(&errCode);
|
||||
float inches = str.ToFloat(&errCode);
|
||||
if (NS_SUCCEEDED(errCode)) {
|
||||
aTwips = NS_INCHES_TO_INT_TWIPS(inches);
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче