<commit_before>#include "apitracecall.h"

#include "trace_model.hpp"

#include <QDebug>

ApiPointer::ApiPointer(int val)
    : m_value(val)
{
}

QString ApiPointer::toString() const
{
    if (m_value)
        return QString("0x%1").arg(m_value, 0, 16);
    else
        return QLatin1String("NULL");
}

QString apiVariantToString(const QVariant &variant)
{
    if (variant.userType() == QVariant::Double) {
        return QString::number(variant.toFloat());<commit_msg>Stop showing binary data, just say what it is and how big it is.<commit_after>#include "apitracecall.h"

#include "trace_model.hpp"

#include <QDebug>
#include <QObject>

ApiPointer::ApiPointer(int val)
    : m_value(val)
{
}

QString ApiPointer::toString() const
{
    if (m_value)
        return QString("0x%1").arg(m_value, 0, 16);
    else
        return QLatin1String("NULL");
}

QString apiVariantToString(const QVariant &variant)
{
    if (variant.userType() == QVariant::Double) {
        return QString::number(variant.toFloat());
    }
    if (variant.userType() == QVariant::ByteArray) {
        float kb = variant.toByteArray().size()/1024.;
        return QObject::tr("[binary data, size = %1kb]").arg(kb);
{'fraction_non_alphanumeric': 0.15067340067340068, 'fraction_numerical': 0.01430976430976431, 'mean_word_length': 4.0168776371308015, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '877915', 'n_tokens_mistral': 412, 'n_tokens_neox': 402, 'n_words': 85}