Vidalia
0.2.15
|
00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.torproject.org/projects/vidalia.html. No part of Vidalia, 00007 ** including this file, may be copied, modified, propagated, or distributed 00008 ** except according to the terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file CrashReportDialog.h 00013 ** \brief Dialog that asks the user whether they would like to 00014 ** submit the crash report, along with optional additional details 00015 ** about what they were doing at the time of the crash. 00016 */ 00017 00018 #include "ui_CrashReportDialog.h" 00019 00020 #include <QHash> 00021 #include <QByteArray> 00022 00023 class QString; 00024 00025 00026 class CrashReportDialog : public QDialog 00027 { 00028 Q_OBJECT 00029 00030 public: 00031 /** Default constructor. 00032 */ 00033 CrashReportDialog(QWidget *parent = 0); 00034 00035 /** Sets the crash <b>annotations</b> key-value pairs associated with 00036 * the generated minidump. 00037 */ 00038 void setCrashAnnotations(const QHash<QString,QString> &annotations); 00039 00040 /** Sets the <b>minidump</b> contents generated by the crashed 00041 * applications exception handler. 00042 */ 00043 void setMinidumpFiles(const QString &minidump, const QString &annotations); 00044 00045 public slots: 00046 /** Called when the user clicks the "Restart Vidalia" button on the 00047 * dialog. If the "Submit my crash report..." checkbox is checked, it 00048 * will first attempt to submit the crash report. After that is complete, 00049 * it will try to restart the Vidalia process with any arguments specified 00050 * in the crash annotations file. 00051 * \sa setCrashAnnotations() 00052 */ 00053 virtual void accept(); 00054 00055 private: 00056 /** Minidump path 00057 */ 00058 QString _minidumpPath; 00059 00060 /** Minidump info path 00061 */ 00062 QString _annotationsPath; 00063 00064 /** Set of parsed key-value pairs generated by the crashed application's 00065 * exception handler and written alongside the minidump. 00066 */ 00067 QHash<QString,QString> _annotations; 00068 00069 /** Qt Designer created object. 00070 */ 00071 Ui::CrashReportDialog ui; 00072 }; 00073