Updater: remove unused function
authorOlivier Goffart <ogoffart@woboq.com>
Tue, 4 Dec 2018 13:47:26 +0000 (14:47 +0100)
committerCamila (Rebase PR Action) <hello@camila.codes>
Tue, 24 Nov 2020 18:22:33 +0000 (18:22 +0000)
src/gui/updater/updateinfo.cpp
src/gui/updater/updateinfo.h

index 8af3123075153b58b3cb6dd9b093269fcaada2be..ad32c6c9d197fb0155569277f670454da6c9e0ef 100644 (file)
@@ -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;
index 0ac00074c0cf0735da01a3ff7f8465f44a2f7025..a57c6f040205aa9f9c96751980c4e6d9442b9e3d 100644 (file)
@@ -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: