src/extprogs.cpp

changeset 526
b29b6fc45ba9
parent 522
afa691788bdb
child 538
2f85d4d286e5
equal deleted inserted replaced
525:4f6e46a3bfc3 526:b29b6fc45ba9
206 { QTemporaryFile input, output; 206 { QTemporaryFile input, output;
207 str inputname, outputname; 207 str inputname, outputname;
208 QStringList argv = argvstr.split (" ", QString::SkipEmptyParts); 208 QStringList argv = argvstr.split (" ", QString::SkipEmptyParts);
209 209
210 #ifndef _WIN32 210 #ifndef _WIN32
211
212 if (*g_extProgWine[prog]) 211 if (*g_extProgWine[prog])
213 { argv.insert (0, path); 212 { argv.insert (0, path);
214 path = "wine"; 213 path = "wine";
215 } 214 }
216
217 #endif // _WIN32 215 #endif // _WIN32
218 216
219 log ("cmdline: %1 %2\n", path, argv.join (" ")); 217 log ("cmdline: %1 %2\n", path, argv.join (" "));
220 218
221 // Temporary files for stdin and stdout 219 // Temporary files for stdin and stdout
234 // Write an enter, the utility tools all expect one 232 // Write an enter, the utility tools all expect one
235 stdinfp.write ("\n"); 233 stdinfp.write ("\n");
236 234
237 // Wait while it runs 235 // Wait while it runs
238 proc.waitForFinished(); 236 proc.waitForFinished();
239
240 #ifndef RELEASE
241 log ("%1", str (proc.readAllStandardOutput()));
242 #endif // RELEASE
243 237
244 str err = ""; 238 str err = "";
245 239
246 if (proc.exitStatus() != QProcess::NormalExit) 240 if (proc.exitStatus() != QProcess::NormalExit)
247 err = processErrorString (proc); 241 err = processErrorString (proc);
417 ui.cb_edges->setWhatsThis ("Makes " APPNAME " try run Isecalc to create edgelines for the intersection."); 411 ui.cb_edges->setWhatsThis ("Makes " APPNAME " try run Isecalc to create edgelines for the intersection.");
418 412
419 short inCol, cutCol; 413 short inCol, cutCol;
420 const bool repeatInverse = ui.cb_repeat->isChecked(); 414 const bool repeatInverse = ui.cb_repeat->isChecked();
421 415
422 for (;;) 416 forever
423 { if (!dlg->exec()) 417 { if (!dlg->exec())
424 return; 418 return;
425 419
426 inCol = ui.cmb_incol->itemData (ui.cmb_incol->currentIndex()).toInt(); 420 inCol = ui.cmb_incol->itemData (ui.cmb_incol->currentIndex()).toInt();
427 cutCol = ui.cmb_cutcol->itemData (ui.cmb_cutcol->currentIndex()).toInt(); 421 cutCol = ui.cmb_cutcol->itemData (ui.cmb_cutcol->currentIndex()).toInt();
503 makeColorSelector (ui.cmb_col1); 497 makeColorSelector (ui.cmb_col1);
504 makeColorSelector (ui.cmb_col2); 498 makeColorSelector (ui.cmb_col2);
505 499
506 short in1Col, in2Col; 500 short in1Col, in2Col;
507 501
508 for (;;) 502 forever
509 { if (!dlg->exec()) 503 { if (!dlg->exec())
510 return; 504 return;
511 505
512 in1Col = ui.cmb_col1->itemData (ui.cmb_col1->currentIndex()).toInt(); 506 in1Col = ui.cmb_col1->itemData (ui.cmb_col1->currentIndex()).toInt();
513 in2Col = ui.cmb_col2->itemData (ui.cmb_col2->currentIndex()).toInt(); 507 in2Col = ui.cmb_col2->itemData (ui.cmb_col2->currentIndex()).toInt();
561 makeColorSelector (ui.cmb_col2); 555 makeColorSelector (ui.cmb_col2);
562 556
563 short in1Col, in2Col; 557 short in1Col, in2Col;
564 558
565 // Run the dialog and validate input 559 // Run the dialog and validate input
566 for (;;) 560 forever
567 { if (!dlg->exec()) 561 { if (!dlg->exec())
568 return; 562 return;
569 563
570 in1Col = ui.cmb_col1->itemData (ui.cmb_col1->currentIndex()).toInt(), 564 in1Col = ui.cmb_col1->itemData (ui.cmb_col1->currentIndex()).toInt(),
571 in2Col = ui.cmb_col1->itemData (ui.cmb_col2->currentIndex()).toInt(); 565 in2Col = ui.cmb_col1->itemData (ui.cmb_col2->currentIndex()).toInt();

mercurial