| 973 | } |
| 974 | |
| 975 | bool cmQtAutoMocUicT::JobParseT::ReadFile() |
| 976 | { |
| 977 | // Clear old parse information |
| 978 | this->FileHandle->ParseData->Clear(); |
| 979 | std::string const& fileName = this->FileHandle->FileName; |
| 980 | // Write info |
| 981 | if (this->Log().Verbose()) { |
| 982 | this->Log().Info(GenT::GEN, |
| 983 | cmStrCat("Parsing ", this->MessagePath(fileName))); |
| 984 | } |
| 985 | // Read file content |
| 986 | { |
| 987 | std::string error; |
| 988 | if (!cmQtAutoGenerator::FileRead(this->Content, fileName, &error)) { |
| 989 | this->LogError(GenT::GEN, |
| 990 | cmStrCat("Could not read ", this->MessagePath(fileName), |
| 991 | ".\n", error)); |
| 992 | return false; |
| 993 | } |
| 994 | } |
| 995 | // Warn if empty |
| 996 | if (this->Content.empty()) { |
| 997 | this->Log().Warning(GenT::GEN, |
| 998 | cmStrCat(this->MessagePath(fileName), " is empty.")); |
| 999 | return false; |
| 1000 | } |
| 1001 | return true; |
| 1002 | } |
| 1003 | |
| 1004 | void cmQtAutoMocUicT::JobParseT::CreateKeys( |
| 1005 | std::vector<IncludeKeyT>& container, std::set<std::string> const& source, |