Details
-
User Story
-
Resolution: Duplicate
-
P2: Important
-
None
-
None
-
None
Description
Currently there are the following methods in the public API of QHelpEngineCore:
QMap<QString, QUrl> linksForIdentifier(const QString &id) const;
QMap<QString, QUrl> linksForIdentifier(const QString &id, const QString &filterName) const;
QMap<QString, QUrl> linksForKeyword(const QString &keyword) const;
QMap<QString, QUrl> linksForKeyword(const QString &keyword, const QString &filterName) const;
In general they may return multi maps. After the recent deprecation, we should adapt this API. Possible solutions:
1. Return QMultiMap<QString, QUrl> instead.
2. Return QMap<QString, QList<QUrl>> instead.
3. We could possibly return other structures, like QHash<QUrl, QString> or list of pairs, however the result is usually used for displaying search results, so having them already sorted by title is an advantage.
Looks like the option 1 is the preferred one. However, we cannot provide an overload in Qt 5.15 which would differ only in return type. The solution would be to provide new methods with new names for them in Qt 5.15 and deprecate the above methods there.
I'm rather reluctant to do the hack like in QCursor::bitmap() case, since it doesn't really provide a substitution in 5.15 (the substitution is very artificial IMO, and would require people to change their code twice).
Other options?
Attachments
Issue Links
- duplicates
-
QTBUG-82334 Refactor QtHelp API according to deprecation of QMap as a multi map
- Closed