tools/qdoc3/qscodeparser.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   149                                    const QString& filePath,
   149                                    const QString& filePath,
   150                                    Tree *tree)
   150                                    Tree *tree)
   151 {
   151 {
   152     qsTre = tree;
   152     qsTre = tree;
   153 
   153 
   154     FILE *in = fopen(QFile::encodeName(filePath), "r");
   154     QFile in(filePath);
   155     if (in == 0) {
   155     if (!in.open(QIODevice::ReadOnly)) {
   156 	location.error(tr("Cannot open Qt Script class list '%1'")
   156 	location.error(tr("Cannot open Qt Script class list '%1'")
   157 			.arg(filePath));
   157 			.arg(filePath));
   158 	return;
   158 	return;
   159     }
   159     }
   160 
   160 
   173 					    .arg(fileTokenizer.lexeme()));
   173 					    .arg(fileTokenizer.lexeme()));
   174 	    break;
   174 	    break;
   175 	}
   175 	}
   176 	tok = fileTokenizer.getToken();
   176 	tok = fileTokenizer.getToken();
   177     }
   177     }
   178     fclose(in);
   178     in.close();
   179 }
   179 }
   180 
   180 
   181 void QsCodeParser::parseSourceFile(const Location& location,
   181 void QsCodeParser::parseSourceFile(const Location& location,
   182                                    const QString& filePath,
   182                                    const QString& filePath,
   183                                    Tree *tree)
   183                                    Tree *tree)