From 26e7b1d6e84d74de9d8b1616872ff7eab60ba060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D1=81=D0=BE=D0=B2=D0=B8=D0=BA=20=D0=9F=D0=BE=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0=20=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD?= =?UTF-8?q?=D0=B4=D1=80=D0=BE=D0=B2=D0=BD=D0=B0?= Date: Sun, 17 Jan 2021 13:43:09 +0000 Subject: [PATCH] Delete XML_xmlparser.cpp --- XML_xmlparser.cpp | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 XML_xmlparser.cpp diff --git a/XML_xmlparser.cpp b/XML_xmlparser.cpp deleted file mode 100644 index 717b1b2..0000000 --- a/XML_xmlparser.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "xmlparser.h" -#include "ui_mainwindow.h" - -bool XMLParser::startElement(const QString&, - const QString&, - const QString& tagName, - const QXmlAttributes& - ) -{ - if(tagName == "catalog") - treeItem = new QTreeWidgetItem(treeWidget); - - else - treeItem = new QTreeWidgetItem(treeItem); - return true; -} - -// ------------------------------------------------------------------ -bool XMLParser::characters(const QString& strText) -{ - m_strText = ": " + strText; - return true; -} - -// ------------------------------------------------------------------ -bool XMLParser::endElement(const QString&, const QString&, const QString& str) -{ - treeItem->setText(0, str + m_strText); - if(treeItem->parent() && treeItem->parent()->text(0) == "") - treeItem = treeItem->parent(); - m_strText = ""; - if(str == "catalog") - treeItem->setText(0, title); - -return true; -} - -// ------------------------------------------------------------------ -bool XMLParser::fatalError(const QXmlParseException& exception) -{ - QString str = "Line: " + QString::number(exception.lineNumber()) + ", Column: " + QString::number(exception.columnNumber()) + ", Message: " + exception.message(); - QMessageBox::warning(nullptr, "Ошибка", str); - - return false; -} -- GitLab