[Development] QHelpEngineCore::documentsForIdentifier

Samuel Gaist samuel.gaist at idiap.ch
Fri Aug 28 08:38:45 CEST 2020


> On 27 Aug 2020, at 19:07, Edward Welbourne <edward.welbourne at qt.io> wrote:
> Martin Koller (14 August 2020 17:06) wrote:
>> I found myself getting an empty list when using
>> QHelpEngineCore::documentsForIdentifier(id) but getting 1 element when
>> using the deprecated QHelpEngineCore::linksForIdentifier(id).
> Definitely sounds like a bug, although I find no
> QHelpEngineCore::linksForIdentifier() - did you mean
> QHelpCollectionHandler::linksForIdentifier() ?
>> Checking the code I stumbled over something which I believe is a bug:
>> QHelpEngineCore::documentsForIdentifier(const QString &id, const
>> QString &filterName) does
>> if (!d->setup() || !d->usesFilterEngine)
>>        return QList<QHelpLink>();
>> so it checks if the new filter engine is active, but I think this is
>> not needed here, since in this code, the filter engine is not used at
>> all, since the filterName is already given as argument.
> Sounds plausible.
> Also, QHelpEngineCore::documentsForIdentifier(const QString &id) calls
> documentsForIdentifier(const QString &id, const QString &filterName)
> passing a filterName that it determines based on d->usesFilterEngine,
> which rather suggests it thinks d->usesFilterEngine isn't a prerequisite
> of getting any entries.
>> Since I ported older code to the new api but did not call
>> setUsesFilterEngine(true) (which I believe should not be needed when I
>> don't work with filters), this check was hit and I get no results.
>> Am I right ?
> I don't know this code at all but it sounds like reasonable grounds to
> submit a patch to Gerrit and ask for review by folk implicated in the
> review that added this code (this March):
> https://codereview.qt-project.org/c/qt/qttools/+/291144
> 	Eddy.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development

You need to enable the new filter engine using:


The documentation has been modified for the next release to make it clearer.

Samuel Gaist

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200828/b89ae265/attachment.sig>

More information about the Development mailing list