diff --git a/rules.cpp b/rules.cpp index 5a1e8101be..b6b048d84d 100644 --- a/rules.cpp +++ b/rules.cpp @@ -177,7 +177,7 @@ void Rules::readFromCfg( KConfig& cfg ) if( !var.isEmpty() || force ) \ { \ cfg.writeEntry( #var, cast var ); \ - cfg.writeEntry( #var "match", var##match ); \ + cfg.writeEntry( #var "match", (int)var##match ); \ } \ else \ { \ @@ -189,7 +189,7 @@ void Rules::readFromCfg( KConfig& cfg ) if( var##rule != UnusedSetRule ) \ { \ cfg.writeEntry( #var, func ( var )); \ - cfg.writeEntry( #var "rule", var##rule ); \ + cfg.writeEntry( #var "rule", (int)var##rule ); \ } \ else \ { \ @@ -201,7 +201,7 @@ void Rules::readFromCfg( KConfig& cfg ) if( var##rule != UnusedForceRule ) \ { \ cfg.writeEntry( #var, func ( var )); \ - cfg.writeEntry( #var "rule", var##rule ); \ + cfg.writeEntry( #var "rule", (int)var##rule ); \ } \ else \ { \ @@ -236,7 +236,7 @@ void Rules::write( KConfig& cfg ) const WRITE_FORCE_RULE( opacityinactive, ); WRITE_FORCE_RULE( ignoreposition, ); WRITE_SET_RULE( desktop, ); - WRITE_FORCE_RULE( type, ); + WRITE_FORCE_RULE( type, int ); WRITE_SET_RULE( maximizevert, ); WRITE_SET_RULE( maximizehoriz, ); WRITE_SET_RULE( minimize, ); diff --git a/sm.cpp b/sm.cpp index be74969583..7150658da3 100644 --- a/sm.cpp +++ b/sm.cpp @@ -88,12 +88,12 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase ) QString n = QString::number(count); if( phase == SMSavePhase2 || phase == SMSavePhase2Full ) { - config->writeEntry( QString("sessionId")+n, sessionId.data() ); - config->writeEntry( QString("windowRole")+n, c->windowRole().data() ); - config->writeEntry( QString("wmCommand")+n, wmCommand.data() ); - config->writeEntry( QString("wmClientMachine")+n, c->wmClientMachine( true ).data() ); - config->writeEntry( QString("resourceName")+n, c->resourceName().data() ); - config->writeEntry( QString("resourceClass")+n, c->resourceClass().data() ); + config->writeEntry( QString("sessionId")+n, sessionId.constData() ); + config->writeEntry( QString("windowRole")+n, c->windowRole().constData() ); + config->writeEntry( QString("wmCommand")+n, wmCommand.constData() ); + config->writeEntry( QString("wmClientMachine")+n, c->wmClientMachine( true ).constData() ); + config->writeEntry( QString("resourceName")+n, c->resourceName().constData() ); + config->writeEntry( QString("resourceClass")+n, c->resourceClass().constData() ); config->writeEntry( QString("geometry")+n, QRect( c->calculateGravitation(TRUE), c->clientSize() ) ); // FRAME config->writeEntry( QString("restore")+n, c->geometryRestore() ); config->writeEntry( QString("fsrestore")+n, c->geometryFSRestore() );