KFilterDev weirdness : docs and code not the same
David Faure
dfaure at klaralvdalens-datakonsult.se
Mon Oct 27 10:10:23 GMT 2003
On Sunday 26 October 2003 21:11, LuĂs Pedro Coelho wrote:
> 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
Yes.
> 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".
OUCH. You're right.
I'll fix the code, and check all the code using it.
--
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
More information about the kde-core-devel
mailing list