Less warnings.

Convert read*Entry to readEntry


svn path=/trunk/KDE/kdebase/workspace/; revision=497023
This commit is contained in:
Tim Beaulen 2006-01-11 18:48:53 +00:00
parent 27cd47844a
commit 43c3d871d0

View file

@ -79,43 +79,43 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
QPalette pal = QApplication::palette(); QPalette pal = QApplication::palette();
// normal colors // normal colors
colors[ColorFrame] = pal.active().background(); colors[ColorFrame] = pal.active().background();
colors[ColorFrame] = config->readColorEntry("frame", &colors[ColorFrame]); colors[ColorFrame] = config->readEntry("frame", colors[ColorFrame]);
colors[ColorHandle] = colors[ColorFrame]; colors[ColorHandle] = colors[ColorFrame];
colors[ColorHandle] = config->readColorEntry("handle", &colors[ColorHandle]); colors[ColorHandle] = config->readEntry("handle", colors[ColorHandle]);
// full button configuration (background, blend, and foreground // full button configuration (background, blend, and foreground
if(QPixmap::defaultDepth() > 8) if(QPixmap::defaultDepth() > 8)
colors[ColorButtonBg] = colors[ColorFrame].light(130); colors[ColorButtonBg] = colors[ColorFrame].light(130);
else else
colors[ColorButtonBg] = colors[ColorFrame]; colors[ColorButtonBg] = colors[ColorFrame];
colors[ColorButtonBg] = config->readColorEntry("activeTitleBtnBg", colors[ColorButtonBg] = config->readEntry("activeTitleBtnBg",
&colors[ColorFrame]); colors[ColorFrame]);
colors[ColorTitleBar] = pal.active().highlight(); colors[ColorTitleBar] = pal.active().highlight();
colors[ColorTitleBar] = config->readColorEntry("activeBackground", colors[ColorTitleBar] = config->readEntry("activeBackground",
&colors[ColorTitleBar]); colors[ColorTitleBar]);
if(QPixmap::defaultDepth() > 8) if(QPixmap::defaultDepth() > 8)
colors[ColorTitleBlend] = colors[ ColorTitleBar ].dark(110); colors[ColorTitleBlend] = colors[ ColorTitleBar ].dark(110);
else else
colors[ColorTitleBlend] = colors[ ColorTitleBar ]; colors[ColorTitleBlend] = colors[ ColorTitleBar ];
colors[ColorTitleBlend] = config->readColorEntry("activeBlend", colors[ColorTitleBlend] = config->readEntry("activeBlend",
&colors[ColorTitleBlend]); colors[ColorTitleBlend]);
colors[ColorFont] = pal.active().highlightedText(); colors[ColorFont] = pal.active().highlightedText();
colors[ColorFont] = config->readColorEntry("activeForeground", &colors[ColorFont]); colors[ColorFont] = config->readEntry("activeForeground", colors[ColorFont]);
// inactive // inactive
colors[ColorFrame+NUM_COLORS] = config->readColorEntry("inactiveFrame", colors[ColorFrame+NUM_COLORS] = config->readEntry("inactiveFrame",
&colors[ColorFrame]); colors[ColorFrame]);
colors[ColorTitleBar+NUM_COLORS] = colors[ColorFrame]; colors[ColorTitleBar+NUM_COLORS] = colors[ColorFrame];
colors[ColorTitleBar+NUM_COLORS] = config-> colors[ColorTitleBar+NUM_COLORS] = config->
readColorEntry("inactiveBackground", &colors[ColorTitleBar+NUM_COLORS]); readEntry("inactiveBackground", colors[ColorTitleBar+NUM_COLORS]);
if(QPixmap::defaultDepth() > 8) if(QPixmap::defaultDepth() > 8)
colors[ColorTitleBlend+NUM_COLORS] = colors[ ColorTitleBar+NUM_COLORS ].dark(110); colors[ColorTitleBlend+NUM_COLORS] = colors[ ColorTitleBar+NUM_COLORS ].dark(110);
else else
colors[ColorTitleBlend+NUM_COLORS] = colors[ ColorTitleBar+NUM_COLORS ]; colors[ColorTitleBlend+NUM_COLORS] = colors[ ColorTitleBar+NUM_COLORS ];
colors[ColorTitleBlend+NUM_COLORS] = colors[ColorTitleBlend+NUM_COLORS] =
config->readColorEntry("inactiveBlend", &colors[ColorTitleBlend+NUM_COLORS]); config->readEntry("inactiveBlend", colors[ColorTitleBlend+NUM_COLORS]);
// full button configuration // full button configuration
if(QPixmap::defaultDepth() > 8) if(QPixmap::defaultDepth() > 8)
@ -123,15 +123,15 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
else else
colors[ColorButtonBg+NUM_COLORS] = colors[ColorFrame+NUM_COLORS]; colors[ColorButtonBg+NUM_COLORS] = colors[ColorFrame+NUM_COLORS];
colors[ColorButtonBg+NUM_COLORS] = colors[ColorButtonBg+NUM_COLORS] =
config->readColorEntry("inactiveTitleBtnBg", config->readEntry("inactiveTitleBtnBg",
&colors[ColorButtonBg]); colors[ColorButtonBg]);
colors[ColorHandle+NUM_COLORS] = colors[ColorHandle+NUM_COLORS] =
config->readColorEntry("inactiveHandle", &colors[ColorHandle]); config->readEntry("inactiveHandle", colors[ColorHandle]);
colors[ColorFont+NUM_COLORS] = colors[ColorFrame].dark(); colors[ColorFont+NUM_COLORS] = colors[ColorFrame].dark();
colors[ColorFont+NUM_COLORS] = config->readColorEntry("inactiveForeground", colors[ColorFont+NUM_COLORS] = config->readEntry("inactiveForeground",
&colors[ColorFont+NUM_COLORS]); colors[ColorFont+NUM_COLORS]);
for( int i = 0; for( int i = 0;
i < NUM_COLORS*2; i < NUM_COLORS*2;
@ -149,14 +149,14 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
activeFontGuess.setBold(true); activeFontGuess.setBold(true);
activeFontGuess.setPixelSize(12); activeFontGuess.setPixelSize(12);
activeFont = config->readFontEntry("activeFont", &activeFontGuess); activeFont = config->readEntry("activeFont", activeFontGuess);
inactiveFont = config->readFontEntry("inactiveFont", &activeFont); inactiveFont = config->readEntry("inactiveFont", activeFont);
activeFontSmall = activeFont; activeFontSmall = activeFont;
#warning KDE4 : is it usefull ? ( temporary hack ) #warning KDE4 : is it usefull ? ( temporary hack )
// activeFontSmall.setPointSize(activeFont.pointSize() - 2 > 0 ? activeFont.pointSize() - 2 : activeFont.pointSize()+1 ); // activeFontSmall.setPointSize(activeFont.pointSize() - 2 > 0 ? activeFont.pointSize() - 2 : activeFont.pointSize()+1 );
activeFontSmall = config->readFontEntry("activeFontSmall", &activeFontSmall); activeFontSmall = config->readEntry("activeFontSmall", activeFontSmall);
inactiveFontSmall = config->readFontEntry("inactiveFontSmall", &activeFontSmall); inactiveFontSmall = config->readEntry("inactiveFontSmall", activeFontSmall);
if( old_activeFont != activeFont if( old_activeFont != activeFont
|| old_inactiveFont != inactiveFont || old_inactiveFont != inactiveFont
@ -195,7 +195,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
// SettingBorder // SettingBorder
BorderSize old_border_size = border_size; BorderSize old_border_size = border_size;
int border_size_num = config->readNumEntry( "BorderSize", BorderNormal ); int border_size_num = config->readEntry( "BorderSize", (int)BorderNormal );
if( border_size_num >= 0 && border_size_num < BordersCount ) if( border_size_num >= 0 && border_size_num < BordersCount )
border_size = static_cast< BorderSize >( border_size_num ); border_size = static_cast< BorderSize >( border_size_num );
else else