Merge pull request #639 from nextcloud/upstream/pr/6605

UpdateInfo: Remove unused code
This commit is contained in:
Roeland Jago Douma 2018-10-23 13:05:27 +02:00 committed by GitHub
commit d3bc9fbdf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 41 deletions

View file

@ -1,5 +1,4 @@
// This file is generated by kxml_compiler from occinfo.xml.
// All changes you do to this file will be lost.
#include "updateinfo.h"
#include "updater.h"
@ -83,24 +82,6 @@ UpdateInfo UpdateInfo::parseElement(const QDomElement &element, bool *ok)
return result;
}
void UpdateInfo::writeElement(QXmlStreamWriter &xml)
{
xml.writeStartElement(QLatin1String("owncloudclient"));
if (!version().isEmpty()) {
xml.writeTextElement(QLatin1String("version"), version());
}
if (!versionString().isEmpty()) {
xml.writeTextElement(QLatin1String("versionstring"), versionString());
}
if (!web().isEmpty()) {
xml.writeTextElement(QLatin1String("web"), web());
}
if (!downloadUrl().isEmpty()) {
xml.writeTextElement(QLatin1String("downloadurl"), web());
}
xml.writeEndElement();
}
UpdateInfo UpdateInfo::parseFile(const QString &filename, bool *ok)
{
QFile file(filename);
@ -149,23 +130,4 @@ UpdateInfo UpdateInfo::parseString(const QString &xml, bool *ok)
return c;
}
bool UpdateInfo::writeFile(const QString &filename)
{
QFile file(filename);
if (!file.open(QIODevice::WriteOnly)) {
qCCritical(lcUpdater) << "Unable to open file '" << filename << "'";
return false;
}
QXmlStreamWriter xml(&file);
xml.setAutoFormatting(true);
xml.setAutoFormattingIndent(2);
xml.writeStartDocument(QLatin1String("1.0"));
writeElement(xml);
xml.writeEndDocument();
file.close();
return true;
}
} // namespace OCC

View file

@ -1,5 +1,4 @@
// This file is generated by kxml_compiler from occinfo.xml.
// All changes you do to this file will be lost.
#ifndef UPDATEINFO_H
#define UPDATEINFO_H
@ -24,10 +23,8 @@ public:
Parse XML object from DOM element.
*/
static UpdateInfo parseElement(const QDomElement &element, bool *ok);
void writeElement(QXmlStreamWriter &xml);
static UpdateInfo parseFile(const QString &filename, bool *ok);
static UpdateInfo parseString(const QString &xml, bool *ok);
bool writeFile(const QString &filename);
private:
QString mVersion;