Skip to content

Commit

Permalink
[CORRECTIVE] Fix crash when adding generated files to file set of com…
Browse files Browse the repository at this point in the history
…ponent with no component instantiation in selected view. Fixes generators using generation control.
  • Loading branch information
hagantsa committed Feb 9, 2024
1 parent 6cc519b commit a924550
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
12 changes: 5 additions & 7 deletions Plugins/PluginSystem/GeneratorPlugin/GenerationControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ bool GenerationControl::writeDocuments()
}

// If instantiation exists, make sure that the instantiation refers to the file set.
QStringList fileSetRefs = instantiation->getFileSetReferenceStrings();

if (instantiation && !fileSetRefs.contains(fileSet->name()))
if (instantiation && instantiation->getFileSetReferenceStrings().contains(fileSet->name()))
{
QSharedPointer<FileSetRef> newFileSetRef(new FileSetRef());
newFileSetRef->setReference(fileSet->name());
Expand All @@ -106,7 +104,7 @@ bool GenerationControl::writeDocuments()
bool fails = false;

// Go through each potential file.
foreach(QSharedPointer<GenerationOutput> output, *outputControl_->getOutputs())
for (QSharedPointer<GenerationOutput> output : *outputControl_->getOutputs())
{
// Form the path from the determined output path plus determined file name.
QString absFilePath = outputControl_->getOutputPath() + "/" + output->fileName_;
Expand Down Expand Up @@ -235,7 +233,7 @@ void GenerationControl::initializeDocuments()
QList<QSharedPointer<GenerationOutput> > documents = factory_->prepareDesign(designs);

// Go through the parsed designs.
foreach(QSharedPointer<GenerationOutput> output, documents)
for (QSharedPointer<GenerationOutput> output : documents)
{
if (!output)
{
Expand Down Expand Up @@ -421,7 +419,7 @@ QSharedPointer<QList<QSharedPointer<View> > > GenerationControl::findPossibleVie
}

// Go through each view of the containing component and pick the eligible ones.
foreach(QSharedPointer<View> view, *input.component->getViews())
for (QSharedPointer<View> view : *input.component->getViews())
{
// Find the design instantiation of the view.
QSharedPointer<DesignInstantiation> dis = input.component->getModel()->
Expand Down Expand Up @@ -469,7 +467,7 @@ QSharedPointer<QList<QSharedPointer<View> > > GenerationControl::findPossibleVie
(new QList<QSharedPointer<View> >);

// In practice, go through each view, and if it is not hierarchical, append to the list.
foreach (QSharedPointer<View> view, *targetComponent->getViews())
for (QSharedPointer<View> view : *targetComponent->getViews())
{
if (!view->isHierarchical())
{
Expand Down
14 changes: 7 additions & 7 deletions version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
#ifndef VERSIONNO__H
#define VERSIONNO__H

#define VERSION_FULL 3.13.124.0
#define VERSION_FULL 3.13.125.0

#define VERSION_BASEYEAR 0
#define VERSION_DATE "2024-02-09"
#define VERSION_TIME "10:18:27"
#define VERSION_TIME "13:11:58"

#define VERSION_MAJOR 3
#define VERSION_MINOR 13
#define VERSION_BUILDNO 124
#define VERSION_BUILDNO 125
#define VERSION_EXTEND 0

#define VERSION_FILE 3,13,124,0
#define VERSION_PRODUCT 3,13,124,0
#define VERSION_FILESTR "3,13,124,0"
#define VERSION_PRODUCTSTR "3,13,124,0"
#define VERSION_FILE 3,13,125,0
#define VERSION_PRODUCT 3,13,125,0
#define VERSION_FILESTR "3,13,125,0"
#define VERSION_PRODUCTSTR "3,13,125,0"

#endif

0 comments on commit a924550

Please sign in to comment.