Commits

Anonymous committed c711e77

LuxMark: when --single-run option is used, LuxMark will exit if there is an error

  • Participants
  • Parent commits bbed240
  • Branches luxmark_v2.x

Comments (0)

Files changed (3)

File samples/luxmark/luxmarkapp.h

 	void HandleMouseMoveEvent(QGraphicsSceneMouseEvent *event);
 	void HandleMousePressEvent(QGraphicsSceneMouseEvent *event);
 
+	bool IsSingleRun() const { return singleRun; }
+
 private:
 	static void EngineInitThreadImpl(LuxMarkApp *app);
 

File samples/luxmark/mainwindow.cpp

 		ui->LogView->append(ss.readAll());
 
 		((LuxMarkApp *)qApp)->SetMode(PAUSE);
+
+		// If I'm in single-run mode, I have to exit
+		if ((((LuxMarkApp *)qApp))->IsSingleRun()) {
+			cout << "Error: " << ((LuxLogEvent *)event)->getMessage().toStdString() << endl;
+			exit(EXIT_SUCCESS);
+		}
 	}
 
 	if (retval) {

File samples/luxmark/moc_luxmarkapp.cxx

 /****************************************************************************
 ** Meta object code from reading C++ file 'luxmarkapp.h'
 **
-** Created: Sun Apr 22 16:23:39 2012
+** Created: Wed May 2 11:53:26 2012
 **      by: The Qt Meta Object Compiler version 62 (Qt 4.7.4)
 **
 ** WARNING! All changes made in this file will be lost!