D5002: [oxygen/kstyle] Fix build

2017-03-27 Thread Hugo Pereira Da Costa
hpereiradacosta added inline comments.

INLINE COMMENTS

> oxygenanimations.cpp:178
>  // unregister all toolbuttons that belong to a toolbar
> -foreach( QWidget* widget, 
> _widgetStateEngine->registeredWidgets( AnimationHover|AnimationFocus ) )
> +foreach( QWidget* widget, 
> _widgetStateEngine->registeredWidgets( AnimationMode( 
> AnimationHover|AnimationFocus ) ) )
>  {

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 ?

REPOSITORY
  R113 Oxygen Theme

REVISION DETAIL
  https://phabricator.kde.org/D5002

To: cfeck, hpereiradacosta
Cc: plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol


D5002: [oxygen/kstyle] Fix build

2017-03-10 Thread Hugo Pereira Da Costa
hpereiradacosta added a comment.


  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 ?

REPOSITORY
  R113 Oxygen Theme

REVISION DETAIL
  https://phabricator.kde.org/D5002

To: cfeck, hpereiradacosta
Cc: plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol


D5002: [oxygen/kstyle] Fix build

2017-03-10 Thread Christoph Feck
cfeck created this revision.
cfeck added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION 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.

REPOSITORY
  R113 Oxygen Theme

REVISION DETAIL
  https://phabricator.kde.org/D5002

AFFECTED FILES
  kstyle/animations/oxygenanimations.cpp
  kstyle/oxygenstylehelper.cpp

To: cfeck, hpereiradacosta
Cc: plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol