Skip to content

Commit 153a298

Browse files
committed
Removed references of _info.xml
1 parent eb5f855 commit 153a298

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3290,7 +3290,7 @@ bool LibraryWidget::saveModelicaLibraryTreeItem(LibraryTreeItem *pLibraryTreeIte
32903290
result = saveModelicaLibraryTreeItemHelper(pTopLevelLibraryTreeItem);
32913291
}
32923292
// if (result) {
3293-
// /* We need to load the file again so that the line number information for model_info.xml is correct.
3293+
// /* We need to load the file again so that the line number information for model_info.json is correct.
32943294
// * Update to AST (makes source info WRONG), saving it (source info STILL WRONG), reload it (and omc knows the new lines)
32953295
// * In order to get rid of it save API should update omc with new line information.
32963296
// */

OMEdit/OMEditGUI/Simulation/SimulationOutputWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ void SimulationOutputWidget::writeSimulationMessage(SimulationMessage *pSimulati
361361
mpSimulationOutputTextBrowser->insertPlainText(error);
362362
/* write the error link */
363363
if (!pSimulationMessage->mIndex.isEmpty()) {
364-
mpSimulationOutputTextBrowser->insertHtml("&nbsp;<a href=\"omedittransformationsbrowser://" + QUrl::fromLocalFile(mSimulationOptions.getWorkingDirectory() + "/" + mSimulationOptions.getFileNamePrefix() + "_info.xml").path() + "?index=" + pSimulationMessage->mIndex + "\">Debug more</a><br />");
364+
mpSimulationOutputTextBrowser->insertHtml("&nbsp;<a href=\"omedittransformationsbrowser://" + QUrl::fromLocalFile(mSimulationOptions.getWorkingDirectory() + "/" + mSimulationOptions.getFileNamePrefix() + "_info.json").path() + "?index=" + pSimulationMessage->mIndex + "\">Debug more</a><br />");
365365
} else {
366366
mpSimulationOutputTextBrowser->insertPlainText("\n");
367367
}

OMEdit/OMEditGUI/TransformationalDebugger/OMDumpXML.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ double rt_tock() {
469469
}
470470

471471
int test_dump_xml_reader() {
472-
QFile file("Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum_info.xml");
472+
QFile file("Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum_info.json");
473473
rt_tick();
474474
MyHandler handler(file);
475475
qDebug() << QString("streaming done in: %1 ms\n").arg(rt_tock() *1e3);

OMEdit/OMEditGUI/TransformationalDebugger/TransformationsWidget.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,9 @@ EquationTreeWidget::EquationTreeWidget(TransformationsWidget *pTransformationWid
437437
}
438438

439439
TransformationsWidget::TransformationsWidget(QString infoXMLFullFileName, MainWindow *pMainWindow)
440-
: mpMainWindow(pMainWindow), mInfoXMLFullFileName(infoXMLFullFileName)
440+
: mpMainWindow(pMainWindow), mInfoJSONFullFileName(infoXMLFullFileName)
441441
{
442-
if (!mInfoXMLFullFileName.endsWith("_info.json")) {
442+
if (!mInfoJSONFullFileName.endsWith("_info.json")) {
443443
mProfJSONFullFileName = "";
444444
mProfilingDataRealFileName = "";
445445
} else {
@@ -454,7 +454,7 @@ TransformationsWidget::TransformationsWidget(QString infoXMLFullFileName, MainWi
454454
pReloadToolButton->setIcon(QIcon(":/Resources/icons/refresh.svg"));
455455
connect(pReloadToolButton, SIGNAL(clicked()), SLOT(reloadTransformations()));
456456
/* info xml file path label */
457-
Label *pInfoXMLFilePathLabel = new Label(mInfoXMLFullFileName, this);
457+
Label *pInfoXMLFilePathLabel = new Label(mInfoJSONFullFileName, this);
458458
pInfoXMLFilePathLabel->setElideMode(Qt::ElideMiddle);
459459
/* create status bar */
460460
QStatusBar *pStatusBar = new QStatusBar;
@@ -795,17 +795,17 @@ static OMEquation* getOMEquation(QList<OMEquation*> equations, int index)
795795

796796
void TransformationsWidget::loadTransformations()
797797
{
798-
QFile file(mInfoXMLFullFileName);
798+
QFile file(mInfoJSONFullFileName);
799799
mEquations.clear();
800800
mVariables.clear();
801801
hasOperationsEnabled = false;
802-
if (mInfoXMLFullFileName.endsWith(".json")) {
802+
if (mInfoJSONFullFileName.endsWith(".json")) {
803803
QJson::Parser parser;
804804
bool ok;
805805
QVariantMap result;
806806
result = parser.parse(&file, &ok).toMap();
807807
if (!ok) {
808-
QMessageBox::critical(this, QString(Helper::applicationName).append(" - ").append(Helper::parsingFailedJson), Helper::parsingFailedJson + ": " + mInfoXMLFullFileName, Helper::ok);
808+
QMessageBox::critical(this, QString(Helper::applicationName).append(" - ").append(Helper::parsingFailedJson), Helper::parsingFailedJson + ": " + mInfoJSONFullFileName, Helper::ok);
809809
return;
810810
}
811811
QVariantMap vars = result["variables"].toMap();

OMEdit/OMEditGUI/TransformationalDebugger/TransformationsWidget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class TransformationsWidget : public QWidget
157157
{
158158
Q_OBJECT
159159
public:
160-
TransformationsWidget(QString infoXMLFullFileName, MainWindow *pMainWindow);
160+
TransformationsWidget(QString infoJSONFullFileName, MainWindow *pMainWindow);
161161
MainWindow* getMainWindow() {return mpMainWindow;}
162162
MyHandler* getInfoXMLFileHandler() {return mpInfoXMLFileHandler;}
163163
QTreeWidget* getEquationsTreeWidget() {return mpEquationsTreeWidget;}
@@ -184,7 +184,7 @@ class TransformationsWidget : public QWidget
184184
void clearTreeWidgetItems(QTreeWidget *pTreeWidget);
185185
private:
186186
MainWindow *mpMainWindow;
187-
QString mInfoXMLFullFileName, mProfJSONFullFileName, mProfilingDataRealFileName;
187+
QString mInfoJSONFullFileName, mProfJSONFullFileName, mProfilingDataRealFileName;
188188
int profilingNumSteps;
189189
MyHandler *mpInfoXMLFileHandler;
190190
TreeSearchFilters *mpTreeSearchFilters;

OMEdit/OMEditGUI/Util/Helper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ QString Helper::imageFileTypes = "SVG (*.svg);;PNG image (*.png);;Windows BMP im
5555
QString Helper::bitmapFileTypes = "PNG image (*.png);Windows BMP image (*.bmp);JPEG (*.jpg *.jpeg)";
5656
QString Helper::fmuFileTypes = "FMU Files (*.fmu)";
5757
QString Helper::xmlFileTypes = "XML Files (*.xml)";
58-
QString Helper::infoXmlFileTypes = "OM Info Files (*_info.xml *_info.json)";
58+
QString Helper::infoXmlFileTypes = "OM Info Files (*_info.json)";
5959
QString Helper::matFileTypes = "MAT Files (*.mat)";
6060
QString Helper::omResultFileTypes = "OpenModelica Result Files (*.mat *.plt *.csv)";
6161
#ifdef WIN32

0 commit comments

Comments
 (0)