qamqp/src/main.cpp

40 lines
652 B
C++
Raw Normal View History

2012-09-30 01:25:17 +08:00
#include <stdio.h>
#include <QtCore/QCoreApplication>
#include "test.h"
2012-05-24 11:53:32 +08:00
void myMessageOutput(QtMsgType type, const char *msg)
{
switch (type) {
case QtDebugMsg:
2012-09-30 18:12:20 +08:00
fprintf(stderr, "# %s\n", msg);
2012-05-24 11:53:32 +08:00
break;
case QtWarningMsg:
fprintf(stderr, "%s\n", msg);
break;
case QtCriticalMsg:
fprintf(stderr, "Critical: %s\n", msg);
break;
case QtFatalMsg:
fprintf(stderr, "Fatal: %s\n", msg);
abort();
default:
break;
}
}
int main(int argc, char *argv[])
{
2012-05-24 11:53:32 +08:00
qInstallMsgHandler(myMessageOutput);
QCoreApplication a(argc, argv);
2012-05-24 11:53:32 +08:00
Test test[1];
2012-09-30 01:45:55 +08:00
Q_UNUSED(test);
return a.exec();
}