Fix Kontact crash in Akregator part due to identical destructor signatures being generated for two unrelated classes

This relates to Bug 2235
Fix a slew of non-virtual destructor problems
pull/21/head r14.0.0
Timothy Pearson 10 years ago
parent 96cf12b16a
commit 6e9f8cb704

@ -68,6 +68,7 @@ class ActionManagerImpl::NodeSelectVisitor : public TreeNodeVisitor
{ {
public: public:
NodeSelectVisitor(ActionManagerImpl* manager) : m_manager(manager) {} NodeSelectVisitor(ActionManagerImpl* manager) : m_manager(manager) {}
virtual ~NodeSelectVisitor() {}
virtual bool visitFeed(Feed* node) virtual bool visitFeed(Feed* node)
{ {

@ -91,6 +91,7 @@ Article::Article(const TQString& guid, Feed* feed) : d(new Private)
d->guid = guid; d->guid = guid;
d->archive = Backend::Storage::getInstance()->archiveFor(feed->xmlUrl()); d->archive = Backend::Storage::getInstance()->archiveFor(feed->xmlUrl());
d->status = 0; d->status = 0;
d->hash = 0;
} }
void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) void Article::initialize(RSS::Article article, Backend::FeedStorage* archive)
@ -358,7 +359,6 @@ KURL Article::commentsLink() const
int Article::comments() const int Article::comments() const
{ {
return d->archive->comments(d->guid); return d->archive->comments(d->guid);
} }

@ -144,6 +144,10 @@ class TagMatcher : public AbstractMatcher
class AbstractAction class AbstractAction
{ {
public:
AbstractAction() {}
virtual ~AbstractAction() {}
public: public:
virtual void exec(Article& article) = 0; virtual void exec(Article& article) = 0;

@ -89,6 +89,7 @@ class ArticleListView::ColumnLayoutVisitor : public TreeNodeVisitor
{ {
public: public:
ColumnLayoutVisitor(ArticleListView* view) : m_view(view) {} ColumnLayoutVisitor(ArticleListView* view) : m_view(view) {}
virtual ~ColumnLayoutVisitor() {}
virtual bool visitTagNode(TagNode* /*node*/) virtual bool visitTagNode(TagNode* /*node*/)
{ {

@ -66,6 +66,7 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
public: public:
ShowSummaryVisitor(ArticleViewer* view) : m_view(view) {} ShowSummaryVisitor(ArticleViewer* view) : m_view(view) {}
virtual ~ShowSummaryVisitor() {}
virtual bool visitFeed(Feed* node) virtual bool visitFeed(Feed* node)
{ {

@ -52,6 +52,7 @@ class FeedList::AddNodeVisitor : public TreeNodeVisitor
{ {
public: public:
AddNodeVisitor(FeedList* list) : m_list(list) {} AddNodeVisitor(FeedList* list) : m_list(list) {}
virtual ~AddNodeVisitor() {}
virtual bool visitFeed(Feed* node) virtual bool visitFeed(Feed* node)
@ -69,6 +70,7 @@ class FeedList::RemoveNodeVisitor : public TreeNodeVisitor
{ {
public: public:
RemoveNodeVisitor(FeedList* list) : m_list(list) {} RemoveNodeVisitor(FeedList* list) : m_list(list) {}
virtual ~RemoveNodeVisitor() {}
virtual bool visitFeed(Feed* node) virtual bool visitFeed(Feed* node)
{ {

@ -78,6 +78,7 @@ class NodeListView::ConnectNodeVisitor : public TreeNodeVisitor
{ {
public: public:
ConnectNodeVisitor(NodeListView* view) : m_view(view) {} ConnectNodeVisitor(NodeListView* view) : m_view(view) {}
virtual ~ConnectNodeVisitor() {}
virtual bool visitTreeNode(TreeNode* node) virtual bool visitTreeNode(TreeNode* node)
{ {
@ -114,6 +115,7 @@ class NodeListView::DisconnectNodeVisitor : public TreeNodeVisitor
{ {
public: public:
DisconnectNodeVisitor(NodeListView* view) : m_view(view) {} DisconnectNodeVisitor(NodeListView* view) : m_view(view) {}
virtual ~DisconnectNodeVisitor() {}
virtual bool visitTagNode(TagNode* node) virtual bool visitTagNode(TagNode* node)
{ {
@ -153,6 +155,7 @@ class NodeListView::DeleteItemVisitor : public TreeNodeVisitor
public: public:
DeleteItemVisitor(NodeListView* view) : m_view(view) {} DeleteItemVisitor(NodeListView* view) : m_view(view) {}
virtual ~DeleteItemVisitor() {}
virtual bool visitTreeNode(TreeNode* node) virtual bool visitTreeNode(TreeNode* node)
{ {
@ -204,6 +207,7 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
{ {
public: public:
CreateItemVisitor(NodeListView* view) : m_view(view) {} CreateItemVisitor(NodeListView* view) : m_view(view) {}
virtual ~CreateItemVisitor() {}
virtual bool visitTagNode(TagNode* node) virtual bool visitTagNode(TagNode* node)
{ {

@ -8,11 +8,13 @@ namespace Akregator {
Plugin::Plugin() Plugin::Plugin()
{} {
}
Plugin::~Plugin() Plugin::~Plugin()
{} {
}
void void

@ -14,7 +14,6 @@
#include <tqmap.h> #include <tqmap.h>
#include <tqstring.h> #include <tqstring.h>
namespace Akregator namespace Akregator
{ {
// class PluginConfig; // class PluginConfig;

@ -93,6 +93,7 @@ class SimpleNodeSelector::NodeVisitor : public TreeNodeVisitor
public: public:
NodeVisitor(SimpleNodeSelector* view) : TreeNodeVisitor(), m_view(view) {} NodeVisitor(SimpleNodeSelector* view) : TreeNodeVisitor(), m_view(view) {}
virtual ~NodeVisitor() {}
void createItems(TreeNode* node) void createItems(TreeNode* node)
{ {

@ -39,6 +39,9 @@ class AKREGATOR_EXPORT StorageFactory
{ {
public: public:
StorageFactory() {}
virtual ~StorageFactory() {}
/** identifier of the storage type, like "metakit", "postgres" etc. For use in /** identifier of the storage type, like "metakit", "postgres" etc. For use in
configuration files. Must not contain spaces or special characters. configuration files. Must not contain spaces or special characters.
*/ */

@ -59,7 +59,6 @@ class KDE_EXPORT Plugin : public TQObject, virtual public KXMLGUIClient
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
Creates a new Plugin, note that name parameter name is required if Creates a new Plugin, note that name parameter name is required if
@ -71,7 +70,7 @@ class KDE_EXPORT Plugin : public TQObject, virtual public KXMLGUIClient
*/ */
Plugin( Core *core, TQObject *parent, const char *name ); Plugin( Core *core, TQObject *parent, const char *name );
~Plugin(); virtual ~Plugin();
/** /**
Sets the identifier. Sets the identifier.

@ -63,6 +63,8 @@ class KDE_EXPORT UniqueAppHandler : public DCOPObject
class UniqueAppHandlerFactoryBase class UniqueAppHandlerFactoryBase
{ {
public: public:
UniqueAppHandlerFactoryBase() {}
virtual ~UniqueAppHandlerFactoryBase() {}
virtual UniqueAppHandler* createHandler( Plugin* ) = 0; virtual UniqueAppHandler* createHandler( Plugin* ) = 0;
}; };

@ -44,14 +44,13 @@
#include "akregator_plugin.h" #include "akregator_plugin.h"
namespace Akregator { namespace Akregator {
typedef KGenericFactory<Akregator::Plugin, Kontact::Core > PluginFactory; typedef KGenericFactory<Akregator::AkregatorPlugin, Kontact::Core > PluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_akregator, K_EXPORT_COMPONENT_FACTORY( libkontact_akregator,
PluginFactory( "kontact_akregator" ) ) PluginFactory( "kontact_akregator" ) )
Plugin::Plugin( Kontact::Core *core, const char *, const TQStringList& ) AkregatorPlugin::AkregatorPlugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, TQT_TQOBJECT(core), "akregator" ), m_stub(0) : Kontact::Plugin( core, TQT_TQOBJECT(core), "akregator" ), m_stub(0)
{ {
setInstance( PluginFactory::instance() ); setInstance( PluginFactory::instance() );
insertNewAction( new TDEAction( i18n( "New Feed..." ), "bookmark_add", CTRL+SHIFT+Key_F, this, TQT_SLOT( addFeed() ), actionCollection(), "feed_new" ) ); insertNewAction( new TDEAction( i18n( "New Feed..." ), "bookmark_add", CTRL+SHIFT+Key_F, this, TQT_SLOT( addFeed() ), actionCollection(), "feed_new" ) );
@ -60,22 +59,22 @@ Plugin::Plugin( Kontact::Core *core, const char *, const TQStringList& )
new Kontact::UniqueAppHandlerFactory<Akregator::UniqueAppHandler>(), this ); new Kontact::UniqueAppHandlerFactory<Akregator::UniqueAppHandler>(), this );
} }
Plugin::~Plugin() AkregatorPlugin::~AkregatorPlugin()
{ {
} }
bool Plugin::isRunningStandalone() bool AkregatorPlugin::isRunningStandalone()
{ {
return m_uniqueAppWatcher->isRunningStandalone(); return m_uniqueAppWatcher->isRunningStandalone();
} }
TQStringList Plugin::invisibleToolbarActions() const TQStringList AkregatorPlugin::invisibleToolbarActions() const
{ {
return TQStringList( "file_new_contact" ); return TQStringList( "file_new_contact" );
} }
Akregator::AkregatorPartIface_stub *Plugin::interface() Akregator::AkregatorPartIface_stub *AkregatorPlugin::interface()
{ {
if ( !m_stub ) { if ( !m_stub ) {
part(); part();
@ -86,7 +85,7 @@ Akregator::AkregatorPartIface_stub *Plugin::interface()
} }
MyBasePart* Plugin::createPart() MyBasePart* AkregatorPlugin::createPart()
{ {
MyBasePart* p = loadPart(); MyBasePart* p = loadPart();
@ -98,24 +97,24 @@ MyBasePart* Plugin::createPart()
} }
void Plugin::showPart() void AkregatorPlugin::showPart()
{ {
core()->selectPlugin(this); core()->selectPlugin(this);
} }
void Plugin::addFeed() void AkregatorPlugin::addFeed()
{ {
interface()->addFeed(); interface()->addFeed();
} }
TQStringList Plugin::configModules() const TQStringList AkregatorPlugin::configModules() const
{ {
TQStringList modules; TQStringList modules;
modules << "PIM/akregator.desktop"; modules << "PIM/akregator.desktop";
return modules; return modules;
} }
void Plugin::readProperties( TDEConfig *config ) void AkregatorPlugin::readProperties( TDEConfig *config )
{ {
if ( part() ) { if ( part() ) {
Akregator::Part *myPart = static_cast<Akregator::Part*>( part() ); Akregator::Part *myPart = static_cast<Akregator::Part*>( part() );
@ -123,7 +122,7 @@ void Plugin::readProperties( TDEConfig *config )
} }
} }
void Plugin::saveProperties( TDEConfig *config ) void AkregatorPlugin::saveProperties( TDEConfig *config )
{ {
if ( part() ) { if ( part() ) {
Akregator::Part *myPart = static_cast<Akregator::Part*>( part() ); Akregator::Part *myPart = static_cast<Akregator::Part*>( part() );

@ -48,15 +48,14 @@ class UniqueAppHandler : public Kontact::UniqueAppHandler
}; };
class Plugin : public Kontact::Plugin class AkregatorPlugin : public Kontact::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
Plugin( Kontact::Core *core, const char *name, AkregatorPlugin( Kontact::Core *core, const char *name,
const TQStringList & ); const TQStringList & );
~Plugin(); virtual ~AkregatorPlugin();
int weight() const { return 475; } int weight() const { return 475; }

@ -46,10 +46,9 @@ class KAddressbookPlugin : public Kontact::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
KAddressbookPlugin( Kontact::Core *core, const char *name, const TQStringList& ); KAddressbookPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KAddressbookPlugin(); virtual ~KAddressbookPlugin();
virtual bool createDCOPInterface( const TQString &serviceType ); virtual bool createDCOPInterface( const TQString &serviceType );
virtual bool isRunningStandalone(); virtual bool isRunningStandalone();

@ -38,11 +38,10 @@ class KarmPlugin : public Kontact::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
KarmPlugin( Kontact::Core *core, const char *name, KarmPlugin( Kontact::Core *core, const char *name,
const TQStringList & ); const TQStringList & );
~KarmPlugin(); virtual ~KarmPlugin();
int weight() const { return 700; } int weight() const { return 700; }

@ -36,11 +36,10 @@ class KitchenSyncPlugin : public Kontact::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
KitchenSyncPlugin( Kontact::Core *core, const char *name, KitchenSyncPlugin( Kontact::Core *core, const char *name,
const TQStringList & ); const TQStringList & );
~KitchenSyncPlugin(); virtual ~KitchenSyncPlugin();
int weight() const { return 800; } int weight() const { return 800; }

@ -47,10 +47,9 @@ class KMailPlugin : public Kontact::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
KMailPlugin( Kontact::Core *core, const char *name, const TQStringList& ); KMailPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KMailPlugin(); virtual ~KMailPlugin();
virtual bool isRunningStandalone(); virtual bool isRunningStandalone();
virtual bool createDCOPInterface( const TQString& serviceType ); virtual bool createDCOPInterface( const TQString& serviceType );

@ -44,10 +44,9 @@ class KNodePlugin : public Kontact::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
KNodePlugin( Kontact::Core *core, const char *name, const TQStringList& ); KNodePlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KNodePlugin(); virtual ~KNodePlugin();
virtual bool createDCOPInterface( const TQString& serviceType ); virtual bool createDCOPInterface( const TQString& serviceType );
virtual bool isRunningStandalone(); virtual bool isRunningStandalone();

@ -33,10 +33,9 @@ class KNotesPlugin : public Kontact::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
KNotesPlugin( Kontact::Core *core, const char *name, const TQStringList& ); KNotesPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KNotesPlugin(); virtual ~KNotesPlugin();
virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget ); virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );

@ -37,10 +37,9 @@ class KOrganizerPlugin : public Kontact::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
KOrganizerPlugin( Kontact::Core *core, const char *name, const TQStringList& ); KOrganizerPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KOrganizerPlugin(); virtual ~KOrganizerPlugin();
virtual bool createDCOPInterface( const TQString& serviceType ); virtual bool createDCOPInterface( const TQString& serviceType );
virtual bool isRunningStandalone(); virtual bool isRunningStandalone();

@ -43,6 +43,10 @@ KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const TQStrin
} }
KPilotPlugin::~KPilotPlugin()
{
}
Kontact::Summary *KPilotPlugin::createSummaryWidget( TQWidget *parentWidget ) Kontact::Summary *KPilotPlugin::createSummaryWidget( TQWidget *parentWidget )
{ {
return new SummaryWidget( parentWidget ); return new SummaryWidget( parentWidget );

@ -32,6 +32,7 @@ class KPilotPlugin : public Kontact::Plugin
public: public:
KPilotPlugin( Kontact::Core *core, const char *name, const TQStringList& ); KPilotPlugin( Kontact::Core *core, const char *name, const TQStringList& );
KPilotPlugin(); KPilotPlugin();
virtual ~KPilotPlugin();
virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget ); virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );

@ -37,6 +37,10 @@ NewsTickerPlugin::NewsTickerPlugin( Kontact::Core *core, const char *name, const
setInstance( NewsTickerPluginFactory::instance() ); setInstance( NewsTickerPluginFactory::instance() );
} }
NewsTickerPlugin::~NewsTickerPlugin()
{
}
Kontact::Summary *NewsTickerPlugin::createSummaryWidget( TQWidget* parentWidget ) Kontact::Summary *NewsTickerPlugin::createSummaryWidget( TQWidget* parentWidget )
{ {
return new SummaryWidget( parentWidget ); return new SummaryWidget( parentWidget );

@ -30,6 +30,7 @@ class NewsTickerPlugin : public Kontact::Plugin
public: public:
NewsTickerPlugin( Kontact::Core *core, const char *name, const TQStringList& ); NewsTickerPlugin( Kontact::Core *core, const char *name, const TQStringList& );
NewsTickerPlugin(); NewsTickerPlugin();
virtual ~NewsTickerPlugin();
virtual Kontact::Summary *createSummaryWidget( TQWidget* parentWidget ); virtual Kontact::Summary *createSummaryWidget( TQWidget* parentWidget );

@ -33,7 +33,7 @@ class SpecialdatesPlugin : public Kontact::Plugin
{ {
public: public:
SpecialdatesPlugin( Kontact::Core *core, const char *name, const TQStringList& ); SpecialdatesPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~SpecialdatesPlugin(); virtual ~SpecialdatesPlugin();
int weight() const { return 310; } int weight() const { return 310; }

@ -1,7 +1,7 @@
/* /*
This file is part of KDE Kontact. This file is part of KDE Kontact.
Copyright (C) 2003 Sven Lüppken <sven@kde.org> Copyright (C) 2003 Sven L<EFBFBD>ppken <sven@kde.org>
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
@ -39,7 +39,7 @@ class SummaryView : public Kontact::Plugin
public: public:
SummaryView( Kontact::Core *core, const char *name, const TQStringList& ); SummaryView( Kontact::Core *core, const char *name, const TQStringList& );
~SummaryView(); virtual ~SummaryView();
int weight() const { return 100; } int weight() const { return 100; }

@ -39,7 +39,7 @@ class TestPlugin : public Kontact::Plugin
public: public:
TestPlugin(Kontact::Core *core, const char *name, const TQStringList &); TestPlugin(Kontact::Core *core, const char *name, const TQStringList &);
~TestPlugin(); virtual ~TestPlugin();
protected: protected:
KParts::Part* createPart(); KParts::Part* createPart();

@ -37,6 +37,10 @@ WeatherPlugin::WeatherPlugin( Kontact::Core *core, const char *name, const TQStr
setInstance( WeatherPluginFactory::instance() ); setInstance( WeatherPluginFactory::instance() );
} }
WeatherPlugin::~WeatherPlugin()
{
}
Kontact::Summary *WeatherPlugin::createSummaryWidget( TQWidget *parentWidget ) Kontact::Summary *WeatherPlugin::createSummaryWidget( TQWidget *parentWidget )
{ {
return new SummaryWidget( parentWidget ); return new SummaryWidget( parentWidget );

@ -30,6 +30,7 @@ class WeatherPlugin : public Kontact::Plugin
public: public:
WeatherPlugin( Kontact::Core *core, const char *name, const TQStringList& ); WeatherPlugin( Kontact::Core *core, const char *name, const TQStringList& );
WeatherPlugin(); WeatherPlugin();
virtual ~WeatherPlugin();
virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget ); virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );

@ -38,6 +38,7 @@ class KDE_EXPORT CellItem
: mSubCells( 0 ), mSubCell( -1 ) : mSubCells( 0 ), mSubCell( -1 )
{ {
} }
virtual ~CellItem() {}
void setSubCells( int v ) { mSubCells = v; } void setSubCells( int v ) { mSubCells = v; }
int subCells() const { return mSubCells; } int subCells() const { return mSubCells; }

@ -50,6 +50,8 @@ public:
class WinObjHandle class WinObjHandle
{ {
public: public:
WinObjHandle() {}
virtual ~WinObjHandle() {}
virtual void apply( TQPainter& p ) = 0; virtual void apply( TQPainter& p ) = 0;
}; };

@ -77,6 +77,7 @@ class LIBKCAL_EXPORT CalendarResources :
DestinationPolicy( CalendarResourceManager *manager, DestinationPolicy( CalendarResourceManager *manager,
TQWidget *parent = 0 ) : TQWidget *parent = 0 ) :
mManager( manager ), mParent( parent ) {} mManager( manager ), mParent( parent ) {}
virtual ~DestinationPolicy() {}
virtual ResourceCalendar *destination( Incidence *incidence ) = 0; virtual ResourceCalendar *destination( Incidence *incidence ) = 0;
virtual TQWidget *parent() { return mParent; } virtual TQWidget *parent() { return mParent; }
@ -100,6 +101,7 @@ class LIBKCAL_EXPORT CalendarResources :
StandardDestinationPolicy( CalendarResourceManager *manager, StandardDestinationPolicy( CalendarResourceManager *manager,
TQWidget *parent = 0 ) : TQWidget *parent = 0 ) :
DestinationPolicy( manager, parent ) {} DestinationPolicy( manager, parent ) {}
virtual ~StandardDestinationPolicy() {}
ResourceCalendar *destination( Incidence *incidence ); ResourceCalendar *destination( Incidence *incidence );
@ -117,6 +119,7 @@ class LIBKCAL_EXPORT CalendarResources :
AskDestinationPolicy( CalendarResourceManager *manager, AskDestinationPolicy( CalendarResourceManager *manager,
TQWidget *parent = 0 ) : TQWidget *parent = 0 ) :
DestinationPolicy( manager, parent ) {} DestinationPolicy( manager, parent ) {}
virtual ~AskDestinationPolicy() {}
ResourceCalendar *destination( Incidence *incidence ); ResourceCalendar *destination( Incidence *incidence );

@ -34,6 +34,10 @@ AlarmClient::AlarmClient()
kdDebug(5850) << "AlarmClient::AlarmClient()" << endl; kdDebug(5850) << "AlarmClient::AlarmClient()" << endl;
} }
AlarmClient::~AlarmClient()
{
}
void AlarmClient::startDaemon() void AlarmClient::startDaemon()
{ {
if ( kapp->dcopClient()->isApplicationRegistered( "korgac" ) ) { if ( kapp->dcopClient()->isApplicationRegistered( "korgac" ) ) {

@ -29,6 +29,7 @@ class AlarmClient
{ {
public: public:
AlarmClient(); AlarmClient();
virtual ~AlarmClient();
/** /**
Start alarm daemon. Start alarm daemon.

@ -35,6 +35,8 @@ class CreateImapAccount : public TDEConfigPropagator::Change
class CustomWriter class CustomWriter
{ {
public: public:
CustomWriter() {}
virtual ~CustomWriter() {}
virtual void writeFolder( TDEConfig &, int folderId ) = 0; virtual void writeFolder( TDEConfig &, int folderId ) = 0;
virtual void writeIds( int accountId, int transportId ) = 0; virtual void writeIds( int accountId, int transportId ) = 0;
}; };

Loading…
Cancel
Save