KFilterDev weirdness : docs and code not the same
Luís Pedro Coelho
luis at luispedro.org
Sun Oct 26 20:11:34 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi everyone,
Here is from kdelibs/kio/kio/kfilterdev.h:
- -----------------------------------------
* @param forceFilter if true, the function will
* always return a QIODevice. If no
* filter is available it will return a simple QFile.
* This can be useful if the file is
* usable without a filter.
* If false, the function returns 0
* if no filter is available
[....]
QIODevice * KFilterDev::deviceForFile( ... )
- --------------------------------------------
Here is the implementation:
- ----------------------------------------
QIODevice * KFilterDev::deviceForFile( const QString & fileName,
const QString & mimetype, bool forceFilter )
{
/// ...................
if (!forceFilter)
return f;
else
{
delete f;
return 0L;
}
- -------------------------------------
Is it just me or will the code return 0L only if forceFilter is true? This
contradicts the documentation. I think that that "!forceFilter" should
probably read "forceFilter".
Or did I take too much medication today?
regards,
- --
Luis Pedro Coelho
On user interfaces and languages, see:
http://luispedro.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE/nCqAGpBAvyRwXdgRAsEqAJ0aKqoA5LC1+VQQA3xom0hb32Wk+ACgj40/
sZ5coHK9K2JgGy/dgdMlcns=
=sMPU
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list