[oxygen/kstyle] Fix build
AbandonedPublic

Authored by cfeck on Mar 10 2017, 1:16 PM.

Details

Reviewers
hpereiradacosta
Summary

Not sure if the stricter error checking is from gcc, cmake, or Qt, but on my system with recent versions, I get compile errors, because 'int' cannot be promoted to 'enum' automatically.

Test Plan

Only compilation against Qt5 tested.

Diff Detail

Repository
R113 Oxygen Theme
Lint
Lint Skipped
Unit
Unit Tests Skipped
cfeck created this revision.Mar 10 2017, 1:16 PM
Restricted Application added a subscriber: plasma-devel. ยท View Herald TranscriptMar 10 2017, 1:16 PM

I'm ok with the patch
However it all feel quite cumbersome
I wonder if we could not introduce an animationHoverOrFocus enumeration defined as the or of the other two directly in the flags would make things nicer. What do you think ?

kstyle/animations/oxygenanimations.cpp
178

Looking further into the patch I get more confused.
The argument taken by the Oxygen::WidgetStateEngine::registerWidget() (or registeredWidgets() is "Oxygen::AnimationModes" (with an "s"), and not "AnimationMode"
The latter is defined via the macros Q_DECLARE_FLAGS(AnimationModes, AnimationMode)
and
Q_DECLARE_OPERATORS_FOR_FLAGS( Oxygen::AnimationModes );

My understanding was that this would allow AnimationsModes to be bitwise or (or and, or any operator) of the AnimationMode enum.
Maybe these macros are now broken.
In any case, at the minimum the correct syntax should be "AnimationModes(AnimationHover|AnimationFocus). Right ?

cfeck abandoned this revision.Aug 15 2018, 3:24 PM