From da37b1f16daefe819e818d375834567f87848b78 Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Wed, 2 Sep 2009 02:30:22 +0000 Subject: [PATCH] Don't const effect proxies. svn path=/trunk/KDE/kdebase/workspace/; revision=1018656 --- effects.cpp | 2 +- effects.h | 2 +- effects/desktopgrid/desktopgrid.cpp | 4 ++-- effects/presentwindows/presentwindows.cpp | 2 +- effects/presentwindows/presentwindows.h | 2 +- lib/kwineffects.cpp | 2 +- lib/kwineffects.h | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/effects.cpp b/effects.cpp index 9b5653df90..78b1eb8d11 100644 --- a/effects.cpp +++ b/effects.cpp @@ -347,7 +347,7 @@ void EffectsHandlerImpl::grabbedKeyboardEvent( QKeyEvent* e ) keyboard_grab_effect->grabbedKeyboardEvent( e ); } -const void* EffectsHandlerImpl::getProxy( QString name ) +void* EffectsHandlerImpl::getProxy( QString name ) { // All effects start with "kwin4_effect_", prepend it to the name name.prepend( "kwin4_effect_" ); diff --git a/effects.h b/effects.h index 3b611f1d40..e588555e91 100644 --- a/effects.h +++ b/effects.h @@ -83,7 +83,7 @@ class EffectsHandlerImpl : public EffectsHandler virtual QPoint cursorPos() const; virtual bool grabKeyboard( Effect* effect ); virtual void ungrabKeyboard(); - virtual const void* getProxy( QString name ); + virtual void* getProxy( QString name ); virtual void startMousePolling(); virtual void stopMousePolling(); virtual EffectWindow* findWindow( WId id ) const; diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 886a709fd5..c83e3962d8 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -776,8 +776,8 @@ void DesktopGridEffect::setActive( bool active ) return; // Already in that state // Example proxy code, TODO: Use or remove - //const PresentWindowsEffectProxy* proxy = - // static_cast( effects->getProxy( "presentwindows" )); + //PresentWindowsEffectProxy* proxy = + // static_cast( effects->getProxy( "presentwindows" )); //if( proxy ) // kDebug() << "Retrieved PresentWindowsEffectProxy, is present windows activate?" // << proxy->isActive(); diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index 4dab835b5a..be8104ded5 100644 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -154,7 +154,7 @@ void PresentWindowsEffect::reconfigure( ReconfigureFlags ) m_rightButtonDesktop = (DesktopMouseAction)conf.readEntry( "RightButtonDesktop", (int)DesktopNoAction ); } -const void* PresentWindowsEffect::proxy() const +void* PresentWindowsEffect::proxy() { return &m_proxy; } diff --git a/effects/presentwindows/presentwindows.h b/effects/presentwindows/presentwindows.h index 125e87ab78..70ebbfe5b1 100644 --- a/effects/presentwindows/presentwindows.h +++ b/effects/presentwindows/presentwindows.h @@ -64,7 +64,7 @@ class PresentWindowsEffect virtual ~PresentWindowsEffect(); virtual void reconfigure( ReconfigureFlags ); - virtual const void* proxy() const; + virtual void* proxy(); // Screen painting virtual void prePaintScreen( ScreenPrePaintData &data, int time ); diff --git a/lib/kwineffects.cpp b/lib/kwineffects.cpp index e52dd2b185..0d02bd6e8e 100644 --- a/lib/kwineffects.cpp +++ b/lib/kwineffects.cpp @@ -114,7 +114,7 @@ void Effect::reconfigure( ReconfigureFlags ) { } -const void* Effect::proxy() const +void* Effect::proxy() { return NULL; } diff --git a/lib/kwineffects.h b/lib/kwineffects.h index df547a96cb..ad9aa97048 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -170,7 +170,7 @@ X-KDE-Library=kwin4_effect_cooleffect #define KWIN_EFFECT_API_MAKE_VERSION( major, minor ) (( major ) << 8 | ( minor )) #define KWIN_EFFECT_API_VERSION_MAJOR 0 -#define KWIN_EFFECT_API_VERSION_MINOR 102 +#define KWIN_EFFECT_API_VERSION_MINOR 103 #define KWIN_EFFECT_API_VERSION KWIN_EFFECT_API_MAKE_VERSION( \ KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR ) @@ -309,7 +309,7 @@ class KWIN_EXPORT Effect /** * Called when another effect requests the proxy for this effect. */ - virtual const void* proxy() const; + virtual void* proxy(); /** * Called before starting to paint the screen. @@ -541,7 +541,7 @@ class KWIN_EXPORT EffectsHandler * Retrieve the proxy class for an effect if it has one. Will return NULL if * the effect isn't loaded or doesn't have a proxy class. */ - virtual const void* getProxy( QString name ) = 0; + virtual void* getProxy( QString name ) = 0; // Mouse polling virtual void startMousePolling() = 0;