1 // Copyright 2005-2019 The Mumble Developers. All rights reserved.
2 // Use of this source code is governed by a BSD-style license
3 // that can be found in the LICENSE file at the root of the
4 // Mumble source tree or at <https://www.mumble.info/LICENSE>.
5 
6 #ifndef MUMBLE_MUMBLE_CRASHREPORTER_H_
7 #define MUMBLE_MUMBLE_CRASHREPORTER_H_
8 
9 #include <QtCore/QObject>
10 #include <QtCore/QEventLoop>
11 #include <QtNetwork/QNetworkReply>
12 
13 #if QT_VERSION >= 0x050000
14 # include <QtWidgets/QDialog>
15 # include <QtWidgets/QProgressDialog>
16 # include <QtWidgets/QLineEdit>
17 # include <QtWidgets/QTextEdit>
18 #else
19 # include <QtGui/QDialog>
20 # include <QtGui/QProgressDialog>
21 # include <QtGui/QLineEdit>
22 # include <QtGui/QTextEdit>
23 #endif
24 
25 class CrashReporter : QDialog {
26 		Q_OBJECT
27 		Q_DISABLE_COPY(CrashReporter)
28 
29 	public:
30 		CrashReporter(QWidget *p = 0);
31 		~CrashReporter() Q_DECL_OVERRIDE;
32 		void run();
33 	protected:
34 		QEventLoop *qelLoop;
35 		QProgressDialog *qpdProgress;
36 		QNetworkReply *qnrReply;
37 		QLineEdit *qleEmail;
38 		QTextEdit *qteDescription;
39 	public slots:
40 		void uploadFinished();
41 		void uploadProgress(qint64, qint64);
42 };
43 
44 #else
45 class CrashReporter;
46 #endif
47