chore: reformat

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2023-08-14 18:16:53 +02:00
parent 779f70057b
commit 91ba4cf75e
603 changed files with 15840 additions and 16257 deletions

View File

@ -18,16 +18,14 @@
#include <QDomNodeList>
#include <QVariant>
NewsEntry::NewsEntry(QObject* parent) :
QObject(parent)
NewsEntry::NewsEntry(QObject* parent) : QObject(parent)
{
this->title = tr("Untitled");
this->content = tr("No content.");
this->link = "";
}
NewsEntry::NewsEntry(const QString& title, const QString& content, const QString& link, QObject* parent) :
QObject(parent)
NewsEntry::NewsEntry(const QString& title, const QString& content, const QString& link, QObject* parent) : QObject(parent)
{
this->title = title;
this->content = content;
@ -37,16 +35,13 @@ NewsEntry::NewsEntry(const QString& title, const QString& content, const QString
/*!
* Gets the text content of the given child element as a QVariant.
*/
inline QString childValue(const QDomElement& element, const QString& childName, QString defaultVal="")
inline QString childValue(const QDomElement& element, const QString& childName, QString defaultVal = "")
{
QDomNodeList nodes = element.elementsByTagName(childName);
if (nodes.count() > 0)
{
if (nodes.count() > 0) {
QDomElement elem = nodes.at(0).toElement();
return elem.text();
}
else
{
} else {
return defaultVal;
}
}