Added a DMX watchdog. Changed the play methos, now play reset to 0 and stop not.

This commit is contained in:
santi 2014-07-12 21:53:07 +02:00
parent a6909f8c16
commit 69ffe79742
13 changed files with 276 additions and 154 deletions

View file

@ -79,29 +79,54 @@ void MessageHandler(QtMsgType type, const QMessageLogContext &context, const QSt
QString txt;
switch (type) {
case QtDebugMsg:
txt.append("Debug: ");
txt.append("Debug from File: ");
txt.append(context.file);
txt.append(context.line);
txt.append(" Line: ");
txt.append(QString::number(context.line));
txt.append(" Function: ");
txt.append(context.function);
txt.append(" Message: ");
txt.append(msg);
// libreMediaServerAudio::textEdit->append(msg);, context.file, context.line, context.function);
libreMediaServerAudio::textEdit->append(txt);
break;
case QtWarningMsg:
// txt.append("Warning: ");
// txt.append(msg);
libreMediaServerAudio::textEdit->append(msg);
txt.append("Warning from File: ");
txt.append(context.file);
txt.append(" Line: ");
txt.append(QString::number(context.line));
txt.append(" Function: ");
txt.append(context.function);
txt.append(" Message: ");
txt.append(msg);
// libreMediaServerAudio::textEdit->append(msg);, context.file, context.line, context.function);
libreMediaServerAudio::textEdit->append(txt);
abort();
break;
case QtCriticalMsg:
// txt.append("Critical: ");
// txt.append(msg);
libreMediaServerAudio::textEdit->append(msg);
// txt.append("Critical from File: ");
txt.append(context.file);
txt.append(" Line: ");
txt.append(QString::number(context.line));
txt.append(" Function: ");
txt.append(context.function);
txt.append(" Message ");
txt.append(msg);
// libreMediaServerAudio::textEdit->append(msg);, context.file, context.line, context.function);
libreMediaServerAudio::textEdit->append(txt);
abort();
break;
case QtFatalMsg:
// txt.append("Fatal: ");
// txt.append(msg);
libreMediaServerAudio::textEdit->append(msg);
// ts << txt << endl;
// txt.append("Fatal from File: ");
txt.append(context.file);
txt.append(" Line: ");
txt.append(QString::number(context.line));
txt.append(" Function: ");
txt.append(context.function);
txt.append(" Message: ");
txt.append(msg);
// libreMediaServerAudio::textEdit->append(msg);, context.file, context.line, context.function);
libreMediaServerAudio::textEdit->append(txt);// ts << txt << endl;
abort();
}
// outFile.write(txt.toLatin1().constData(), txt.size());
@ -120,9 +145,9 @@ int main(int argc, char *argv[])
{
qInstallMessageHandler(MessageHandler);
}*/
QApplication app(argc, argv);
qInstallMessageHandler(MessageHandler);
QApplication app(argc, argv);
QStringList args = app.arguments();
// parse the command line
if (args.size() > 1)