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?
wilder
ivan tkachenko 4 years ago
parent 47149bc2ed
commit 8d88a82414
No known key found for this signature in database
GPG Key ID: AF72731B7C654CB3
  1. 4
      kstyle/animations/breezebusyindicatorengine.cpp

@ -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 {

Loading…
Cancel
Save