<commit_before>#include <QPointer>

#include "OptionsPage.h"
#include "OptionsWidget.h"
#include "Constants.h"

using namespace QtcCppcheck::Internal;

OptionsPage::OptionsPage(Settings *settings, QObject *parent) :
  IOptionsPage(parent), settings_ (settings)
{
  Q_ASSERT (settings_ != NULL);
  setId (Constants::OPTIONS_PAGE_ID);
  setDisplayName (tr ("QtcCppcheck"));
  setCategory(Constants::OPTIONS_CATEGORY_ID);
  setCategoryIcon(QLatin1String (Constants::OPTIONS_CATEGORY_ICON));

  keyWords_ << QLatin1String ("cppcheck");
}

OptionsPage::~OptionsPage()
{
  settings_ = NULL;
}

bool OptionsPage::matches(const QString &searchKeyWord) const
{
  return keyWords_.contains (searchKeyWord);
}

QWidget *OptionsPage::widget()
{
  return createPage (NULL);
}

QWidget *OptionsPage::createPage(QWidget *parent)
{
  Q_ASSERT (settings_ != NULL);
  widget_ = new OptionsWidget (settings_, parent);
  Q_CHECK_PTR (widget_.data ());
  return widget_.data ();
}

void OptionsPage::apply()
{
  Q_ASSERT (!widget_.isNull ());
  widget_->applySettings ();
  emit settingsChanged ();
}

void OptionsPage::finish()
{

}
<commit_msg>Added options display category name.<commit_after>#include <QPointer>
#include <QCoreApplication>

#include "OptionsPage.h"
#include "OptionsWidget.h"
#include "Constants.h"

using namespace QtcCppcheck::Internal;

OptionsPage::OptionsPage(Settings *settings, QObject *parent) :
  IOptionsPage(parent), settings_ (settings)
{
  Q_ASSERT (settings_ != NULL);
  setId (Constants::OPTIONS_PAGE_ID);
  setDisplayName (tr ("QtcCppcheck"));
  setCategory(Constants::OPTIONS_CATEGORY_ID);
  setDisplayCategory(QCoreApplication::translate("Analyzer", "Analyzer"));
  setCategoryIcon(QLatin1String (Constants::OPTIONS_CATEGORY_ICON));

  keyWords_ << QLatin1String ("cppcheck");
}

OptionsPage::~OptionsPage()
{
  settings_ = NULL;
}

bool OptionsPage::matches(const QString &searchKeyWord) const
{
  return keyWords_.contains (searchKeyWord);
}

QWidget *OptionsPage::widget()
{
  return createPage (NULL);
}

QWidget *OptionsPage::createPage(QWidget *parent)
{
  Q_ASSERT (settings_ != NULL);
  widget_ = new OptionsWidget (settings_, parent);
  Q_CHECK_PTR (widget_.data ());
  return widget_.data ();
}

void OptionsPage::apply()
{
  Q_ASSERT (!widget_.isNull ());
  widget_->applySettings ();
  emit settingsChanged ();
}

void OptionsPage::finish()
{

}

{'fraction_non_alphanumeric': 0.1388888888888889, 'fraction_numerical': 0.0016835016835016834, 'mean_word_length': 6.618589743589744, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 8, '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': '6676321', 'n_tokens_mistral': 776, 'n_tokens_neox': 773, 'n_words': 152}