Skip to content

Commit

Permalink
Do not pass platform triplets with '&' when compiling FMUs
Browse files Browse the repository at this point in the history
  • Loading branch information
atrosinenko authored and adeas31 committed Jan 30, 2019
1 parent 0c09579 commit de55ec3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions OMEdit/OMEditGUI/Options/OptionsDialog.cpp
Expand Up @@ -800,7 +800,7 @@ void OptionsDialog::readFMISettings()
while (QLayoutItem* pLayoutItem = mpFMIPage->getPlatformsGroupBox()->layout()->itemAt(i)) {
if (dynamic_cast<QCheckBox*>(pLayoutItem->widget())) {
QCheckBox *pPlatformCheckBox = dynamic_cast<QCheckBox*>(pLayoutItem->widget());
if (pPlatformCheckBox->text().compare(platform) == 0) {
if (pPlatformCheckBox->property(Helper::fmuPlatformNamePropertyId).toString().compare(platform) == 0) {
pPlatformCheckBox->setChecked(true);
break;
}
Expand Down Expand Up @@ -1299,7 +1299,7 @@ void OptionsDialog::saveFMISettings()
if (dynamic_cast<QCheckBox*>(pLayoutItem->widget())) {
QCheckBox *pPlatformCheckBox = dynamic_cast<QCheckBox*>(pLayoutItem->widget());
if (pPlatformCheckBox->isChecked()) {
platforms.append(pPlatformCheckBox->text());
platforms.append(pPlatformCheckBox->property(Helper::fmuPlatformNamePropertyId).toString());
}
}
i++;
Expand Down Expand Up @@ -4533,7 +4533,10 @@ FMIPage::FMIPage(OptionsDialog *pOptionsDialog)
pPlatformsLayout->addWidget(pPlatformNoteLabel);
pPlatformsLayout->addWidget(mpLinkingComboBox);
foreach (QString compiler, compilers) {
pPlatformsLayout->addWidget(new QCheckBox(compiler.left(compiler.lastIndexOf('-'))));
QString platformName = compiler.left(compiler.lastIndexOf('-'));
QCheckBox *pCheckBox = new QCheckBox(platformName);
pCheckBox->setProperty(Helper::fmuPlatformNamePropertyId, platformName);
pPlatformsLayout->addWidget(pCheckBox);
}
mpPlatformsGroupBox->setLayout(pPlatformsLayout);
// set the export group box layout
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Util/Helper.cpp
Expand Up @@ -90,6 +90,7 @@ QString Helper::subWindow = "SubWindow";
QString Helper::structuredOutput = "Structured";
QString Helper::textOutput = "Text";
QString Helper::utf8 = "UTF-8";
const char * const Helper::fmuPlatformNamePropertyId = "fmu-platform-name";
QFontInfo Helper::systemFontInfo = QFontInfo(QFont());
QFontInfo Helper::monospacedFontInfo = QFontInfo(QFont());
#ifdef Q_OS_MAC
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Util/Helper.h
Expand Up @@ -96,6 +96,7 @@ class Helper : public QObject
static QString structuredOutput;
static QString textOutput;
static QString utf8;
static const char * const fmuPlatformNamePropertyId;
static QFontInfo systemFontInfo;
static QFontInfo monospacedFontInfo;
static QString toolsOptionsPath;
Expand Down

0 comments on commit de55ec3

Please sign in to comment.