Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit 5f917a6

Browse files
committed
Use --suppressPath flag
1 parent 7493133 commit 5f917a6

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

OMEdit/OMEditGUI/MainWindow.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
157157
OMSProxy::create();
158158
// Create an object of OptionsDialog
159159
OptionsDialog::create();
160-
// We set the logging callback for OMS API here after creating OptionsDialog so don't get annoying temp directory message.
161-
OMSProxy::instance()->setLoggingCallback();
162160
SplashScreen::instance()->showMessage(tr("Loading Widgets"), Qt::AlignRight, Qt::white);
163161
// apply MessagesWidget settings
164162
MessagesWidget::instance()->applyMessagesSettings();

OMEdit/OMEditGUI/OMS/OMSProxy.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ OMSProxy::OMSProxy()
123123
mpCommunicationLogFile = fopen(communicationLogFilePath.toStdString().c_str(), "w");
124124
mTotalOMSCallsTime = 0.0;
125125
// OMSimulator global settings
126+
setCommandLineOption("--suppressPath=true");
126127
setLogFile(QString(Utilities::tempDirectory() + "/omsllog.txt").toStdString().c_str());
127128
setTempDirectory(Utilities::tempDirectory().toStdString().c_str());
129+
setLoggingCallback();
128130
}
129131

130132
OMSProxy::~OMSProxy()
@@ -1049,6 +1051,23 @@ void OMSProxy::setLoggingLevel(int logLevel)
10491051
logResponse(command, oms_status_ok, &commandTime);
10501052
}
10511053

1054+
/*!
1055+
* \brief OMSProxy::setCommandLineOption
1056+
* Sets the command line option.
1057+
* \param cmd
1058+
* \return
1059+
*/
1060+
bool OMSProxy::setCommandLineOption(QString cmd)
1061+
{
1062+
QString command = "oms3_setCommandLineOption";
1063+
QStringList args;
1064+
args << cmd;
1065+
LOG_COMMAND(command, args);
1066+
oms_status_enu_t status = oms3_setCommandLineOption(cmd.toStdString().c_str());
1067+
logResponse(command, status, &commandTime);
1068+
return statusToBool(status);
1069+
}
1070+
10521071
/*!
10531072
* \brief OMSProxy::setLogFile
10541073
* Sets the log file.

OMEdit/OMEditGUI/OMS/OMSProxy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class OMSProxy : public QObject
114114
bool simulate_asynchronous(QString ident/*, int* terminate*/);
115115
bool reset(QString ident);
116116
void setLoggingLevel(int logLevel);
117+
bool setCommandLineOption(QString cmd);
117118
void setLogFile(QString filename);
118119
void setTempDirectory(QString path);
119120
void setWorkingDirectory(QString path);

0 commit comments

Comments
 (0)