qt - QProcess won't emit errorOccurred on VBScript failure -


i have vbscript converts excel files tab delimited text files:

format = -4158  set objfso = createobject("scripting.filesystemobject")  src_file = objfso.getabsolutepathname(wscript.arguments.item(0)) dest_file = objfso.getabsolutepathname(wscript.arguments.item(1))  dim oexcel set oexcel = createobject("excel.application")  oexcel.displayalerts = false oexcel.protectedviewwindows.open(src_file) oexcel.activeprotectedviewwindow.edit  dim obook set obook = oexcel.workbooks.open(src_file)  obook.worksheets(5).activate  obook.saveas dest_file, format  obook.close false oexcel.displayalerts = true oexcel.quit 

in qt use wscript run code , have connected signal qprocess::erroroccurred lambda:

qobject::connect(&wscript, &qprocess::erroroccurred, [=](qprocess::processerror error) {    qdebug() << "error has occured";  }); 

in vb script, protected view removed. however, modified script not disable protected view. results in script not being able open excel files in protected view, results in error saying excel file cannot opened. however, erroroccured signal never sent. why happening?

the process::erroroccured signal emitted if qprocess has problems or if process it's running crashes (see reasons here).

if want vb script notify app of error in way script have either use non-zero exit code can read via qprocess::exitcode or, write standard error stream can caught , read on qprocess::readyreadstandarderror signal.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -