aboutsummaryrefslogtreecommitdiff
path: root/lib/events/eventcontent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/eventcontent.cpp')
-rw-r--r--lib/events/eventcontent.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/events/eventcontent.cpp b/lib/events/eventcontent.cpp
index 77f756cd..2b84c2b7 100644
--- a/lib/events/eventcontent.cpp
+++ b/lib/events/eventcontent.cpp
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "eventcontent.h"
@@ -34,14 +34,17 @@ QJsonObject Base::toJson() const
FileInfo::FileInfo(const QUrl& u, qint64 payloadSize, const QMimeType& mimeType,
const QString& originalFilename)
- : mimeType(mimeType), url(u), payloadSize(payloadSize)
+ : mimeType(mimeType)
+ , url(u)
+ , payloadSize(payloadSize)
, originalName(originalFilename)
-{ }
+{}
FileInfo::FileInfo(const QUrl& u, const QJsonObject& infoJson,
const QString& originalFilename)
: originalInfoJson(infoJson)
- , mimeType(QMimeDatabase().mimeTypeForName(infoJson["mimetype"_ls].toString()))
+ , mimeType(
+ QMimeDatabase().mimeTypeForName(infoJson["mimetype"_ls].toString()))
, url(u)
, payloadSize(fromJson<qint64>(infoJson["size"_ls]))
, originalName(originalFilename)
@@ -53,7 +56,7 @@ FileInfo::FileInfo(const QUrl& u, const QJsonObject& infoJson,
bool FileInfo::isValid() const
{
return url.scheme() == "mxc"
- && (url.authority() + url.path()).count('/') == 1;
+ && (url.authority() + url.path()).count('/') == 1;
}
void FileInfo::fillInfoJson(QJsonObject* infoJson) const
@@ -67,14 +70,15 @@ void FileInfo::fillInfoJson(QJsonObject* infoJson) const
ImageInfo::ImageInfo(const QUrl& u, qint64 fileSize, QMimeType mimeType,
const QSize& imageSize, const QString& originalFilename)
- : FileInfo(u, fileSize, mimeType, originalFilename), imageSize(imageSize)
-{ }
+ : FileInfo(u, fileSize, mimeType, originalFilename)
+ , imageSize(imageSize)
+{}
ImageInfo::ImageInfo(const QUrl& u, const QJsonObject& infoJson,
const QString& originalFilename)
: FileInfo(u, infoJson, originalFilename)
, imageSize(infoJson["w"_ls].toInt(), infoJson["h"_ls].toInt())
-{ }
+{}
void ImageInfo::fillInfoJson(QJsonObject* infoJson) const
{
@@ -88,7 +92,7 @@ void ImageInfo::fillInfoJson(QJsonObject* infoJson) const
Thumbnail::Thumbnail(const QJsonObject& infoJson)
: ImageInfo(infoJson["thumbnail_url"_ls].toString(),
infoJson["thumbnail_info"_ls].toObject())
-{ }
+{}
void Thumbnail::fillInfoJson(QJsonObject* infoJson) const
{