From f2c3ef741b22eadc9fb43f6a7afc8ca0b5e74203 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 4 Dec 2018 14:47:26 +0100 Subject: [PATCH] Updater: remove unused function --- src/gui/updater/updateinfo.cpp | 28 ---------------------------- src/gui/updater/updateinfo.h | 1 - 2 files changed, 29 deletions(-) diff --git a/src/gui/updater/updateinfo.cpp b/src/gui/updater/updateinfo.cpp index 8af312307..ad32c6c9d 100644 --- a/src/gui/updater/updateinfo.cpp +++ b/src/gui/updater/updateinfo.cpp @@ -82,34 +82,6 @@ UpdateInfo UpdateInfo::parseElement(const QDomElement &element, bool *ok) return result; } -UpdateInfo UpdateInfo::parseFile(const QString &filename, bool *ok) -{ - QFile file(filename); - if (!file.open(QIODevice::ReadOnly)) { - qCCritical(lcUpdater) << "Unable to open file '" << filename << "'"; - if (ok) - *ok = false; - return UpdateInfo(); - } - - QString errorMsg; - int errorLine = 0, errorCol = 0; - QDomDocument doc; - if (!doc.setContent(&file, false, &errorMsg, &errorLine, &errorCol)) { - qCCritical(lcUpdater) << errorMsg << " at " << errorLine << "," << errorCol; - if (ok) - *ok = false; - return UpdateInfo(); - } - - bool documentOk = false; - UpdateInfo c = parseElement(doc.documentElement(), &documentOk); - if (ok) { - *ok = documentOk; - } - return c; -} - UpdateInfo UpdateInfo::parseString(const QString &xml, bool *ok) { QString errorMsg; diff --git a/src/gui/updater/updateinfo.h b/src/gui/updater/updateinfo.h index 0ac00074c..a57c6f040 100644 --- a/src/gui/updater/updateinfo.h +++ b/src/gui/updater/updateinfo.h @@ -23,7 +23,6 @@ public: Parse XML object from DOM element. */ static UpdateInfo parseElement(const QDomElement &element, bool *ok); - static UpdateInfo parseFile(const QString &filename, bool *ok); static UpdateInfo parseString(const QString &xml, bool *ok); private: -- 2.30.2