From eab4dc6ed471196f83a291603463ef0594db09ea Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Sun, 29 Nov 2009 22:11:49 +0000 Subject: [PATCH] fix the build (constness error) by implementing a suggestion from comments svn path=/trunk/KDE/kdebase/workspace/; revision=1056343 --- options.cpp | 11 ++++------- options.h | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/options.cpp b/options.cpp index 8aeb338d3f..f408aee808 100644 --- a/options.cpp +++ b/options.cpp @@ -217,21 +217,18 @@ unsigned long Options::updateSettings() // KDE4 this probably needs to be done manually in clients // Driver-specific config detection - // TODO: this is now a bit cumbersome. - // reloadCompositingSettings isn't use anywhere else, so the prefs should be allocated there - // and not passed as value - CompositingPrefs prefs; - reloadCompositingSettings( prefs ); + reloadCompositingSettings(); return changed; } -void Options::reloadCompositingSettings(const CompositingPrefs& prefs) +void Options::reloadCompositingSettings() { KSharedConfig::Ptr _config = KGlobal::config(); KConfigGroup config(_config, "Compositing"); // Compositing settings + CompositingPrefs prefs; useCompositing = config.readEntry("Enabled", true); if (useCompositing) { @@ -240,7 +237,7 @@ void Options::reloadCompositingSettings(const CompositingPrefs& prefs) } if (!useCompositing) return; - + QString compositingBackend = config.readEntry("Backend", "OpenGL"); if( compositingBackend == "XRender" ) compositingMode = XRenderCompositing; diff --git a/options.h b/options.h index badd8a2ba3..9c4ad78ab0 100644 --- a/options.h +++ b/options.h @@ -391,7 +391,7 @@ class Options : public KDecorationOptions int animationSpeed; // 0 - instant, 5 - very slow MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta ); - void reloadCompositingSettings(const CompositingPrefs& prefs); + void reloadCompositingSettings(); }; extern Options* options;