chore: reformat

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2023-08-02 18:35:35 +02:00
parent ce2ca13815
commit 1d468ac35a
No known key found for this signature in database
GPG key ID: E13DFD4B47127951
594 changed files with 16040 additions and 16536 deletions

View file

@ -14,17 +14,16 @@
*/
#include "SkinUtils.h"
#include "net/HttpMetaCache.h"
#include "Application.h"
#include "net/HttpMetaCache.h"
#include <QFile>
#include <QPainter>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QPainter>
namespace SkinUtils
{
namespace SkinUtils {
/*
* Given a username, return a pixmap of the cached skin (if it exists), QPixmap() otherwise
*/
@ -32,11 +31,9 @@ QPixmap getFaceFromCache(QString username, int height, int width)
{
QFile fskin(APPLICATION->metacache()->resolveEntry("skins", username + ".png")->getFullPath());
if (fskin.exists())
{
if (fskin.exists()) {
QPixmap skinTexture(fskin.fileName());
if(!skinTexture.isNull())
{
if (!skinTexture.isNull()) {
QPixmap skin = QPixmap(8, 8);
QPainter painter(&skin);
painter.drawPixmap(0, 0, skinTexture.copy(8, 8, 8, 8));
@ -47,4 +44,4 @@ QPixmap getFaceFromCache(QString username, int height, int width)
return QPixmap();
}
}
} // namespace SkinUtils