Skip to content

Commit

Permalink
- send getVersion as the first command to connected omc.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23326 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Nov 12, 2014
1 parent 4cad513 commit f51fb0d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OMEdit/OMEditGUI/MainWindow.cpp
Expand Up @@ -2575,7 +2575,7 @@ AboutOMEditWidget::AboutOMEditWidget(MainWindow *pMainWindow)
Label *pIntroLabel = new Label(Helper::applicationIntroText);
pIntroLabel->setFont(QFont(Helper::systemFontInfo.family(), Helper::systemFontInfo.pointSize() + 3 + MAC_FONT_FACTOR));
// OpenModelica compiler info
Label *pConnectedLabel = new Label(QString("Connected to OpenModelica ").append(pMainWindow->getOMCProxy()->getVersion()));
Label *pConnectedLabel = new Label(QString("Connected to OpenModelica ").append(Helper::OpenModelicaVersion));
pConnectedLabel->setFont(QFont(Helper::systemFontInfo.family(), Helper::systemFontInfo.pointSize() - 2 + MAC_FONT_FACTOR));
// about text
QString aboutText = QString("Copyright <b>Open Source Modelica Consortium (OSMC)</b>.<br />")
Expand Down
2 changes: 2 additions & 0 deletions OMEdit/OMEditGUI/OMC/OMCProxy.cpp
Expand Up @@ -452,6 +452,8 @@ bool OMCProxy::startServer()
mHasInitialized = false;
return false;
}
// get OpenModelica version
Helper::OpenModelicaVersion = getVersion();
// set OpenModelicaHome variable
sendCommand("getInstallationDirectoryPath()");
Helper::OpenModelicaHome = StringHandler::removeFirstLastQuotes(getResult());
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Util/Helper.cpp
Expand Up @@ -45,6 +45,7 @@ QString Helper::applicationIntroText = "OpenModelica Connection Editor";
QString Helper::organization = "openmodelica"; /* case-sensitive string. Don't change it. Used by ini settings file. */
QString Helper::application = "omedit"; /* case-sensitive string. Don't change it. Used by ini settings file. */
// these two variables are set once we are connected to OMC......in OMCProxy::startServer().
QString Helper::OpenModelicaVersion = "";
QString Helper::OpenModelicaHome = "";
QString Helper::OpenModelicaLibrary = "";
QString Helper::OMCServerName = "OMEdit";
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Util/Helper.h
Expand Up @@ -56,6 +56,7 @@ class Helper : public QObject
static QString applicationIntroText;
static QString organization;
static QString application;
static QString OpenModelicaVersion;
static QString OpenModelicaHome;
static QString OpenModelicaLibrary;
static QString OMCServerName;
Expand Down

0 comments on commit f51fb0d

Please sign in to comment.