[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/games/krosswordpuzzle/src/io (silent)
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2011-06-30 22:36:45
Message-ID: 20110630223645.62CAEAC7E9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1238899 by cfeck:

SVN_SILENT compile with gcc 4.6

CCMAIL: fpuelz@gmx.de


 M  +11 -9     krosswordxmlreader.cpp  


--- trunk/playground/games/krosswordpuzzle/src/io/krosswordxmlreader.cpp #1238898:1238899
@@ -526,7 +526,8 @@
 }
 
 void KrossWordXmlReader::readUserDefinedCrosswordSettings( KrossWord* krossWord ) {
-    krossWord->crosswordTypeInfo().name = attributes().value( "name" ).toString();
+    CrosswordTypeInfo crosswordTypeInfo = krossWord->crosswordTypeInfo();
+    crosswordTypeInfo.name = attributes().value( "name" ).toString();
 
     while ( !atEnd() ) {
 	readNext();
@@ -536,9 +537,9 @@
 
 	if ( isStartElement() ) {
 	    if ( name().compare("iconName", Qt::CaseInsensitive) == 0 )
-		krossWord->crosswordTypeInfo().iconName = readElementText();
+		crosswordTypeInfo.iconName = readElementText();
 	    else if ( name().compare("description", Qt::CaseInsensitive) == 0 )
-		krossWord->crosswordTypeInfo().description = readElementText();
+		crosswordTypeInfo.description = readElementText();
 	    else if ( name().compare("minAnswerLength", Qt::CaseInsensitive) == 0 ) {
 		int minAnswerLength = readElementText().toInt();
 		if ( minAnswerLength < 1 ) {
@@ -546,27 +547,28 @@
 			"is too small or not a number" << minAnswerLength;
 		    minAnswerLength = 1;
 		}
-		krossWord->crosswordTypeInfo().minAnswerLength = minAnswerLength;
+		crosswordTypeInfo.minAnswerLength = minAnswerLength;
 	    } else if ( name().compare("clueCellHandling", Qt::CaseInsensitive) == 0 ) {
-		krossWord->crosswordTypeInfo().clueCellHandling =
+		crosswordTypeInfo.clueCellHandling =
 		    CrosswordTypeInfo::clueCellHandlingFromString( readElementText() );
 	    } else if ( name().compare("clueType", Qt::CaseInsensitive) == 0 ) {
-		krossWord->crosswordTypeInfo().clueType =
+		crosswordTypeInfo.clueType =
 		    CrosswordTypeInfo::clueTypeFromString( readElementText() );
 	    } else if ( name().compare("letterCellContent", Qt::CaseInsensitive) == 0 ) {
-		krossWord->crosswordTypeInfo().letterCellContent =
+		crosswordTypeInfo.letterCellContent =
 		    CrosswordTypeInfo::letterCellContentFromString( readElementText() );
 	    } else if ( name().compare("clueMapping", Qt::CaseInsensitive) == 0 ) {
-		krossWord->crosswordTypeInfo().clueMapping =
+		crosswordTypeInfo.clueMapping =
 		    CrosswordTypeInfo::clueMappingFromString( readElementText() );
 	    } else if ( name().compare("cellTypes", Qt::CaseInsensitive) == 0 ) {
-		krossWord->crosswordTypeInfo().cellTypes =
+		crosswordTypeInfo.cellTypes =
 		    CrosswordTypeInfo::cellTypesFromStringList( readElementText().split(',') );
 
 	    } else
                 readUnknownElement();
 	}
     }
+    krossWord->setCrosswordTypeInfo(crosswordTypeInfo);
 }
 
 void KrossWordXmlReader::readUnknownElement() {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic