<commit_before>// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//

#include <BALL/VIEW/KERNEL/serverWidget.h>
#include <BALL/CONCEPT/client.h>
#include <BALL/VIEW/KERNEL/mainControl.h>
#include <BALL/VIEW/DIALOGS/preferences.h>
#include <BALL/VIEW/DIALOGS/serverPreferences.h>
#include <BALL/VIEW/KERNEL/message.h>
#include <BALL/FORMAT/INIFile.h>
#include <BALL/SYSTEM/systemCalls.h>

#include <QtGui/qstatusbar.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qtooltip.h>

using namespace std;

namespace BALL
{
	namespace VIEW
	{
		const char* ServerWidget::mini_ray_xpm_[] =
		{
        "16 14 4 1",
        "   c None",
        ".  c black",
        "X  c yellow",
        "o  c gray50",
        "     .........  ",
        "     .XXXXXX.o  ",
        "    .XXXXXX.o   ",
        "    .XXXXX.o    ",
        "   .XXXXX.o     ",
        "   .XXXX.....   ",
        "  .XXXXXXXX.o   ",
        "  .....XXX.o    ",
        "   oo.XXX.o     ",
        "     .XX.o      ",
        "    .XX.o       ",
        "    .X.o        ",
        "   .X.o         ",
        "   ..o          "
		};        
  
		ServerWidget::NotCompositeObject::NotCompositeObject(const char* file, int line)
			:	Exception::GeneralException(file, line, string("NotCompositeObject"), string("received an non composite object!"))
		{
		}

		ServerWidget::ServerWidget(QWidget* parent, const char* name)
			:	QObject(parent),
				ModularWidget(name),
				server_(this, VIEW_DEFAULT_PORT, true),
				object_creator_(0),
				port_(VIEW_DEFAULT_PORT),
				server_preferences_(0),
				server_icon_(0)
		{
			#ifdef BALL_VIEW_DEBUG
				Log.error() << "new ServerWidget " << this << std::endl;
			#endif

			// register ModularWidget
			registerWidget(this);
			
			unregisterObjectCreator();

			server_.setMainControl(getMainControl());

			connect(this, SIGNAL(lockRequested(bool)), this, SLOT(handleLocking(bool)));
		}

		ServerWidget::ServerWidget(const ServerWidget& s)
			: QObject(),
				ModularWidget(),
				server_(this, VIEW_DEFAULT_PORT, true)
		{
			// register ModularWidget
			registerWidget(this);
			
			unregisterObjectCreator();
<commit_msg>Fixed a compile time warning in ServerWidget.<commit_after>// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//

#include <BALL/VIEW/KERNEL/serverWidget.h>
#include <BALL/CONCEPT/client.h>
#include <BALL/VIEW/KERNEL/mainControl.h>
#include <BALL/VIEW/DIALOGS/preferences.h>
#include <BALL/VIEW/DIALOGS/serverPreferences.h>
#include <BALL/VIEW/KERNEL/message.h>
#include <BALL/FORMAT/INIFile.h>
#include <BALL/SYSTEM/systemCalls.h>

#include <QtGui/qstatusbar.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qtooltip.h>

using namespace std;

namespace BALL
{
	namespace VIEW
	{
		const char* ServerWidget::mini_ray_xpm_[] =
		{
        "16 14 4 1",
        "   c None",
        ".  c black",
        "X  c yellow",
        "o  c gray50",
        "     .........  ",
        "     .XXXXXX.o  ",
        "    .XXXXXX.o   ",
        "    .XXXXX.o    ",
        "   .XXXXX.o     ",
        "   .XXXX.....   ",
        "  .XXXXXXXX.o   ",
        "  .....XXX.o    ",
        "   oo.XXX.o     ",
        "     .XX.o      ",
        "    .XX.o       ",
        "    .X.o        ",
        "   .X.o         ",
        "   ..o          "
		};        
  
		ServerWidget::NotCompositeObject::NotCompositeObject(const char* file, int line)
			:	Exception::GeneralException(file, line, string("NotCompositeObject"), string("received an non composite object!"))
		{
		}

		ServerWidget::ServerWidget(QWidget* parent, const char* name)
			:	QObject(parent),
				ModularWidget(name),
				server_(this, VIEW_DEFAULT_PORT, true),
				object_creator_(0),
				port_(VIEW_DEFAULT_PORT),
				server_preferences_(0),
				server_icon_(0)
		{
			#ifdef BALL_VIEW_DEBUG
				Log.error() << "new ServerWidget " << this << std::endl;
			#endif

			// register ModularWidget
			registerWidget(this);
			
			unregisterObjectCreator();

			server_.setMainControl(getMainControl());

			connect(this, SIGNAL(lockRequested(bool)), this, SLOT(handleLocking(bool)));
		}

		ServerWidget::ServerWidget(const ServerWidget& /*s*/)
			: QObject(),
				ModularWidget(),
				server_(this, VIEW_DEFAULT_PORT, true)
		{
			// register ModularWidget
			registerWidget(this);
			
			unregisterObjectCreator();

{'fraction_non_alphanumeric': 0.15626455519329296, 'fraction_numerical': 0.006054960409874243, 'mean_word_length': 2.2786259541984735, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '2249732', 'n_tokens_mistral': 1664, 'n_tokens_neox': 1489, 'n_words': 252}