<commit_before>#include <ktextedit.h>
#include <kaction.h>
#include <kcolordialog.h>
#include <kglobalsettings.h>
#include <kfontdialog.h>
#include <kdebug.h>
#include <kconfig.h>
#include <kdeversion.h>
#include <qapplication.h>
#include <qclipboard.h>
#include <kparts/genericfactory.h>
#include <private/qrichtext_p.h>

#include "krichtexteditpart.h"
#include "krichtexteditpart.moc"
#include "kopeteprotocol.h"

typedef KParts::GenericFactory<KopeteRichTextEditPart> KopeteRichTextEditPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkopeterichtexteditpart,  KopeteRichTextEditPartFactory )

class KopeteTextEdit : public KTextEdit
{
	public:
		KopeteTextEdit( QWidget *parent ) : KTextEdit( parent ) {};
		const QTextCursor * cursor() { return textCursor(); };
};

KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *wparent, const char *wname, QObject*, const char*, const QStringList& )
	: KParts::ReadOnlyPart( wparent, wname ? wname : "rich_text_part" )
{
	KopeteRichTextEditPart::KopeteRichTextEditPart( wparent, wname, false );
}

KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *parent, const char *name, int capabilities )<commit_msg>Disable AccelOverride for the edit part so we don't have to hack around it elsewhere. For allowing use of Enter as send shortcut.<commit_after>#include <ktextedit.h>
#include <kaction.h>
#include <kcolordialog.h>
#include <kglobalsettings.h>
#include <kfontdialog.h>
#include <kdebug.h>
#include <kconfig.h>
#include <kdeversion.h>
#include <qapplication.h>
#include <qclipboard.h>
#include <qevent.h>
#include <kparts/genericfactory.h>
#include <private/qrichtext_p.h>

#include "krichtexteditpart.h"
#include "krichtexteditpart.moc"
#include "kopeteprotocol.h"

typedef KParts::GenericFactory<KopeteRichTextEditPart> KopeteRichTextEditPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkopeterichtexteditpart, KopeteRichTextEditPartFactory )

class KopeteTextEdit : public KTextEdit
{
public:
	KopeteTextEdit( QWidget *parent ) : KTextEdit( parent ) {}
	const QTextCursor * cursor() { return textCursor(); }
	bool event(QEvent *event)
	{
		// don't allow QTextEdit to override accels
		if ( event->type() == QEvent::AccelOverride )
			return QWidget::event(event);
		else
			return KTextEdit::event(event);
	}
};

KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *wparent, const char *wname, QObject*, const char*, const QStringList& )
	: KParts::ReadOnlyPart( wparent, wname ? wname : "rich_text_part" )
{
	KopeteRichTextEditPart::KopeteRichTextEditPart( wparent, wname, false );
}

KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *parent, const char *name, int capabilities )
{'fraction_non_alphanumeric': 0.11544284632853899, 'fraction_numerical': 0.0, 'mean_word_length': 7.233644859813084, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 31, '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': '2219702', 'n_tokens_mistral': 945, 'n_tokens_neox': 930, 'n_words': 199}