ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/XmlTools2/trunk/utilxmltools.h
(Generate patch)

Comparing XmlTools2/trunk/utilxmltools.h (file contents):
Revision 923 by s10k, Mon Feb 3 15:42:14 2014 UTC vs.
Revision 935 by s10k, Thu Feb 6 13:05:39 2014 UTC

# Line 23 | Line 23 | pugi::xml_node getFirstXpathElement(cons
23  
24   inline void loadXmlFile(const QString &file, pugi::xml_document &document, pugi::xml_node &rootNode, bool backupsEnabled, bool verboseEnabled, const QString &operationForErrorMessage){
25  
26 <    pugi::xml_parse_result result = document.load_file(file.toLatin1().constData());
26 >    pugi::xml_parse_result result = document.load_file(file.toUtf8().constData());
27      rootNode=document.root();
28  
29      if(result.status==pugi::status_ok){
30          if(verboseEnabled){
31 <            std::cout << "File '" << file.toLatin1().constData() << "' loaded with sucess." << std::endl;
31 >            std::cout << "File '" << file.toUtf8().constData() << "' loaded with sucess." << std::endl;
32          }
33      }
34      else{
# Line 42 | Line 42 | inline void loadXmlFile(const QString &f
42   }
43  
44   inline void saveXmlFile(const QString &file, pugi::xml_document &document, const QString &operationForErrorMessage){
45 <    if(!document.save_file(file.toLatin1().constData(), "\t", pugi::format_indent | pugi::format_save_file_text | pugi::format_no_escapes)){ // output as the system new lines ending
45 >    if(!document.save_file(file.toUtf8().constData(), "\t", pugi::format_indent | pugi::format_save_file_text | pugi::format_no_escapes)){ // output as the system new lines ending
46          UtilXmlTools::displayErrorMessage(operationForErrorMessage,"An error ocurred while saving '" + file + "' XML file");
47      }
48   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)