From koffice-devel Thu Jun 19 21:46:06 2008 From: Adriaan de Groot Date: Thu, 19 Jun 2008 21:46:06 +0000 To: koffice-devel Subject: Re: KOffice not compiling Message-Id: <200806192346.06484.groot () kde ! org> X-MARC-Message: https://marc.info/?l=koffice-devel&m=121391195003675 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============2115763580==" --===============2115763580== Content-Type: multipart/signed; boundary="nextPart1289478.WPRqgAvSKi"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1289478.WPRqgAvSKi Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 19 June 2008, Carlos Licea wrote: > El Thursday 19 June 2008 14:45:39 escribi=F3: > > Hi Carlos, > > > > The code you're working on in KPresenter > > (filters/kpresenter/kpr2odf/StylesFilterkpr2odf.cpp) doesn't compile, > > with the following error: > > > > line 333: Error: "Filterkpr2odf::createGradientStyle(const > > KoXmlElement&)" is expected to return a value. > > Actually I was concerned because I wasn't getting that error, I'm compili= ng > it right now without much trouble. Weird huh?. GCC is very relaxed like that, which is a bad thing. > > And I really can't tell what needs fixing here. Line 333 is clearly a > > missing return but I have no idea what the function might sensibly > > return. Some kind of m_styles.lookup(), but what? > > Yes a m_styles.lookup() is the right return, I'll try to fix it right now. Thank you. > > There were a bunch of other "happy constructor" pattern gcc-isms which I > > removed. > > What do you mean?, it's a explicit constructor so as far as I can tell > foo::foo is a right call, isn' it? > What's '"happy constructor" pattern gcc-isms' ? No. For a class foo, you call the constructor with foo(), not foo:foo(). Th= at=20 last one works in gcc but not in other compiles, and I call it the happy=20 constructor pattern because apparently you really like typing "foo" ;) I se= e=20 it in a lot of KOffice code. Also, foo v =3D foo() can be shortened to foo = v()=20 with no bad effects -- Andre Woebbeking pointed that out to me. The explicit keyword means that the constructor will not participate in any= =20 implicit type conversions, that's all. So if you have class foo { explicit foo(int); } void bar(const foo&); then you can't do bar(7); but you can do bar(foo(7)); If the explicit was *not* there in the declaration of foo's constructor, th= en=20 the compiler would find an implicit type conversion int -> foo for you.=20 Whether explicit is useful or not depends on context and the type of classe= s=20 being used -- see the EBN checks for explicitness for details. > > There are no API docs or much of an explanation in the code of what is > > going on; API documentation in particular is generally appreciated. It > > wouldn't have helped me here, since I *really* don't know what the code > > is supposed to do, but in other cases, or with other people looking at = it > > .. > > Nope, because I'm still working on the gradient, acually I think I docume= nt > too much, just not in that function... yet. OK, so I'm just looking in the wrong place by accident. Thanks for a quick response, BTW. [ade] =2D-=20 These are your friends - Adem GPG: FEA2 A3FE Adriaan de Groot --nextPart1289478.WPRqgAvSKi Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAkha054ACgkQoBcIkmyNJhLEXgCgkP17K+9HF5+24J/sHK7B6dvW y/UAoLm2MVG8wuyhLPj7bVDblUbu+2UX =LJ/5 -----END PGP SIGNATURE----- --nextPart1289478.WPRqgAvSKi-- --===============2115763580== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel --===============2115763580==--