KDE/kdevplatform/plugins/projectmanagerview
Andreas Pakulat
apaku at gmx.de
Thu Nov 22 23:11:06 UTC 2007
SVN commit 740306 by apaku:
Here's a really subtle bug:
Create a toolviewfactory and add it to the Ui in the plugin constructor. Then later in the constructor create something that the toolview will use. This works fine when the plugin is loaded during kdevelop startup (i.e. in this case when projects from a previous session are reloaded), but it breaks when the plugin is loaded in an already running kdevelop (i.e. no projects reloaded and you open one).
Fix is of course easy, move the toolview stuff to the end of the constructor, still I think we should find out why it breaks in one case and not the other and see if we can fix that.
CCMAIL:kdevelop-devel at kdevelop.org
M +4 -3 projectmanagerviewplugin.cpp
--- trunk/KDE/kdevplatform/plugins/projectmanagerview/projectmanagerviewplugin.cpp #740305:740306
@@ -94,8 +94,7 @@
ProjectManagerViewPlugin::ProjectManagerViewPlugin( QObject *parent, const QVariantList& )
: IPlugin( ProjectManagerFactory::componentData(), parent ), d(new ProjectManagerViewPluginPrivate)
{
- d->factory = new KDevProjectManagerViewFactory( this );
- core()->uiController()->addToolView( i18n("Project Manager"), d->factory );
+ d->buildSet = new ProjectBuildSetModel( this );
d->m_buildAll = new KAction( i18n("Build all Projects"), this );
connect( d->m_buildAll, SIGNAL(triggered()), this, SLOT(buildAllProjects()) );
actionCollection()->addAction( "project_buildall", d->m_buildAll );
@@ -115,8 +114,10 @@
d->m_prune = new KAction( i18n("Prune"), this );
connect( d->m_prune, SIGNAL(triggered()), this, SLOT(pruneProjectItems()) );
actionCollection()->addAction( "project_prune", d->m_prune );
- d->buildSet = new ProjectBuildSetModel( this );
setXMLFile( "kdevprojectmanagerview.rc" );
+ d->factory = new KDevProjectManagerViewFactory( this );
+ core()->uiController()->addToolView( i18n("Project Manager"), d->factory );
+
}
ProjectManagerViewPlugin::~ProjectManagerViewPlugin()
More information about the KDevelop-devel
mailing list