diff --git a/lib/kdecoration.cpp b/lib/kdecoration.cpp index 38b45a79f1..c791db4645 100644 --- a/lib/kdecoration.cpp +++ b/lib/kdecoration.cpp @@ -378,12 +378,12 @@ KDecorationOptions::~KDecorationOptions() KDecoration::options_ = NULL; } -const QColor& KDecorationOptions::color(ColorType type, bool active) const +QColor KDecorationOptions::color(ColorType type, bool active) const { return(d->colors[type + (active ? 0 : NUM_COLORS)]); } -const QFont& KDecorationOptions::font(bool active, bool small) const +QFont KDecorationOptions::font(bool active, bool small) const { if ( small ) return(active ? d->activeFontSmall : d->inactiveFontSmall); @@ -391,7 +391,7 @@ const QFont& KDecorationOptions::font(bool active, bool small) const return(active ? d->activeFont : d->inactiveFont); } -const QPalette& KDecorationOptions::palette(ColorType type, bool active) const +QPalette KDecorationOptions::palette(ColorType type, bool active) const { int idx = type + (active ? 0 : NUM_COLORS); if(d->pal[idx]) diff --git a/lib/kdecoration.h b/lib/kdecoration.h index 6f9811f647..9120ac9939 100644 --- a/lib/kdecoration.h +++ b/lib/kdecoration.h @@ -196,7 +196,7 @@ public: * @param type The requested color type. * @param active Whether the color should be for active or inactive windows. */ - const QColor& color(ColorType type, bool active=true) const; + QColor color(ColorType type, bool active=true) const; /** * Returns a palette using the given decoration color as the background. * The changed flags for this setting is SettingColors. @@ -204,7 +204,7 @@ public: * @param type The requested color type. * @param active Whether to return the color for active or inactive windows. */ - const QPalette& palette(ColorType type, bool active=true) const; + QPalette palette(ColorType type, bool active=true) const; /** * Returns the active or inactive decoration font. * The changed flags for this setting is SettingFont. @@ -212,7 +212,7 @@ public: * @param active Whether to return the color for active or inactive windows. * @param small If @a true, returns a font that's suitable for tool windows. */ - const QFont& font(bool active=true, bool small = false) const; + QFont font(bool active=true, bool small = false) const; /** * Returns @a true if the style should use custom button positions * The changed flags for this setting is SettingButtons.