<commit_before>#include "pool-tab.h"
#include "ui_pool-tab.h"
#include <QJsonArray>
#include "ui/textedit.h"
#include "searchwindow.h"
#include "mainwindow.h"
#include "models/page.h"
#include "models/site.h"
#include "downloader/download-query-group.h"
#include "helpers.h"


poolTab::poolTab(QMap<QString, Site*> *sites, Profile *profile, mainWindow *parent)
	: searchTab(sites, profile, parent), ui(new Ui::poolTab)
{
	ui->setupUi(this);
	ui->widgetMeant->hide();

	// UI members for SearchTab class
	ui_checkMergeResults = nullptr;
	ui_progressMergeResults = nullptr;
	ui_spinPage = ui->spinPage;
	ui_spinImagesPerPage = ui->spinImagesPerPage;
	ui_spinColumns = ui->spinColumns;
	ui_widgetMeant = ui->widgetMeant;
	ui_labelMeant = ui->labelMeant;
	ui_layoutResults = ui->layoutResults;
	ui_layoutSourcesList = ui->layoutSourcesList;
	ui_buttonHistoryBack = ui->buttonHistoryBack;
	ui_buttonHistoryNext = ui->buttonHistoryNext;
	ui_buttonNextPage = ui->buttonNextPage;
	ui_buttonLastPage = ui->buttonLastPage;
	ui_buttonGetAll = ui->buttonGetAll;
	ui_buttonGetPage = ui->buttonGetpage;
	ui_buttonGetSel = ui->buttonGetSel;
	ui_buttonFirstPage = ui->buttonFirstPage;
	ui_buttonPreviousPage = ui->buttonPreviousPage;
	ui_buttonEndlessLoad = nullptr;
	ui_scrollAreaResults = ui->scrollAreaResults;

	QStringList sources = m_sites->keys();
	for (const QString &source : sources)
	{ ui->comboSites->addItem(source); }

	// Search field<commit_msg>Fix crash when using pool tab (fix #1099)<commit_after>#include "pool-tab.h"
#include "ui_pool-tab.h"
#include <QJsonArray>
#include "ui/textedit.h"
#include "searchwindow.h"
#include "mainwindow.h"
#include "models/page.h"
#include "models/site.h"
#include "downloader/download-query-group.h"
#include "helpers.h"


poolTab::poolTab(QMap<QString, Site*> *sites, Profile *profile, mainWindow *parent)
	: searchTab(sites, profile, parent), ui(new Ui::poolTab)
{
	ui->setupUi(this);
	ui->widgetMeant->hide();

	// UI members for SearchTab class
	ui_checkMergeResults = nullptr;
	ui_progressMergeResults = nullptr;
	ui_stackedMergeResults = nullptr;
	ui_spinPage = ui->spinPage;
	ui_spinImagesPerPage = ui->spinImagesPerPage;
	ui_spinColumns = ui->spinColumns;
	ui_widgetMeant = ui->widgetMeant;
	ui_labelMeant = ui->labelMeant;
	ui_layoutResults = ui->layoutResults;
	ui_layoutSourcesList = ui->layoutSourcesList;
	ui_buttonHistoryBack = ui->buttonHistoryBack;
	ui_buttonHistoryNext = ui->buttonHistoryNext;
	ui_buttonNextPage = ui->buttonNextPage;
	ui_buttonLastPage = ui->buttonLastPage;
	ui_buttonGetAll = ui->buttonGetAll;
	ui_buttonGetPage = ui->buttonGetpage;
	ui_buttonGetSel = ui->buttonGetSel;
	ui_buttonFirstPage = ui->buttonFirstPage;
	ui_buttonPreviousPage = ui->buttonPreviousPage;
	ui_buttonEndlessLoad = nullptr;
	ui_scrollAreaResults = ui->scrollAreaResults;

	QStringList sources = m_sites->keys();
	for (const QString &source : sources)
	{ ui->comboSites->addItem(source); }

	// Search field
{'fraction_non_alphanumeric': 0.12563494751100576, 'fraction_numerical': 0.0013545546901456147, 'mean_word_length': 6.385, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5254042', 'n_tokens_mistral': 1039, 'n_tokens_neox': 1019, 'n_words': 188}