Fwd: [fr-cvs] mghie/src/metadata server.cpp,1.16,1.17

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: [fr-cvs] mghie/src/metadata server.cpp,1.16,1.17

Nando Dessena
Michael,

*** 90,96 ****
          extra_params << "PAGE_SIZE " << pagesize << " ";
 
!     wxString charset = db->getConnectionCharset();
      if (!charset.empty())
!         extra_params << "DEFAULT CHARACTER SET " << charset << " ";
 
      IBPP::Database db1;
--- 90,97 ----
          extra_params << "PAGE_SIZE " << pagesize << " ";
 
!     wxString charset(db->getConnectionCharset());
!     // mghie: wxString does not play nice with ostringstream
      if (!charset.empty())
!         extra_params << "DEFAULT CHARACTER SET " << wx2std(charset) << " ";
 
      IBPP::Database db1;

I have fixed hundreds of those, no need to add a comment. ;-)

BTW, Milan brought to my attention that wxString has a handy <<
operator, so we can basically use wxString itself instead of
ostringstream in most cases. The drawback is that you need to wrap
literals with wxT() , but I guess we're used to it by now.

Ciao
--
Nando Dessena
http://www.flamerobin.org



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [fr-cvs] mghie/src/metadata server.cpp,1.16,1.17

Michael Hieke-2
Nando,

Nando Dessena wrote:

> I have fixed hundreds of those, no need to add a comment. ;-)

sorry, but I searched for 15 minutes why creating a database did no
longer work, so I added the comment.  It's removed now, anyway.

> BTW, Milan brought to my attention that wxString has a handy <<
> operator, so we can basically use wxString itself instead of
> ostringstream in most cases. The drawback is that you need to wrap
> literals with wxT() , but I guess we're used to it by now.

thanks for that hint, I have changed server.cpp and one occurence in
metadataitem.cpp accordingly.  There are other places where
std::ostringstream is used, but I didn't touch those, because wxString
has no matching operator << for int64_t or wxLongLong, and precision and
format can only be set using Printf().

Thanks

--
Michael Hieke


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel