forked from qt-creator/qt-creator
ProjectImporter: Fix deletion of directory data
Change-Id: I33c4fc25ab9c85dd8433281e2915a7d9428ea40b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -131,7 +131,9 @@ QList<BuildInfo *> ProjectImporter::import(const Utils::FileName &importPath, bo
|
||||
}
|
||||
}
|
||||
|
||||
qDeleteAll(dataList);
|
||||
foreach (auto *dd, dataList)
|
||||
deleteDirectoryData(dd);
|
||||
dataList.clear();
|
||||
|
||||
if (result.isEmpty() && !silent)
|
||||
QMessageBox::critical(Core::ICore::mainWindow(),
|
||||
|
||||
@@ -86,6 +86,8 @@ protected:
|
||||
// will get one of the results from examineDirectory
|
||||
virtual QList<BuildInfo *> buildInfoListForKit(const Kit *k, void *directoryData) const = 0;
|
||||
|
||||
virtual void deleteDirectoryData(void *directoryData) const = 0;
|
||||
|
||||
using KitSetupFunction = std::function<void(Kit *)>;
|
||||
ProjectExplorer::Kit *createTemporaryKit(const KitSetupFunction &setup) const;
|
||||
|
||||
|
||||
@@ -265,6 +265,11 @@ QList<BuildInfo *> QmakeProjectImporter::buildInfoListForKit(const Kit *k, void
|
||||
return result;
|
||||
}
|
||||
|
||||
void QmakeProjectImporter::deleteDirectoryData(void *directoryData) const
|
||||
{
|
||||
delete static_cast<DirectoryData *>(directoryData);
|
||||
}
|
||||
|
||||
static ToolChain *preferredToolChain(BaseQtVersion *qtVersion, const FileName &ms,
|
||||
const QMakeStepConfig::TargetArchConfig &archConfig)
|
||||
{
|
||||
|
||||
@@ -52,6 +52,7 @@ private:
|
||||
QList<ProjectExplorer::BuildInfo *> buildInfoListForKit(const ProjectExplorer::Kit *k,
|
||||
void *directoryData) const final;
|
||||
|
||||
void deleteDirectoryData(void *directoryData) const final;
|
||||
|
||||
ProjectExplorer::Kit *createTemporaryKit(const QtProjectImporter::QtVersionData &data,
|
||||
const Utils::FileName &parsedSpec,
|
||||
|
||||
Reference in New Issue
Block a user