LocatorFilterEntry: Discourage the use of internalData

Drop internalData from c'tor. The internalData is going to be
removed, soon. Drop also the icon arg from c'tor since
LocatorFilterEntry instances are usually created in non-main
thread, while operating on QIcon instances isn't really safe
in non-main thread. The use of QIcon inside this struct is
a subject to change in the future, in a way like it was done
in other parts of code that generated icons from non-main thread.

Change-Id: Ic6aa719a64e5fbd65883c54149796057c632780e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2023-03-21 00:07:22 +01:00
parent 79c8e60a22
commit a22e3acf28
12 changed files with 49 additions and 31 deletions

View File

@@ -50,7 +50,8 @@ QList<Core::LocatorFilterEntry> MacroLocatorFilter::matchesFor(QFutureInterface<
}
if (index >= 0) {
Core::LocatorFilterEntry filterEntry(this, displayName, {}, m_icon);
Core::LocatorFilterEntry filterEntry(this, displayName);
filterEntry.displayIcon = m_icon;
filterEntry.extraInfo = description;
filterEntry.highlightInfo = Core::LocatorFilterEntry::HighlightInfo(index, entry.length(), hDataType);