2014-03-03 11:27:25 -05:00
|
|
|
#ifdef QT5
|
|
|
|
#include <QtWidgets>
|
|
|
|
#else
|
2012-05-22 13:09:48 -04:00
|
|
|
#include <QtGui>
|
2014-03-03 11:27:25 -05:00
|
|
|
#endif
|
|
|
|
#include <QApplication>
|
|
|
|
|
2021-04-30 17:51:09 -04:00
|
|
|
#include "revision_utils.hpp"
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "mainwindow.h"
|
|
|
|
|
2021-04-10 07:25:28 -04:00
|
|
|
static QtMessageHandler default_message_handler;
|
|
|
|
|
|
|
|
void my_message_handler (QtMsgType type, QMessageLogContext const& context, QString const& msg)
|
|
|
|
{
|
|
|
|
// Handle the messages!
|
|
|
|
|
|
|
|
// Call the default handler.
|
|
|
|
(*default_message_handler) (type, context, msg);
|
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2021-04-10 07:25:28 -04:00
|
|
|
default_message_handler = qInstallMessageHandler (my_message_handler);
|
|
|
|
|
|
|
|
QApplication a {argc, argv};
|
2021-04-30 17:51:09 -04:00
|
|
|
// Override programs executable basename as application name.
|
|
|
|
a.setApplicationName ("MAP65");
|
|
|
|
a.setApplicationVersion ("3.0.0-devel");
|
2021-04-10 07:25:28 -04:00
|
|
|
MainWindow w;
|
|
|
|
w.show ();
|
|
|
|
return a.exec ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|