diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2018-12-04 16:47:26 +0300 |
---|---|---|
committer | Camila (Rebase PR Action) <hello@camila.codes> | 2020-11-24 21:22:33 +0300 |
commit | f2c3ef741b22eadc9fb43f6a7afc8ca0b5e74203 (patch) | |
tree | 17ee5966f7eedab9c9ae66ea4d1a87a010212862 /src/gui/updater | |
parent | ae38b88d1cab7db38e919bba4b08896314146e4a (diff) |
Updater: remove unused function
Diffstat (limited to 'src/gui/updater')
-rw-r--r-- | src/gui/updater/updateinfo.cpp | 28 | ||||
-rw-r--r-- | src/gui/updater/updateinfo.h | 1 |
2 files changed, 0 insertions, 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: |