<commit_before>#include "AbstractResource.h"
#include "private/AbstractResource_p.h"

#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QFile>

namespace web
{
namespace page
{
namespace resource
{

AbstractResource::~AbstractResource()
{
    delete d_ptr;
}

void AbstractResource::setResponse(Tufao::HttpServerResponse *response)
{
    Q_D(AbstractResource);
    d->response = response;
}

QByteArray AbstractResource::getContent()
{
    Q_D(AbstractResource);

    QFile file(d->fileName);
    if (file.open(QIODevice::ReadOnly)) {
            QByteArray data;
            data.resize(2000);

            while (!file.atEnd()) {
                    data = file.read(2000);
                    d->response->write(data);
                    qApp->processEvents();
                    qDebug() << d->fileName;
                }

            file.close();
        }

    return QByteArrayLiteral("");
}

AbstractResource::AbstractResource(AbstractResourcePrivate *d) :
    d_ptr(d)
{
}

}
}
}<commit_msg>We don't need to print out the filename<commit_after>#include "AbstractResource.h"
#include "private/AbstractResource_p.h"

#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QFile>

namespace web
{
namespace page
{
namespace resource
{

AbstractResource::~AbstractResource()
{
    delete d_ptr;
}

void AbstractResource::setResponse(Tufao::HttpServerResponse *response)
{
    Q_D(AbstractResource);
    d->response = response;
}

QByteArray AbstractResource::getContent()
{
    Q_D(AbstractResource);

    QFile file(d->fileName);
    if (file.open(QIODevice::ReadOnly)) {
            QByteArray data;
            data.resize(2000);

            while (!file.atEnd()) {
                    data = file.read(2000);
                    d->response->write(data);
                    qApp->processEvents();
                }

            file.close();
        }

    return QByteArrayLiteral("");
}

AbstractResource::AbstractResource(AbstractResourcePrivate *d) :
    d_ptr(d)
{
}

}
}
}
{'fraction_non_alphanumeric': 0.12738853503184713, 'fraction_numerical': 0.007839294463498285, 'mean_word_length': 2.7262773722627736, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '807974', 'n_tokens_mistral': 637, 'n_tokens_neox': 612, 'n_words': 103}