equal
deleted
inserted
replaced
115 QFile mapCfgFile(datadir->absolutePath()+"/Maps/"+chooseMap->currentText()+"/map.cfg"); |
115 QFile mapCfgFile(datadir->absolutePath()+"/Maps/"+chooseMap->currentText()+"/map.cfg"); |
116 if (mapCfgFile.open(QFile::ReadOnly)) { |
116 if (mapCfgFile.open(QFile::ReadOnly)) { |
117 QTextStream input(&mapCfgFile); |
117 QTextStream input(&mapCfgFile); |
118 QString theme; |
118 QString theme; |
119 input >> theme; |
119 input >> theme; |
|
120 mapCfgFile.close(); |
120 if(theme.length()>256) throw MapFileErrorException(); // theme name too long |
121 if(theme.length()>256) throw MapFileErrorException(); // theme name too long |
121 return theme; |
122 return theme; |
122 mapCfgFile.close(); |
|
123 } else { |
123 } else { |
124 throw MapFileErrorException(); |
124 throw MapFileErrorException(); |
125 } |
125 } |
126 } |
126 } |
127 |
127 |