Skip to content

Commit 107284b

Browse files
committed
Minor adjustment in SchemaParser::resetParser to clear include infos
1 parent 185d5fb commit 107284b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libs/libparsers/src/schemaparser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,10 @@ void SchemaParser::setSearchPath(const QString &path)
157157
void SchemaParser::restartParser()
158158
{
159159
/* Clears the buffer and resets the counters for line,
160-
column and amount of comments */
160+
column and include statement infos */
161161
buffer.clear();
162162
attributes.clear();
163+
include_infos.clear();
163164
line = column = 0;
164165
}
165166

libs/libparsers/src/schemaparser.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,10 @@ class __libparsers SchemaParser {
213213
}
214214

215215
if(is_incl_error)
216+
{
216217
msg = QString(QT_TR_NOOP("Failed to parse the file `%1' due to an error in the included file at line `%2'. Error detected:\n\n"))
217218
.arg(filename).arg(incl_line + 1);
219+
}
218220

219221
/* Compile-time if: if the folded expression is not empty
220222
* we use it as part of the error message arguments */

0 commit comments

Comments
 (0)