Verified Commit 8d88a824 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

kstyle: Fix class name to fix indeterminate progress bars animations

The Breeze implementation is older than qqc2-desktop-style framework,
and historically it used to use different base class. Times has
changed, along with base classes; but Breeze code did not -- instead
the problem was workarounded on a org.kde.desktop side first with a
dummy Timer that called updateItem(), then through more sophisticated
QtQuick Animations types (which delivered smoother results thanks to
being bound to refresh rate of a screen).

While this patch fixes the problem, it seems like a better solution
should be possible or more cleanup opportunities are available:

1. no other breeze animations invoke methods through QMetaObject system;
2. why and how an object would be something other than KQuickStyleItem?
parent 47149bc2
Pipeline #222717 passed with stage
in 2 minutes and 26 seconds
......@@ -108,8 +108,8 @@ void BusyIndicatorEngine::setValue(int value)
animated = true;
// emit update signal on object
if (const_cast<QObject *>(iter.key())->inherits("QQuickStyleItem")) {
// QtQuickControls "rerender" method is updateItem
if (const_cast<QObject *>(iter.key())->inherits("KQuickStyleItem")) {
// KQuickStyleItem "rerender" method is updateItem
QMetaObject::invokeMethod(const_cast<QObject *>(iter.key()), "updateItem", Qt::QueuedConnection);
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment