diff --git a/OMEdit/OMEditGUI/Simulation/OpcUaClient.cpp b/OMEdit/OMEditGUI/Simulation/OpcUaClient.cpp index 52e73f25415..8e2225e855e 100644 --- a/OMEdit/OMEditGUI/Simulation/OpcUaClient.cpp +++ b/OMEdit/OMEditGUI/Simulation/OpcUaClient.cpp @@ -7,14 +7,6 @@ #include #include -class SleepThread : public QThread { -public: - // Work-around for Qt4 having msleep as protected - static inline void msleep(unsigned long msecs) { - QThread::msleep(msecs); - } -}; - /*! Write the value value to the real node with id id. */ @@ -97,7 +89,7 @@ bool OpcUaClient::connectToServer() mpClient = UA_Client_new(UA_ClientConfig_standard); UA_StatusCode returnValue; do { - SleepThread::msleep(100); + Sleep::msleep(100); // QCoreApplication::processEvents(QEventLoop::AllEvents, 100); returnValue = UA_Client_connect(mpClient, endPoint.c_str()); } while (returnValue != UA_STATUSCODE_GOOD); @@ -368,7 +360,7 @@ void OpcUaWorker::startInteractiveSimulation() } } else { QCoreApplication::processEvents(QEventLoop::AllEvents, 100); - SleepThread::msleep(mServerSampleInterval); + Sleep::msleep(mServerSampleInterval); } } } diff --git a/OMEdit/OMEditGUI/Simulation/OpcUaClient.h b/OMEdit/OMEditGUI/Simulation/OpcUaClient.h index f17b30ae209..6e492cb95ce 100644 --- a/OMEdit/OMEditGUI/Simulation/OpcUaClient.h +++ b/OMEdit/OMEditGUI/Simulation/OpcUaClient.h @@ -78,6 +78,8 @@ private slots: OpcUaClient *mpParentClient; VariablesTreeItem *mpVariablesTreeItemRoot; QTime mClock; + bool mSimulateWithSteps; + const double mSampleInterval; double mInterval, mSpeedValue, mServerSampleInterval; bool mIsRunning; @@ -92,8 +94,6 @@ private slots: static QThreadStorage mCurrentTime; static QThreadStorage mInt; UA_UInt32 mSubscriptionId; - bool mSimulateWithSteps; - const double mSampleInterval; signals: void sendUpdateCurves(); void sendUpdateYAxis(double, double);