1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* main.cpp
*
* Created on: Feb 10, 2009
* Author: julienbachmann
*/
#include <QtGui>
#include "CrashWindow.h"
#include "client/mac/handler/exception_handler.h"
class CRVApplication : public QApplication
{
public:
CRVApplication(int &argc, char **argv) : QApplication(argc, argv) {}
bool event(QEvent *e)
{
if (e->type() == QEvent::FileOpen)
{
window.setDumpFilePath(static_cast<QFileOpenEvent*>(e)->file());
return true;
}
return QApplication::event(e);
}
CrashWindow window;
};
int main(int argc, char *argv[])
{
CRVApplication app(argc, argv);
app.window.show();
app.exec();
}