changeset 750:a884b5861e93

Correction to make the JsDecoder work again. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1027 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Sat, 02 Oct 2010 12:48:56 +0000
parents 65171b865963
children ac165b6ae67e
files indenters/JsDecoder.js src/IndentHandler.cpp
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/indenters/JsDecoder.js	Sat Oct 02 12:15:20 2010 +0000
+++ b/indenters/JsDecoder.js	Sat Oct 02 12:48:56 2010 +0000
@@ -1175,4 +1175,5 @@
 jsdecoder.s = unformattedCode;
 formattedCode = jsdecoder.decode();
 
-return formattedCode;
+// Newer Qt versions doesn't seem to need the return statement.
+//return formattedCode;
--- a/src/IndentHandler.cpp	Sat Oct 02 12:15:20 2010 +0000
+++ b/src/IndentHandler.cpp	Sat Oct 02 12:48:56 2010 +0000
@@ -348,8 +348,7 @@
 QString IndentHandler::callJavaScriptIndenter(QString sourceCode) {
     QScriptEngine engine;
 
-    QScriptValue unformattedCode(&engine, sourceCode);
-    engine.globalObject().setProperty("unformattedCode", unformattedCode);
+    engine.globalObject().setProperty("unformattedCode", sourceCode);
 
     QFile jsDecoderFile( indenterExecutableCallString );
     QString jsDecoderCode;