Fixes: Mem leak in the pro file parser.

Details:  ProFileCache be gone, as is ManagedProFile, not to be missed.
Drastically simplified how ownership works.
This commit is contained in:
dt
2008-12-02 18:14:06 +01:00
parent 4eaa9f5052
commit bd827512bb
14 changed files with 141 additions and 551 deletions

View File

@@ -37,7 +37,6 @@
#include "qt4projectmanagerplugin.h"
#include "qt4nodes.h"
#include "qt4project.h"
#include "profilecache.h"
#include "profilereader.h"
#include "qtversionmanager.h"
#include "qmakestep.h"
@@ -81,18 +80,33 @@ Qt4Manager::Qt4Manager(Qt4ProjectManagerPlugin *plugin, Core::ICore *core) :
m_core(core),
m_projectExplorer(0),
m_contextProject(0),
m_languageID(0),
m_proFileCache(0)
m_languageID(0)
{
m_languageID = m_core->uniqueIDManager()->
uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
m_proFileCache = new ProFileCache(this);
}
Qt4Manager::~Qt4Manager()
{
}
void Qt4Manager::registerProject(Qt4Project *project)
{
m_projects.append(project);
}
void Qt4Manager::unregisterProject(Qt4Project *project)
{
m_projects.removeOne(project);
}
void Qt4Manager::notifyChanged(const QString &name)
{
foreach(Qt4Project *pro, m_projects) {
pro->notifyChanged(name);
}
}
void Qt4Manager::init()
{
m_projectExplorer = m_core->pluginManager()->getObject<ProjectExplorer::ProjectExplorerPlugin>();