Index: /XmlTools2/trunk/xmlpatch.cpp
===================================================================
--- /XmlTools2/trunk/xmlpatch.cpp	(revision 955)
+++ /XmlTools2/trunk/xmlpatch.cpp	(revision 956)
@@ -243,11 +243,6 @@
         QString currXmlFileString;
 
-#ifdef _USE_OLD_JS_ENGINE
         QScriptEngine engine;
         QScriptValue engineResult; // variable to check for js_errors
-#else
-        QJSEngine engine;
-        QJSValue engineResult; // variable to check for js_errors
-#endif
 
         // Add echo function so user can debug the code
@@ -277,11 +272,7 @@
         engineResult=engine.evaluate("main(); function main() {"+jsString+"}"); // main funtion allows to use return to exit prematurely from user code
 
-#ifdef _USE_OLD_JS_ENGINE
         if (engine.hasUncaughtException()) {
             displayJsException(engine,engineResult);
         }
-#else
-        checkForJsException(engineResult);
-#endif
 
         if(!currXmlFile.open(QFile::WriteOnly | QFile::Text | QIODevice::Truncate)){
@@ -291,11 +282,7 @@
         engineResult=engine.globalObject().property("$xmlData");
 
-#ifdef _USE_OLD_JS_ENGINE
         if (engine.hasUncaughtException()) {
             displayJsException(engine,engineResult);
         }
-#else
-        checkForJsException(engineResult);
-#endif
 
         QTextStream(&currXmlFile) << engineResult.toString(); // retreive the modified xml by javascript and save it to the file
@@ -511,5 +498,4 @@
 }
 
-#ifdef _USE_OLD_JS_ENGINE
 void XmlPatch::displayJsException(QScriptEngine &engine, QScriptValue &engineResult){
     if (engine.hasUncaughtException()) {
@@ -517,9 +503,2 @@
     }
 }
-#else
-void XmlPatch::checkForJsException(QJSValue &engineResult){
-    if (engineResult.isError()) {
-        UtilXmlTools::displayErrorMessage("@CUSTOM_CODE","Uncaught js exception (user code):\n" + engineResult.toString());
-    }
-}
-#endif
Index: /XmlTools2/trunk/xmlpatch.h
===================================================================
--- /XmlTools2/trunk/xmlpatch.h	(revision 955)
+++ /XmlTools2/trunk/xmlpatch.h	(revision 956)
@@ -24,9 +24,5 @@
     void checkPatchVersion(const QString &file, QTextStream &fileStream);
     void checkAndProcessValidCommands(QTextStream &fileStream);
-#ifdef _USE_OLD_JS_ENGINE
     void displayJsException(QScriptEngine &engine, QScriptValue &engineResult);
-#else
-    void checkForJsException(QJSValue &engineResult);
-#endif
 };
 
Index: /XmlTools2/trunk/xmltools.h
===================================================================
--- /XmlTools2/trunk/xmltools.h	(revision 955)
+++ /XmlTools2/trunk/xmltools.h	(revision 956)
@@ -2,14 +2,9 @@
 #define XMLTOOLS_H
 
-#define _USE_OLD_JS_ENGINE
 
 #include <string>
 #include <QtCore>
 #include <stdio.h>
-#ifdef _USE_OLD_JS_ENGINE // Needs to test each one in terms of performance... At first look seems old engine is faster for the xml parsing method used!
 #include <QScriptEngine>
-#else
-#include <QJSEngine>
-#endif
 
 #include "utilxmltools.h"
