[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KUnitTest CVS
From:       Jeroen Wijnhout <Jeroen.Wijnhout () kdemail ! net>
Date:       2005-05-05 12:08:46
Message-ID: 200505051408.46676.Jeroen.Wijnhout () kdemail ! net
[Download RAW message or body]

On Wednesday 04 May 2005 12:01 am, Duncan Mac-Vicar P. wrote:
> even further, I think QObject::setName receives a const char* so after
> concatenating the strings using QString::fromLatin1 you probably will have
> to use latin1() again to pass it to setname.

Exactly, but I've fixed it now.

thanks,
Jeroen

> On Tuesday 03 May 2005 17:58, Duncan Mac-Vicar P. wrote:
> > There are some issues with QT_NOASCII_CAST (used in Kopete)
> >
> > static const QString s_kunittest_suite = "Suite"
> >
> > and then when calling a function, you mix const char * and QStrings...
> >
> > test->setName(s_kunittest_suite + "::" + "KopeteLinkTest")
> >
> > This will not compile with QT_NOASCII_CAST, You will get errors like:
> > error: cannot convert `const QString' to `const char*' for argument `1'
> > to `void kunittest_registerModuleTester(const char*, KUnitTest::Tester*)'
> > - you should explicitly do the conversion.
> > test->setName(s_kunittest_suite + "::" + QString::fromLatin1
> > ("KopeteLinkTest")) in this case. I would fix it myself but CVS is
> > readonly today and your code is still not in cvs/svn.
> >
> > We had similar problems with Ian's widget compiler, which are fixed.
> > Everyone generating code from macros and compilers please take
> > QT_NOASCII_CAST in count ;-)
> >
> > Cheers
> > Duncan

-- 
Kile - an Integrated LaTeX Environment for KDE
http://kile.sourceforge.net
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic