Skip to content

ImageColors: Fix errors, improve typing, and rework the example app

ivan tkachenko requested to merge work/ratijas/drop-versions into master

Fix multi-threading crash

Was crashy because of a fearless^W insane concurrent access to QImage by a bare reference. The method that runs in the background absolutely doesn't need and shouldn't use a pointer to this, so was ported to static.

Port QVariantList to a typed and named gadget

The test case didn't need to create a Window component, so it got ported to a simpler Item, reducing the need for the window activation and visibility shenanigans.

Do not grab an item without a window or with an invisible window

Prevents warnings and errors.

Mark internal function as static

Disconnect the old QFutureWatcher

QFuture created by QtConcurrent::run does not even support cancellation, but it will finish and execute the connected lambda if not disconnected.

Rework the example app

Before:
Before

After:
After - Open Image After - Unsplash

Edited by ivan tkachenko

Merge request reports

Loading