diff --git a/kcmkwin/kwindecoration/preview.cpp b/kcmkwin/kwindecoration/preview.cpp index 04a91dd967..13aa005127 100644 --- a/kcmkwin/kwindecoration/preview.cpp +++ b/kcmkwin/kwindecoration/preview.cpp @@ -118,13 +118,11 @@ void KDecorationPreview::render(QPainter *painter, KDecoration *decoration, cons int padLeft, padRight, padTop, padBottom; padLeft = padRight = padTop = padBottom = 0; bool useMask = true; - if (KDecorationUnstable *unstable = qobject_cast(decoration)) { - unstable->padding(padLeft, padRight, padTop, padBottom); - size.setWidth(size.width() + padLeft + padRight); - size.setHeight(size.height() + padTop + padBottom); - if (padLeft || padRight || padTop || padBottom) { - useMask = false; - } + decoration->padding(padLeft, padRight, padTop, padBottom); + size.setWidth(size.width() + padLeft + padRight); + size.setHeight(size.height() + padTop + padBottom); + if (padLeft || padRight || padTop || padBottom) { + useMask = false; } decoration->resize(size); @@ -479,11 +477,10 @@ KDecorationPreviewOptions::~KDecorationPreviewOptions() { } -unsigned long KDecorationPreviewOptions::updateSettings() +void KDecorationPreviewOptions::updateSettings() { KConfig cfg("kwinrc"); - unsigned long changed = 0; - changed |= KDecorationOptions::updateSettings(&cfg); + KDecorationOptions::updateSettings(&cfg); // set custom border size/buttons if (customBorderSize != BordersCount) @@ -499,8 +496,6 @@ unsigned long KDecorationPreviewOptions::updateSettings() setTitleButtonsLeft(KDecorationOptions::defaultTitleButtonsLeft()); setTitleButtonsRight(KDecorationOptions::defaultTitleButtonsRight()); } - - return changed; } void KDecorationPreviewOptions::setCustomBorderSize(BorderSize size) diff --git a/kcmkwin/kwindecoration/preview.h b/kcmkwin/kwindecoration/preview.h index 6e322d44e7..0a5c734b3b 100644 --- a/kcmkwin/kwindecoration/preview.h +++ b/kcmkwin/kwindecoration/preview.h @@ -60,7 +60,7 @@ private: }; class KDecorationPreviewBridge - : public KDecorationBridgeUnstable + : public KDecorationBridge { public: KDecorationPreviewBridge(KDecorationPreview* preview, bool active); @@ -139,7 +139,7 @@ class KDecorationPreviewOptions public: KDecorationPreviewOptions(); virtual ~KDecorationPreviewOptions(); - virtual unsigned long updateSettings(); + void updateSettings(); void setCustomBorderSize(BorderSize size); void setCustomTitleButtonsEnabled(bool enabled);