| 1971 | } |
| 1972 | |
| 1973 | void readRelatedResult(ThriftBinaryBufferReader& r, RelatedResult& s) { |
| 1974 | QString fname; |
| 1975 | ThriftFieldType::type fieldType; |
| 1976 | qint16 fieldId; |
| 1977 | r.readStructBegin(fname); |
| 1978 | while(true) { |
| 1979 | r.readFieldBegin(fname, fieldType, fieldId); |
| 1980 | if(fieldType == ThriftFieldType::T_STOP) break; |
| 1981 | if(fieldId == 1) { |
| 1982 | if(fieldType == ThriftFieldType::T_LIST) { |
| 1983 | QList< Note > v; |
| 1984 | quint32 size; |
| 1985 | ThriftFieldType::type elemType; |
| 1986 | r.readListBegin(elemType, size); |
| 1987 | v.reserve(size); |
| 1988 | if(elemType != ThriftFieldType::T_STRUCT) throw ThriftException(ThriftException::Type::INVALID_DATA, "Incorrect list type (RelatedResult.notes)"); |
| 1989 | for(quint32 i = 0; i < size; i++) { |
| 1990 | Note elem; |
| 1991 | readNote(r, elem); |
| 1992 | v.append(elem); |
| 1993 | } |
| 1994 | r.readListEnd(); |
| 1995 | s.notes = v; |
| 1996 | } else { |
| 1997 | r.skip(fieldType); |
| 1998 | } |
| 1999 | } else |
| 2000 | if(fieldId == 2) { |
| 2001 | if(fieldType == ThriftFieldType::T_LIST) { |
| 2002 | QList< Notebook > v; |
| 2003 | quint32 size; |
| 2004 | ThriftFieldType::type elemType; |
| 2005 | r.readListBegin(elemType, size); |
| 2006 | v.reserve(size); |
| 2007 | if(elemType != ThriftFieldType::T_STRUCT) throw ThriftException(ThriftException::Type::INVALID_DATA, "Incorrect list type (RelatedResult.notebooks)"); |
| 2008 | for(quint32 i = 0; i < size; i++) { |
| 2009 | Notebook elem; |
| 2010 | readNotebook(r, elem); |
| 2011 | v.append(elem); |
| 2012 | } |
| 2013 | r.readListEnd(); |
| 2014 | s.notebooks = v; |
| 2015 | } else { |
| 2016 | r.skip(fieldType); |
| 2017 | } |
| 2018 | } else |
| 2019 | if(fieldId == 3) { |
| 2020 | if(fieldType == ThriftFieldType::T_LIST) { |
| 2021 | QList< Tag > v; |
| 2022 | quint32 size; |
| 2023 | ThriftFieldType::type elemType; |
| 2024 | r.readListBegin(elemType, size); |
| 2025 | v.reserve(size); |
| 2026 | if(elemType != ThriftFieldType::T_STRUCT) throw ThriftException(ThriftException::Type::INVALID_DATA, "Incorrect list type (RelatedResult.tags)"); |
| 2027 | for(quint32 i = 0; i < size; i++) { |
| 2028 | Tag elem; |
| 2029 | readTag(r, elem); |
| 2030 | v.append(elem); |
no test coverage detected