Fix Qt6 nodiscard warnings for QtConcurrent::run
- Add (void) cast to QtConcurrent::run calls in base_symbol_model.cpp - Suppresses Qt6 nodiscard warnings for unused QFuture return values - Applies to 3 locations where QFuture is used for async callback pattern Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
124fbb4de8
commit
97a2afb81d
2 files changed
+4941
-3
No files matched your search
+3
-3
@@ -228,7 +228,7 @@ QImage BaseSymbolItem::getSearchSwatch()
|
||||
m_esriSearch.m_swatchFuture = m_esriSearch.m_esriSymbol->createSwatchAsync(SWATCH_SIZE, SWATCH_SIZE, 1);
|
||||
|
||||
// Use QtConcurrent to handle completion
|
||||
QtConcurrent::run([this, future = m_esriSearch.m_swatchFuture]() mutable {
|
||||
(void)QtConcurrent::run([this, future = m_esriSearch.m_swatchFuture]() mutable {
|
||||
future.waitForFinished();
|
||||
if (future.isFinished() && !future.isCanceled()) {
|
||||
QImage image = future.result();
|
||||
@@ -276,7 +276,7 @@ QImage BaseSymbolItem::getFetchSwatch()
|
||||
// Qt6: Use QFuture pattern instead of signals
|
||||
m_esriFetch.m_symbolFuture = m_esriDictionary->fetchSymbolAsync(keys, this);
|
||||
|
||||
QtConcurrent::run([this, future = m_esriFetch.m_symbolFuture]() mutable {
|
||||
(void)QtConcurrent::run([this, future = m_esriFetch.m_symbolFuture]() mutable {
|
||||
future.waitForFinished();
|
||||
if (future.isFinished() && !future.isCanceled()) {
|
||||
Esri::ArcGISRuntime::Symbol *symbol = future.result();
|
||||
@@ -298,7 +298,7 @@ void BaseSymbolItem::onEsriFetchCompleted(Esri::ArcGISRuntime::Symbol *symbol)
|
||||
// Qt6: Use QFuture pattern instead of signals
|
||||
m_esriFetch.m_swatchFuture = m_esriFetch.m_esriSymbol->createSwatchAsync(SWATCH_SIZE, SWATCH_SIZE, 1);
|
||||
|
||||
QtConcurrent::run([this, future = m_esriFetch.m_swatchFuture]() mutable {
|
||||
(void)QtConcurrent::run([this, future = m_esriFetch.m_swatchFuture]() mutable {
|
||||
future.waitForFinished();
|
||||
if (future.isFinished() && !future.isCanceled()) {
|
||||
QImage image = future.result();
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user