136 if (
m_pChild->exitStatus() != QProcess::NormalExit
139 char *argv[] = { (
char *)
"-" };
141 QApplication app ( argc, argv );
142 app.setApplicationName(
"Hydrogen" );
148 s.remove(
"\e[31m" );
149 s.remove(
"\e[32m" );
150 s.remove(
"\e[35m" );
151 s.remove(
"\e[35;1m" );
152 s.remove(
"\e[36m" );
153 sDetails += s +
"\n";
160 msgBox.setText( tr(
"Hydrogen exited abnormally" ) );
162 QString sInformative;
166 sInformative += tr(
"You can check the Hydrogen issue tracker on Github to see if this issue "
167 "is already known about. "
168 "If not, you can report it there to help the development team get you back on track "
169 "and improve Hydrogen for the future." ) +
"\n";
170 msgBox.setInformativeText( sInformative );
172 msgBox.setStandardButtons( QMessageBox::Ok );
173 msgBox.setDefaultButton( QMessageBox::Discard );
174 msgBox.setWindowTitle(
"Hydrogen" );
175 msgBox.setIcon( QMessageBox::Critical );
177 msgBox.setDetailedText( sDetails );
179 QPushButton *pLogButton = msgBox.addButton( tr(
"Open log file..." ),
180 QMessageBox::ActionRole );
182 QPushButton *pIssuesButton = msgBox.addButton( tr(
"Github Issue tracker..." ),
183 QMessageBox::ActionRole );
187 QAbstractButton *pPushed = msgBox.clickedButton();
189 if ( pLogButton == pPushed ) {
192 }
else if ( pPushed == pIssuesButton ) {
193 QDesktopServices::openUrl( QUrl(
"https://github.com/hydrogen-music/hydrogen/issues") );
228 if ( ! parser.
parse( argc, argv ) ) {
229 std::cerr <<
"ERROR: Unable to parse CLI arguments. Abort..."
244 QStringList arguments;
245 for (
int ii = 1; ii < argc; ii++ ) {
246 arguments << QString( argv[ii] );
248 arguments <<
"--child";
251 subProcess.start(argv[0], arguments);
254 for (
int nSignal : { SIGINT, SIGTERM
264 exit( subProcess.exitCode() );