On Tuesday 09 September 2008, Chris Cannam wrote:

> On Tue, Sep 9, 2008 at 4:01 PM, Emanuel Rumpf <[EMAIL PROTECTED]> wrote:
> > today, filesystems use utf8 too
>
> Yes, but not all of them.  The local 8-bit encoding is not always
> going to be utf-8.

Including here, for instance.  I never converted my /home filesystem to UTF-8.

> > Now ... .toStdString() does not work here.
> > ("error: 'const class QString' has no member named 'toStdString'")
>
> It's a pity, because toStdString is the obvious best function for many
> situations and I use it in all my other Qt4 code.  I've never had a
> problem with it in the past (and fwiw, I use the Ubuntu packaged Qt4
> normally).  However, if it doesn't work for you and it isn't obvious
> to you why not, then I guess it won't be obvious to other people
> either, so perhaps we should avoid it.

Here's the relevant part of the header, in QtCore/qstring.h:

#ifndef QT_NO_STL
    static inline QString fromStdString(const std::string &s);
    inline std::string toStdString() const;
# ifdef qdoc
    static inline QString fromStdWString(const std::wstring &s);
    inline std::wstring toStdWString() const;
# else
#  ifndef QT_NO_STL_WCHAR
    static inline QString fromStdWString(const QStdWString &s);
    inline QStdWString toStdWString() const;
#  endif // QT_NO_STL_WCHAR
# endif // qdoc
#endif

So it looks to me like he's on track with the idea that compiling with STL 
support should enable that code.

It's a mystery.  I guess he could watch QT compile and see if there's 
a -DQT_NO_STL in there in spite of what he thought he told his build system.


As far as this whole discussion, I don't even really understand what any of 
this is about.  I haven't studied the issue.  All I can say is that when it 
comes to whose opinion I trust the most, you and I have worked together for 
almost 10 years, Chris, and my default state is to agree with you unless I 
have a reason to do otherwise, which I don't in this case.  If you feel 
strongly about this toStdString() thing, then it's definitely worth the 
trouble of figuring out why it isn't working for Emanuel, if at all possible.
-- 
D. Michael McIntyre 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to