This repository was archived by the owner on Apr 3, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff 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
130132OMSProxy::~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.
Original file line number Diff line number Diff 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);
You can’t perform that action at this time.
0 commit comments