From: Rusty B. <ho...@sb...> - 2003-09-05 07:18:53
|
> Regarding API changes, one thing which occurred to me is that where I > was turning this: > > QString getSomeString(); > > into this: > > #if FUN_API_QSTRING > void getSomeString(QString &); > #endif > #if FUN_API_STD_STRING > void getSomeString(std::string &); > #endif > > that's not really necessary; I could make it > > #if FUN_API_QSTRING > QString getSomeString(); > #endif > #if FUN_API_STD_STRING > void getSomeString(std::string &); > #endif > > which is a little better because it doesn't affect the QString > version. So I think I'll go back & do that in ClassLoader, and > *then* it'll be ready for qub. No, that's a stupid idea; it means if you want to switch between QString and std::string in your code, there's one more place you have to make changes. On my first pass at updating QUB with the API changes, I wished I'd changed this: QString getSomeString(); into this: #if FUN_API_QSTRING QString getSomeString(QString &); #endif #if FUN_API_STD_STRING std::string getSomeString(std::string &); #endif because then code which used to be this: QString myString =3D getSomeString(); can change to this: QString myString =3D getSomeString(QString()); instead of this: QString myString; getSomeString(myString); So I *will* make that API change in ClassLoader (there are only 2 or 3 places), "and *then* it'll be ready for qub." --Rusty |