From f11a5ad36f0888ea177dc0793182a921a65437c8 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Mon, 16 Nov 2009 16:11:45 +0000 Subject: [PATCH] added Q_DECLARE_OPERATORS_FOR_FLAGS for AnimationTypes and simplified calls to enum in OxygenClient accordingly svn path=/trunk/KDE/kdebase/workspace/; revision=1050095 --- clients/oxygen/oxygenclient.cpp | 10 +++++----- clients/oxygen/oxygenclientgroupitemdata.h | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index a78d63bd5b..3a20005dd2 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -1529,7 +1529,7 @@ namespace Oxygen QPoint position( event->pos() ); int itemClicked( OxygenClient::itemClicked( position, false ) ); - itemData_.animate( AnimationTypes( AnimationEnter|AnimationSameTarget ), itemClicked ); + itemData_.animate( AnimationEnter|AnimationSameTarget, itemClicked ); } @@ -1545,7 +1545,7 @@ namespace Oxygen { if( dragStartTimer_.isActive() ) dragStartTimer_.stop(); - itemData_.animate( AnimationTypes(AnimationLeave|AnimationSameTarget), sourceItem_ ); + itemData_.animate( AnimationLeave|AnimationSameTarget, sourceItem_ ); } else if( itemData_.animated() ) { @@ -1577,7 +1577,7 @@ namespace Oxygen QPoint position( event->pos() ); int itemClicked( OxygenClient::itemClicked( position, false ) ); - itemData_.animate( AnimationTypes( AnimationMove|AnimationSameTarget ), itemClicked ); + itemData_.animate( AnimationMove|AnimationSameTarget, itemClicked ); } @@ -1637,8 +1637,8 @@ namespace Oxygen // do nothing if there is only one tab if( itemData_.count() > 1 ) { - itemData_.animate( AnimationTypes( AnimationMove|AnimationSameTarget ), sourceItem_ ); - itemData_.animate( AnimationTypes( AnimationLeave|AnimationSameTarget ), sourceItem_ ); + itemData_.animate( AnimationMove|AnimationSameTarget, sourceItem_ ); + itemData_.animate( AnimationLeave|AnimationSameTarget, sourceItem_ ); } } diff --git a/clients/oxygen/oxygenclientgroupitemdata.h b/clients/oxygen/oxygenclientgroupitemdata.h index c47ca948ca..6ac3182dc6 100644 --- a/clients/oxygen/oxygenclientgroupitemdata.h +++ b/clients/oxygen/oxygenclientgroupitemdata.h @@ -196,6 +196,8 @@ namespace Oxygen }; + Q_DECLARE_OPERATORS_FOR_FLAGS(Oxygen::AnimationTypes) + } #endif