<commit_before>#include "viewer.h"

#include <QVBoxLayout>

#include <osgDB/ReadFile>
#include <osgQt/GraphicsWindowQt>

#include <osgGA/TrackballManipulator>
#include <osgViewer/ViewerEventHandlers>
#include <osgViewer/Viewer>
#include <osgQt/GraphicsWindowQt>

Viewer::Viewer() {
	m_viewer = new osgViewer::Viewer;

	m_camera = createCamera(50, 50, 600, 480);
	m_scene = osgDB::readNodeFile("data/models/cow.osg");

	m_viewer->setCamera(m_camera);
	m_viewer->setSceneData(m_scene);
	m_viewer->addEventHandler(new osgViewer::StatsHandler);
	m_viewer->setCameraManipulator(new osgGA::TrackballManipulator);

	// Use single thread here to avoid known issues under Linux
	m_viewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);

	osgQt::GraphicsWindowQt* gw =
		dynamic_cast<osgQt::GraphicsWindowQt*>(m_camera->getGraphicsContext());
	if (gw)
	{
		QVBoxLayout* layout = new QVBoxLayout;
		// setting all margins to 0 make widget disappear...why?
		layout->setContentsMargins(1,1,1,1);
		layout->addWidget(gw->getGLWidget());
		setLayout(layout);
	}

	connect(&m_timer, SIGNAL(timeout()), this, SLOT(update()));
	m_timer.start(40);
}

void Viewer::paintEvent(QPaintEvent* event)
{
	m_viewer->frame();
}
<commit_msg>test line endings<commit_after>#include "viewer.h"

#include <QVBoxLayout>

#include <osgDB/ReadFile>
#include <osgQt/GraphicsWindowQt>

#include <osgGA/TrackballManipulator>
#include <osgViewer/ViewerEventHandlers>
#include <osgViewer/Viewer>
#include <osgQt/GraphicsWindowQt>

Viewer::Viewer() {
	m_viewer = new osgViewer::Viewer;

	m_camera = createCamera(50, 50, 600, 480);
	//m_scene = osgDB::readNodeFile("data/models/cow.osg");

	m_viewer->setCamera(m_camera);
	m_viewer->setSceneData(m_scene);
	m_viewer->addEventHandler(new osgViewer::StatsHandler);
	m_viewer->setCameraManipulator(new osgGA::TrackballManipulator);

	// Use single thread here to avoid known issues under Linux
	m_viewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);

	osgQt::GraphicsWindowQt* gw =
		dynamic_cast<osgQt::GraphicsWindowQt*>(m_camera->getGraphicsContext());
	if (gw)
	{
		QVBoxLayout* layout = new QVBoxLayout;
		// setting all margins to 0 make widget disappear...why?
		layout->setContentsMargins(1,1,1,1);
		layout->addWidget(gw->getGLWidget());
		setLayout(layout);
	}

	connect(&m_timer, SIGNAL(timeout()), this, SLOT(update()));
	m_timer.start(40);
}

void Viewer::paintEvent(QPaintEvent* event)
{
	m_viewer->frame();
}

{'fraction_non_alphanumeric': 0.1455437448896157, 'fraction_numerical': 0.013900245298446443, 'mean_word_length': 6.919093851132686, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 39, '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': '6768788', 'n_tokens_mistral': 963, 'n_tokens_neox': 917, 'n_words': 148}