Skip to content

Commit

Permalink
- Removed CORBA stuff from OMEdit.
Browse files Browse the repository at this point in the history
- No need to USE_OMC_SHARED_OBJECT define anymore.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24682 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Feb 21, 2015
1 parent 822ca22 commit 4adabc7
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 367 deletions.
25 changes: 1 addition & 24 deletions OMEdit/OMEditGUI/CrashReport/CrashReportDialog.cpp
Expand Up @@ -79,14 +79,6 @@ CrashReportDialog::CrashReportDialog()
} else {
mpOMEditCommandsMosFileCheckBox->setChecked(false);
}
// openmodelica.omc.output.OMEdit file checkbox
QFileInfo OMCOutputFileInfo(QString("%1openmodelica.omc.output.%2").arg(tmpPath).arg(Helper::OMCServerName));
mpOMCOutputFileCheckBox = new QCheckBox(OMCOutputFileInfo.absoluteFilePath());
if (OMCOutputFileInfo.exists()) {
mpOMCOutputFileCheckBox->setChecked(true);
} else {
mpOMCOutputFileCheckBox->setChecked(false);
}
// openmodelica.stacktrace.OMEdit file checkbox
QFileInfo OMStackTraceFileInfo(QString("%1openmodelica.stacktrace.%2").arg(tmpPath).arg(Helper::OMCServerName));
mpOMStackTraceFileCheckBox = new QCheckBox(OMStackTraceFileInfo.absoluteFilePath());
Expand Down Expand Up @@ -115,7 +107,7 @@ CrashReportDialog::CrashReportDialog()
pMainLayout->addWidget(mpBugDescriptionLabel, 4, 0);
pMainLayout->addWidget(mpBugDescriptionTextBox, 5, 0);
int index = 6;
if (OMEditCommunicationLogFileInfo.exists() || OMEditCommandsMosFileInfo.exists() || OMCOutputFileInfo.exists() || OMStackTraceFileInfo.exists()) {
if (OMEditCommunicationLogFileInfo.exists() || OMEditCommandsMosFileInfo.exists() || OMStackTraceFileInfo.exists()) {
pMainLayout->addWidget(mpFilesDescriptionLabel, index, 0);
index++;
}
Expand All @@ -127,10 +119,6 @@ CrashReportDialog::CrashReportDialog()
pMainLayout->addWidget(mpOMEditCommandsMosFileCheckBox, index, 0);
index++;
}
if (OMCOutputFileInfo.exists()) {
pMainLayout->addWidget(mpOMCOutputFileCheckBox, index, 0);
index++;
}
if (OMStackTraceFileInfo.exists()) {
pMainLayout->addWidget(mpOMStackTraceFileCheckBox, index, 0);
index++;
Expand Down Expand Up @@ -178,17 +166,6 @@ void CrashReportDialog::sendReport()
pOMEditCommandsMosFile->setParent(pHttpMultiPart); // file will be deleted when we delete pHttpMultiPart
pHttpMultiPart->append(OMEditCommandsMosFileHttpPart);
}
// OMCOutputFile
if (mpOMCOutputFileCheckBox->isChecked()) {
QHttpPart OMCOutputFileCheckBoxHttpPart;
OMCOutputFileCheckBoxHttpPart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("text/plain"));
OMCOutputFileCheckBoxHttpPart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"openmodelica.omc.output.OMEdit\"; filename=\"openmodelica.omc.output.OMEdit\""));
QFile *pOMCOutputFileCheckBoxFile = new QFile(mpOMCOutputFileCheckBox->text());
pOMCOutputFileCheckBoxFile->open(QIODevice::ReadOnly);
OMCOutputFileCheckBoxHttpPart.setBodyDevice(pOMCOutputFileCheckBoxFile);
pOMCOutputFileCheckBoxFile->setParent(pHttpMultiPart); // file will be deleted when we delete pHttpMultiPart
pHttpMultiPart->append(OMCOutputFileCheckBoxHttpPart);
}
// OMStackTraceFile
if (mpOMStackTraceFileCheckBox->isChecked()) {
QHttpPart OMStackTraceFileCheckBoxHttpPart;
Expand Down
1 change: 0 additions & 1 deletion OMEdit/OMEditGUI/CrashReport/CrashReportDialog.h
Expand Up @@ -59,7 +59,6 @@ class CrashReportDialog : public QDialog
Label *mpFilesDescriptionLabel;
QCheckBox *mpOMEditCommunicationLogFileCheckBox;
QCheckBox *mpOMEditCommandsMosFileCheckBox;
QCheckBox *mpOMCOutputFileCheckBox;
QCheckBox *mpOMStackTraceFileCheckBox;
QPushButton *mpSendReportButton;
QPushButton *mpCancelButton;
Expand Down
7 changes: 3 additions & 4 deletions OMEdit/OMEditGUI/MainWindow.cpp
Expand Up @@ -70,7 +70,6 @@ MainWindow::MainWindow(QSplashScreen *pSplashScreen, QWidget *parent)
resize(800, 600);
setContentsMargins(1, 1, 1, 1);
// Create the OMCProxy object.
pSplashScreen->showMessage(tr("Connecting to OpenModelica Compiler"), Qt::AlignRight, Qt::white);
mpOMCProxy = new OMCProxy(this);
if (getExitApplicationStatus()) {
return;
Expand Down Expand Up @@ -592,7 +591,7 @@ int MainWindow::askForExit()

void MainWindow::beforeClosingMainWindow()
{
mpOMCProxy->stopServer();
mpOMCProxy->quitOMC();
delete mpOMCProxy;
delete mpModelWidgetContainer;
delete mpDebuggerMainWindow;
Expand Down Expand Up @@ -2130,8 +2129,8 @@ void MainWindow::createActions()
connect(mpExportFigaroAction, SIGNAL(triggered()), SLOT(exportModelFigaro()));
// Tools Menu
// show OMC Logger widget action
mpShowOMCLoggerWidgetAction = new QAction(QIcon(":/Resources/icons/console.svg"), tr("OMC Logger"), this);
mpShowOMCLoggerWidgetAction->setStatusTip(tr("Shows OMC Logger Window"));
mpShowOMCLoggerWidgetAction = new QAction(QIcon(":/Resources/icons/console.svg"), Helper::OpenModelicaCompilerCLI, this);
mpShowOMCLoggerWidgetAction->setStatusTip(tr("Shows OpenModelica Compiler CLI"));
connect(mpShowOMCLoggerWidgetAction, SIGNAL(triggered()), mpOMCProxy, SLOT(openOMCLoggerWidget()));
// export to OMNotebook action
mpExportToOMNotebookAction = new QAction(QIcon(":/Resources/icons/export-omnotebook.svg"), Helper::exportToOMNotebook, this);
Expand Down
8 changes: 1 addition & 7 deletions OMEdit/OMEditGUI/Makefile.unix.in
Expand Up @@ -28,19 +28,13 @@ Resources/nls/qm.stamp: OMEditGUI.pro Resources/nls/*.ts

always:

omc_communication.cpp: omc_communication.cc
ln -s $< $@
omc_communication.cc: $(runtimedir)/omc_communication.idl
@IDLCMD@ $<
omc_communication.h: omc_communication.cc

$(NAME): parsergen Makefile OMEdit.config
$(MAKE) -f Makefile

clean:
$(MAKE) -C Debugger/Parser -f Makefile.lib.unix clean
test ! -f Makefile || $(MAKE) -f Makefile clean
rm -f ../bin/*.o omc_communication.*
rm -f ../bin/*.o

parsergen:
$(MAKE) -C Debugger/Parser -f Makefile.lib.unix
Expand Down
5 changes: 1 addition & 4 deletions OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -2245,11 +2245,8 @@ void ModelWidget::updateParentModelsText(QString className)
{
// clean up the OMC cache for this particular model classname.
mpModelWidgetContainer->getMainWindow()->getOMCProxy()->removeCachedOMCCommand(className);
if (pLibraryTreeNode->getModelWidget()->getModelicaTextEditor()->isVisible())
{
mpModelWidgetContainer->getMainWindow()->getOMCProxy()->enableCanUseEventLoop(false);
if (pLibraryTreeNode->getModelWidget()->getModelicaTextEditor()->isVisible()) {
pLibraryTreeNode->getModelWidget()->getModelicaTextEditor()->setPlainText(mpModelWidgetContainer->getMainWindow()->getOMCProxy()->list(className));
mpModelWidgetContainer->getMainWindow()->getOMCProxy()->enableCanUseEventLoop(true);
}
}
if (!pLibraryTreeNode->getParentName().isEmpty())
Expand Down

0 comments on commit 4adabc7

Please sign in to comment.