From 58a0724980bcd97fa72fe6c6f981d2ed19793756 Mon Sep 17 00:00:00 2001 From: dt <qtc-commiter@nokia.com> Date: Thu, 15 Jan 2009 16:06:37 +0100 Subject: [PATCH] Fixes: Fix parseOption method to be robust --- src/plugins/cmakeprojectmanager/cmakeproject.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index ac65d225b52..65bf70fe584 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -548,8 +548,15 @@ void CMakeCbpParser::parseOption() { if (attributes().hasAttribute("title")) m_projectName = attributes().value("title").toString(); - if(isStartElement()) - parseUnknownElement(); + + while (!atEnd()) { + readNext(); + if (isEndElement()) { + return; + } else if(isStartElement()) { + parseUnknownElement(); + } + } } void CMakeCbpParser::parseMakeCommand() -- GitLab