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

List:       kde-devel
Subject:    Re: porting from kde 1.x to 3.x
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-07-30 23:07:01
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 31 July 2002 00:39, David Bishop wrote:
> void MainDialog::ReadStderr(KProcess *, char *buffer, int buflen)
> {
> 
>     QString s = QString::fromLocal8Bit( buffer, buflen );
>     QStringList errors = QStringList::split( "\n", s );
> 
>     if ( m_str.isEmpty() == false ) {
!m_str.isEmpty() is easier to read.

>       errors.first.prepend(m_str);
first(), not first.
And probably -> after it, so first()->prepend

>       m_str = "";
m_str = QString::null, faster

> You can probably see the problem right off the bat.  Well, the compiler
> did ;-)  I can't just do "errors.first.prepend" (overloaded not supported by
> dump_expr?).  Do I need to peel the first off into another string, prepend
> m_str, and push it back on the front?  That seems akward...  Or am I
> confusing my languages again, and should be using ->, or ::, or %^#<, :-P
The latter ;)

- -- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice 1.2 RC1 is slightly delayed. Stay tuned.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9RxwV72KcVAmwbhARAn01AJ4nLGxoUKvWks4PEP1UwZCH88soGgCaA0KC
zLscpCu4iUdUj04RijrNHsc=
=m8Ez
-----END PGP SIGNATURE-----

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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