Bug 1410033 - Port Bug 1409635 (part 2) to mailnews [Fix up nsIPrefLocalizedString]. rs=bustage-fix
This commit is contained in:
Родитель
2fb05c45d5
Коммит
418c36a769
|
@ -115,7 +115,7 @@ AppendDistroSearchDirs(nsIProperties* aDirSvc, nsCOMArray<nsIFile> &array)
|
|||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsAutoString wLocale;
|
||||
prefString->GetData(getter_Copies(wLocale));
|
||||
prefString->GetData(wLocale);
|
||||
CopyUTF16toUTF8(wLocale, locale);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -583,7 +583,7 @@ NS_IMETHODIMP nsAbDirProperty::SetLocalizedStringValue(const char *aName,
|
|||
do_CreateInstance(NS_PREFLOCALIZEDSTRING_CONTRACTID, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = locStr->SetData(NS_ConvertUTF8toUTF16(aValue).get());
|
||||
rv = locStr->SetData(NS_ConvertUTF8toUTF16(aValue));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return m_DirectoryPrefs->SetComplexValue(aName,
|
||||
|
|
|
@ -1299,7 +1299,7 @@ static void DIR_SetLocalizedStringPref
|
|||
|
||||
NS_ConvertUTF8toUTF16 newValue(value);
|
||||
|
||||
rv = newStr->SetData(newValue.get());
|
||||
rv = newStr->SetData(newValue);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Could not set pref data in DIR_SetLocalizedStringPref");
|
||||
|
@ -1311,7 +1311,7 @@ static void DIR_SetLocalizedStringPref
|
|||
getter_AddRefs(locStr))))
|
||||
{
|
||||
nsString data;
|
||||
locStr->GetData(getter_Copies(data));
|
||||
locStr->GetData(data);
|
||||
|
||||
// Only set the pref if the data values aren't the same (i.e. don't change
|
||||
// unnecessarily, but also, don't change in the case that its a chrome
|
||||
|
@ -1334,7 +1334,7 @@ static void DIR_SetLocalizedStringPref
|
|||
{
|
||||
// Default branch has a value
|
||||
nsString data;
|
||||
locStr->GetData(getter_Copies(data));
|
||||
locStr->GetData(data);
|
||||
|
||||
if (newValue != data)
|
||||
// If the vales aren't the same, set the data on the main pref branch
|
||||
|
|
|
@ -242,7 +242,7 @@ nsMsgSearchAdapter::GetSearchCharsets(nsAString &srcCharset, nsAString &dstChars
|
|||
rv = prefs->GetComplexValue("mailnews.view_default_charset", NS_GET_IID(nsIPrefLocalizedString),
|
||||
getter_AddRefs(localizedstr));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
localizedstr->GetData(getter_Copies(m_defaultCharset));
|
||||
localizedstr->GetData(m_defaultCharset);
|
||||
|
||||
prefs->GetBoolPref("mailnews.force_ascii_search", &forceAsciiSearch);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче