Re: UString and locale conversion
- From: Dodji Seketeli <dodji seketeli org>
- To: Jonathon Jongsma <jonathon quotidian org>, nemiver list <nemiver-list gnome org>
- Subject: Re: UString and locale conversion
- Date: Sun, 19 Apr 2009 23:04:34 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jonathon Jongsma a écrit :
> Dodji Seketeli wrote:
>> Jonathon Jongsma a écrit :
>>
>>> OK, I've made these changes. Do you have any reservations about me
>>> pushing this now?
>>
>> Sorry, I can't see the new changes in your repo ? Am I missing
>> something ?
>>
>> Thanks,
>>
>> D.
>
> sorry, I never pushed it. I only had it in the local repository.
> should be pushed now.
> --- a/src/dbgengine/nmv-i-debugger.h
> +++ b/src/dbgengine/nmv-i-debugger.h
> @@ -335,7 +335,7 @@ public:
>
> const UString& type () const {return m_type;}
> void type (const UString &a_type) {m_type = a_type;}
> - void type (const string &a_type) {m_type = a_type;}
> + void type (const string &a_type) {m_type = UString(a_type);}
Is there any reason why we still have this change, now that that the conversion
constructor of UString (that converts from std::string) is not explicit anymore ?
The same applies to the following hunks:
> diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
> index 2089ff1..864fbe9 100644
> --- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
> +++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
> @@ -1005,9 +1005,9 @@ struct DBGPerspective::Priv {
> LOG_DD ("trying to convert buffer from encoding "
> << it->c_str ()
> << " to UTF-8");
> - utf8_content = Glib::convert (a_input,
> - "UTF-8",
> - it->c_str ());
> + utf8_content =
> + UString (Glib::convert (a_input, "UTF-8",
> + it->c_str ()));
> } catch (Glib::Exception &e) {
> LOG_DD ("tentative encoding conversion failed!");
> continue;
> @@ -1025,9 +1025,10 @@ struct DBGPerspective::Priv {
> LOG_DD ("trying hardcoded encodings");
> for (unsigned int i=0; i < SIZE_OF_SUPPORTED_ENCODINGS; i++) {
> try {
> - utf8_content = Glib::convert (a_input,
> - "UTF-8",
> - SUPPORTED_ENCODINGS[i]);
> + utf8_content =
> + UString (Glib::convert (a_input,
> + "UTF-8",
> + SUPPORTED_ENCODINGS[i]));
[snip]
> @@ -5916,10 +5919,10 @@ DBGPerspective::call_function (const UString &a_call_expr)
> // saying that we are calling a_call_expr
> std::stringstream s;
> s << "<Nemiver call_function>"
> - << a_call_expr
> + << a_call_expr.raw ()
> << "</Nemiver>"
> << "\n\r";
> - get_terminal ().feed (s.str ());
> + get_terminal ().feed (UString (s.str ()));
>
If these are just leftover from your last changes, I am okay to push this to
master but with the UString function-style casts removed, please.
Thanks for the patch.
D.
- --
Tant que l'on n'a pas la tête coupée, on peut espérer mettre un chapeau.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org
iEYEARECAAYFAknrkeIACgkQPejI7lrem2EGUwCfdXmheteJ0+bXs7Qf77LwaJYF
p9gAnixyzzPY74AMpDo16vLdoA+fCint
=FOWU
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]