diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2023-03-21 00:07:22 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2023-04-05 05:33:57 +0000 |
commit | a22e3acf2841632bcca5fccdbb7718543deb5079 (patch) | |
tree | c90d21c7739d5c7cdffdfc22fbffc2db25193d32 /src/plugins/texteditor | |
parent | 79c8e60a220b998cac3e60a50d0c5e2cd92e03be (diff) | |
download | qt-creator-a22e3acf2841632bcca5fccdbb7718543deb5079.tar.gz |
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>
Diffstat (limited to 'src/plugins/texteditor')
-rw-r--r-- | src/plugins/texteditor/linenumberfilter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/texteditor/linenumberfilter.cpp b/src/plugins/texteditor/linenumberfilter.cpp index 78a65c84d2..83f0adaf92 100644 --- a/src/plugins/texteditor/linenumberfilter.cpp +++ b/src/plugins/texteditor/linenumberfilter.cpp @@ -64,7 +64,9 @@ QList<LocatorFilterEntry> LineNumberFilter::matchesFor(QFutureInterface<LocatorF text = Tr::tr("Line %1").arg(line); else text = Tr::tr("Column %1").arg(column); - value.append(LocatorFilterEntry(this, text, QVariant::fromValue(data))); + LocatorFilterEntry entry(this, text); + entry.internalData = QVariant::fromValue(data); + value.append(entry); } return value; } |