<commit_before>#include "dselrig_part.h"
#include "eavesdroppermodel.h"

#include <kdemacros.h>
#include <kparts/genericfactory.h>

#include <QLabel>
#include <QTreeView>
#include <QVBoxLayout>

K_PLUGIN_FACTORY(DselRigPartFactory, registerPlugin<DselRigPart>();)  // produce a factory
K_EXPORT_PLUGIN(DselRigPartFactory("DselRig", "DselRig"))

class DselRigPart::Private
{
public:
    QWidget *mainWidget;
};

DselRigPart::DselRigPart(QWidget *parentWidget, QObject *parent, const QVariantList &)
   : KParts::ReadOnlyPart(parent),
     d(new Private)
{
    KGlobal::locale()->insertCatalog("DselRig");
    setComponentData(DselRigPartFactory::componentData());

    d->mainWidget = new QWidget();
    QVBoxLayout *mainLayout = new QVBoxLayout;
    d->mainWidget->setLayout(mainLayout);

    QLabel *label = new QLabel("I am DselRig");
    mainLayout->addWidget(label);

    QTreeView *messageList = new QTreeView;
    mainLayout->addWidget(messageList);
    EavesdropperModel *model = new EavesdropperModel();
    messageList->setModel(model);

    setWidget(d->mainWidget);
}

DselRigPart::~DselRigPart()
{
    delete d;
    d = 0;
}<commit_msg>Remove the QLabel, it's a leftover from getting the KPart to work.<commit_after>#include "dselrig_part.h"
#include "eavesdroppermodel.h"

#include <kdemacros.h>
#include <kparts/genericfactory.h>

#include <QLabel>
#include <QTreeView>
#include <QVBoxLayout>

K_PLUGIN_FACTORY(DselRigPartFactory, registerPlugin<DselRigPart>();)  // produce a factory
K_EXPORT_PLUGIN(DselRigPartFactory("DselRig", "DselRig"))

class DselRigPart::Private
{
public:
    QWidget *mainWidget;
};

DselRigPart::DselRigPart(QWidget *parentWidget, QObject *parent, const QVariantList &)
   : KParts::ReadOnlyPart(parent),
     d(new Private)
{
    KGlobal::locale()->insertCatalog("DselRig");
    setComponentData(DselRigPartFactory::componentData());

    d->mainWidget = new QWidget();
    QVBoxLayout *mainLayout = new QVBoxLayout;
    d->mainWidget->setLayout(mainLayout);

    QTreeView *messageList = new QTreeView;
    mainLayout->addWidget(messageList);
    EavesdropperModel *model = new EavesdropperModel();
    messageList->setModel(model);

    setWidget(d->mainWidget);
}

DselRigPart::~DselRigPart()
{
    delete d;
    d = 0;
}
{'fraction_non_alphanumeric': 0.1319505736981465, 'fraction_numerical': 0.00088261253309797, 'mean_word_length': 5.53314121037464, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 30, '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': '3418194', 'n_tokens_mistral': 821, 'n_tokens_neox': 813, 'n_words': 140}