Commit d2581284 authored by Stephan Kulow's avatar Stephan Kulow

my first part ported - I hope :)

svn path=/trunk/KDE/kdesdk/cervisia/; revision=538963
parent 48cfdd18
......@@ -46,6 +46,9 @@
#include <kmessagebox.h>
#include <kglobal.h>
#include <ktoolinvocation.h>
#include <kactioncollection.h>
#include <ktoggleaction.h>
#include <krecentfilesaction.h>
#include "progressdlg.h"
#include "logdlg.h"
......@@ -84,8 +87,8 @@ using Cervisia::TagDialog;
K_EXPORT_COMPONENT_FACTORY( libcervisiapart, CervisiaFactory )
CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name, const QStringList& /*args*/ )
CervisiaPart::CervisiaPart( QWidget *parentWidget,
QObject *parent, const QStringList& /*args*/ )
: KParts::ReadOnlyPart( parent )
, hasRunningJob( false )
, opt_hideFiles( false )
......@@ -107,7 +110,6 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName,
, m_currentEditMenu(0)
, m_jobType(Unknown)
{
setObjectName(name);
KGlobal::locale()->insertCatalog("cervisia");
setInstance( CervisiaFactory::instance() );
......@@ -136,7 +138,7 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName,
{
Qt::Orientation o = splitHorz ? Qt::Vertical
: Qt::Horizontal;
splitter = new QSplitter(o, parentWidget, widgetName);
splitter = new QSplitter(o, parentWidget);
// avoid PartManager's warning that Part's window can't handle focus
splitter->setFocusPolicy( Qt::StrongFocus );
......
......@@ -57,8 +57,7 @@ class CervisiaPart : public KParts::ReadOnlyPart
Q_OBJECT
public:
CervisiaPart( QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name=0, const QStringList& args = QStringList());
CervisiaPart( QWidget *parentWidget, QObject *parent, const QStringList& args = QStringList());
virtual ~CervisiaPart();
/**
......
......@@ -32,6 +32,7 @@
#include <kstatusbar.h>
#include <kstdaction.h>
#include <kurl.h>
#include <kactioncollection.h>
CervisiaShell::CervisiaShell( const char *name )
......@@ -44,9 +45,11 @@ CervisiaShell::CervisiaShell( const char *name )
if( factory )
{
m_part = static_cast<KParts::ReadOnlyPart*>(factory->create(this,
"cervisiaview", "KParts::ReadOnlyPart"));
if( m_part )
"KParts::ReadOnlyPart"));
if( m_part ) {
m_part->setObjectName( "cervisiaview" );
setCentralWidget(m_part->widget());
}
}
else
{
......
......@@ -48,12 +48,9 @@ ProtocolView::ProtocolView(const DCOPCString& appId, QWidget *parent, const char
setFont(config->readEntry("ProtocolFont",QFont()));
config->setGroup("Colors");
QColor defaultColor = QColor(255, 130, 130);
conflictColor=config->readColorEntry("Conflict",&defaultColor);
defaultColor=QColor(130, 130, 255);
localChangeColor=config->readColorEntry("LocalChange",&defaultColor);
defaultColor=QColor(70, 210, 70);
remoteChangeColor=config->readColorEntry("RemoteChange",&defaultColor);
conflictColor=config->readEntry("Conflict", QColor(255, 130, 130));
localChangeColor=config->readEntry("LocalChange", QColor(130, 130, 255));
remoteChangeColor=config->readEntry("RemoteChange", QColor(70, 210, 70));
// create a DCOP stub for the non-concurrent cvs job
job = new CvsJob_stub(appId, "NonConcurrentJob");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment