Mercurial > hg > forks > UniversalIndentGUI
comparison src/IndentHandler.cpp @ 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 | bc47ac0a44eb |
children | ac165b6ae67e |
comparison
equal
deleted
inserted
replaced
749:65171b865963 | 750:a884b5861e93 |
---|---|
346 can identify the programming language if needed. | 346 can identify the programming language if needed. |
347 */ | 347 */ |
348 QString IndentHandler::callJavaScriptIndenter(QString sourceCode) { | 348 QString IndentHandler::callJavaScriptIndenter(QString sourceCode) { |
349 QScriptEngine engine; | 349 QScriptEngine engine; |
350 | 350 |
351 QScriptValue unformattedCode(&engine, sourceCode); | 351 engine.globalObject().setProperty("unformattedCode", sourceCode); |
352 engine.globalObject().setProperty("unformattedCode", unformattedCode); | |
353 | 352 |
354 QFile jsDecoderFile( indenterExecutableCallString ); | 353 QFile jsDecoderFile( indenterExecutableCallString ); |
355 QString jsDecoderCode; | 354 QString jsDecoderCode; |
356 if (jsDecoderFile.open(QFile::ReadOnly)) { | 355 if (jsDecoderFile.open(QFile::ReadOnly)) { |
357 jsDecoderCode = jsDecoderFile.readAll(); | 356 jsDecoderCode = jsDecoderFile.readAll(); |