ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/XmlTools/xmlcustomcode.h
(Generate patch)

Comparing s10k/XmlTools/xmlcustomcode.h (file contents):
Revision 1073 by s10k, Thu Oct 5 17:48:32 2017 UTC vs.
Revision 1112 by s10k, Sun Sep 8 13:21:41 2019 UTC

# Line 26 | Line 26 | private:
26  
27      const int numThreads;
28      QThreadPool myThreadPool;
29    QMutex mutexIsAvailable;
29  
30      struct jsCustomCodeEngine{
31 +        /* No need to delete these... They will stay alive until program quits. */
32          QScriptEngine* scriptEngine;
33          QScriptValue* jsFunction;
34          QScriptValue* getXmlDataFunction;
35          QScriptValue* setXmlDataFunction;
36 <        bool isAvailable;
36 >        QMutex *mutexForEngine;
37      };
38  
39      QVector<jsCustomCodeEngine> jsScriptEngines;
# Line 43 | Line 43 | private:
43      XmlCustomCode& operator=(XmlCustomCode const&);  // assignment operator is private
44  
45      void displayJsException(QScriptEngine &engine, QScriptValue &engineResult);
46    jsCustomCodeEngine& getAvailableJsEngine();
46  
47      __attribute__((always_inline)) inline void customCodeUnwinding(const QString &fileName, QString &currXmlFileString,
48 <    QScriptEngine &engine, clock_t &begin, double elapsed_secs, QScriptValue &engineResult, QScriptValue &jsFunction,
49 <    QScriptValue &getXmlDataFunction, QScriptValue &setXmlDataFunction, const bool &backupsEnabled, const bool &verboseEnabled){
48 >                                                                   QScriptEngine &engine, clock_t &begin, double elapsed_secs, QScriptValue &engineResult, QScriptValue &jsFunction,
49 >                                                                   QScriptValue &getXmlDataFunction, QScriptValue &setXmlDataFunction, const bool &backupsEnabled, const bool &verboseEnabled){
50          if(backupsEnabled){
51              UtilXmlTools::backupFile(fileName, verboseEnabled);
52          }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)