Commit 1d9764c4 authored by Christian Loose's avatar Christian Loose

* Make sure CervisiaPart's destructor gets called

* Don't call queryExit() twice
* Remove unneeded slotExit() method

svn path=/trunk/kdesdk/cervisia/; revision=197396
parent aeb8da57
......@@ -122,8 +122,6 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName,
CervisiaPart::~CervisiaPart()
{
// stop the cvs DCOP service
// FIXME: It seems as if this destructor isn't always called
// i.e. File->Quit
cvsService.send("quit");
}
......
......@@ -23,6 +23,7 @@
#include <khelpmenu.h>
#include <kkeydialog.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kstdaction.h>
#include <kstatusbar.h>
#include <kurl.h>
......@@ -35,8 +36,21 @@ CervisiaShell::CervisiaShell( const char *name )
{
setXMLFile( "cervisiashellui.rc" );
part = new CervisiaPart( this, "cervisiaview", this, "cervisiapart" );
setCentralWidget( part->widget() );
KLibFactory* factory = KLibLoader::self()->factory("libcervisiapart");
if( factory )
{
part = static_cast<CervisiaPart*>(factory->create(this,
"cervisiaview", "CervisiaPart"));
if( part )
setCentralWidget(part->widget());
}
else
{
KMessageBox::error(this, "Could not find our Part!");
kapp->quit();
return;
}
setupActions();
......@@ -91,7 +105,7 @@ void CervisiaShell::setupActions()
action->setToolTip( hint );
action->setWhatsThis( hint );
action = KStdAction::quit( this, SLOT( slotExit() ), actionCollection() );
action = KStdAction::quit( kapp, SLOT( quit() ), actionCollection() );
hint = i18n("Exits Cervisia");
action->setToolTip( hint );
action->setWhatsThis( hint );
......@@ -143,12 +157,6 @@ void CervisiaShell::slotChangeFilterStatus(QString status)
filterLabel->setText(status);
}
void CervisiaShell::slotExit()
{
(void) queryExit();
kapp->quit();
}
bool CervisiaShell::queryExit()
{
KConfig *config = part->config();
......
......@@ -38,7 +38,6 @@ public:
public slots:
void slotConfigureKeys();
void slotConfigureToolBars();
void slotExit();
protected slots:
void slotNewToolbarConfig();
......
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