[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r3813: Add the UI and skeleton code of an application that is execu (in vidalia/branches/breakpad/src: . crashreporter crashreporter/res crashreporter/res/32x32 crashreporter/res/64x64)



Author: edmanm
Date: 2009-06-03 02:01:57 -0400 (Wed, 03 Jun 2009)
New Revision: 3813

Added:
   vidalia/branches/breakpad/src/crashreporter/
   vidalia/branches/breakpad/src/crashreporter/CMakeLists.txt
   vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.cpp
   vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.h
   vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.ui
   vidalia/branches/breakpad/src/crashreporter/main.cpp
   vidalia/branches/breakpad/src/crashreporter/res/
   vidalia/branches/breakpad/src/crashreporter/res/32x32/
   vidalia/branches/breakpad/src/crashreporter/res/32x32/tools-report-bug.png
   vidalia/branches/breakpad/src/crashreporter/res/64x64/
   vidalia/branches/breakpad/src/crashreporter/res/64x64/tools-report-bug.png
   vidalia/branches/breakpad/src/crashreporter/res/CrashReporter.qrc
Modified:
   vidalia/branches/breakpad/src/CMakeLists.txt
Log:

Add the UI and skeleton code of an application that is executed in the Breakpad
exception handler to let the user know things went kablooey and ask them if they
want to submit the crash report.


Modified: vidalia/branches/breakpad/src/CMakeLists.txt
===================================================================
--- vidalia/branches/breakpad/src/CMakeLists.txt	2009-06-02 16:25:02 UTC (rev 3812)
+++ vidalia/branches/breakpad/src/CMakeLists.txt	2009-06-03 06:01:57 UTC (rev 3813)
@@ -39,6 +39,9 @@
   link_directories(${CMAKE_CURRENT_BINARY_DIR}/miniupnpc)
   add_subdirectory(miniupnpc)
 endif(USE_MINIUPNPC)
+if (USE_BREAKPAD)
+  add_subdirectory(crashreporter)
+endif(USE_BREAKPAD)
 
 add_subdirectory(common)
 add_subdirectory(tools)

Added: vidalia/branches/breakpad/src/crashreporter/CMakeLists.txt
===================================================================
--- vidalia/branches/breakpad/src/crashreporter/CMakeLists.txt	                        (rev 0)
+++ vidalia/branches/breakpad/src/crashreporter/CMakeLists.txt	2009-06-03 06:01:57 UTC (rev 3813)
@@ -0,0 +1,42 @@
+##
+##  $Id$
+##
+##  This file is part of Vidalia, and is subject to the license terms in the
+##  LICENSE file, found in the top level directory of this distribution. If
+##  you did not receive the LICENSE file with this file, you may obtain it
+##  from the Vidalia source package distributed by the Vidalia Project at
+##  http://www.vidalia-project.net/. No part of Vidalia, including this file,
+##  may be copied, modified, propagated, or distributed except according to
+##  the terms described in the LICENSE file.
+##
+
+include_directories(
+  ${CMAKE_CURRENT_BINARY_DIR}
+  ${BREAKPAD_INCLUDE_DIR}
+)
+
+## Add the application source files
+set(crashreporter_SRCS
+  main.cpp
+  CrashReportDialog.cpp
+)
+qt4_wrap_cpp(crashreporter_SRCS
+  CrashReportDialog.h
+)
+qt4_wrap_ui(crashreporter_SRCS
+  CrashReportDialog.ui
+)
+qt4_add_resources(crashreporter_SRCS
+  res/CrashReporter.qrc
+)
+
+## Create the crashreporter executable
+add_executable(crashreporter ${crashreporter_SRCS})
+
+## Link the crash reporter application with the Qt and Breakpad libraries
+target_link_libraries(crashreporter
+  ${QT_QTCORE_LIBRARY}
+  ${QT_QTGUI_LIBRARY}
+  ${BREAKPAD_LIBRARIES}
+)
+


Property changes on: vidalia/branches/breakpad/src/crashreporter/CMakeLists.txt
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.cpp
===================================================================
--- vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.cpp	                        (rev 0)
+++ vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.cpp	2009-06-03 06:01:57 UTC (rev 3813)
@@ -0,0 +1,27 @@
+/*
+**  This file is part of Vidalia, and is subject to the license terms in the
+**  LICENSE file, found in the top level directory of this distribution. If you
+**  did not receive the LICENSE file with this file, you may obtain it from the
+**  Vidalia source package distributed by the Vidalia Project at
+**  http://www.vidalia-project.net/. No part of Vidalia, including this file,
+**  may be copied, modified, propagated, or distributed except according to the
+**  terms described in the LICENSE file.
+*/
+
+/*
+** \file CrashReportDialog.cpp
+** \version $Id$
+** \brief Dialog that asks the user whether they would like to
+** submit the crash report, along with optional additional details
+** about what they were doing at the time of the crash.
+*/
+
+#include "CrashReportDialog.h"
+
+
+CrashReportDialog::CrashReportDialog(QWidget *parent)
+  : QDialog(parent)
+{
+  ui.setupUi(this);
+}
+


Property changes on: vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.cpp
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.h
===================================================================
--- vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.h	                        (rev 0)
+++ vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.h	2009-06-03 06:01:57 UTC (rev 3813)
@@ -0,0 +1,35 @@
+/*
+**  This file is part of Vidalia, and is subject to the license terms in the
+**  LICENSE file, found in the top level directory of this distribution. If you
+**  did not receive the LICENSE file with this file, you may obtain it from the
+**  Vidalia source package distributed by the Vidalia Project at
+**  http://www.vidalia-project.net/. No part of Vidalia, including this file,
+**  may be copied, modified, propagated, or distributed except according to the
+**  terms described in the LICENSE file.
+*/
+
+/*
+** \file CrashReportDialog.h
+** \version $Id$
+** \brief Dialog that asks the user whether they would like to
+** submit the crash report, along with optional additional details
+** about what they were doing at the time of the crash.
+*/
+
+#include "ui_CrashReportDialog.h"
+
+
+class CrashReportDialog : public QDialog
+{
+  Q_OBJECT
+
+public:
+  /** Default constructor.
+   */
+  CrashReportDialog(QWidget *parent = 0);
+
+private:
+  /** Qt Designer created object. */
+  Ui::CrashReportDialog ui;
+};
+


Property changes on: vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.h
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.ui
===================================================================
--- vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.ui	                        (rev 0)
+++ vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.ui	2009-06-03 06:01:57 UTC (rev 3813)
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CrashReportDialog</class>
+ <widget class="QDialog" name="CrashReportDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>434</width>
+    <height>251</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Submit a Crash Report</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="res/CrashReporter.qrc">
+    <normaloff>:/images/32x32/tools-report-bug.png</normaloff>:/images/32x32/tools-report-bug.png</iconset>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0" rowspan="2">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string/>
+     </property>
+     <property name="pixmap">
+      <pixmap resource="res/CrashReporter.qrc">:/images/64x64/tools-report-bug.png</pixmap>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLabel" name="lblCrashReport">
+     <property name="font">
+      <font>
+       <pointsize>9</pointsize>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Vidalia encountered an error and needed to close</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>A crash report has been created that you can automatically send to the Vidalia developers to help identify and fix the problem. The submitted report does not contain any personally identifying information.</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <widget class="QLabel" name="lblDetails">
+     <property name="text">
+      <string>Please also describe what you were doing before the application crashed (optional):</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0" colspan="2">
+    <widget class="QTextBrowser" name="textDetails">
+     <property name="tabChangesFocus">
+      <bool>true</bool>
+     </property>
+     <property name="readOnly">
+      <bool>false</bool>
+     </property>
+     <property name="openLinks">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="1">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="2">
+    <widget class="Line" name="line">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="res/CrashReporter.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>CrashReportDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>CrashReportDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>


Property changes on: vidalia/branches/breakpad/src/crashreporter/CrashReportDialog.ui
___________________________________________________________________
Added: svn:eol-style
   + native

Added: vidalia/branches/breakpad/src/crashreporter/main.cpp
===================================================================
--- vidalia/branches/breakpad/src/crashreporter/main.cpp	                        (rev 0)
+++ vidalia/branches/breakpad/src/crashreporter/main.cpp	2009-06-03 06:01:57 UTC (rev 3813)
@@ -0,0 +1,32 @@
+/*
+**  This file is part of Vidalia, and is subject to the license terms in the
+**  LICENSE file, found in the top level directory of this distribution. If you
+**  did not receive the LICENSE file with this file, you may obtain it from the
+**  Vidalia source package distributed by the Vidalia Project at
+**  http://www.vidalia-project.net/. No part of Vidalia, including this file,
+**  may be copied, modified, propagated, or distributed except according to the
+**  terms described in the LICENSE file.
+*/
+
+/*
+** \file main.cpp
+** \version $Id$
+** \brief Application that is run after Vidalia crashes and asks the
+** user if they would like to submit the crash report.
+*/
+
+#include "CrashReportDialog.h"
+
+#include <QApplication>
+
+
+int
+main(int argc, char *argv[])
+{
+  QApplication app(argc, argv);
+
+  CrashReportDialog dlg;
+  dlg.show();
+
+  return app.exec();
+}


Property changes on: vidalia/branches/breakpad/src/crashreporter/main.cpp
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: vidalia/branches/breakpad/src/crashreporter/res/32x32/tools-report-bug.png
===================================================================
(Binary files differ)


Property changes on: vidalia/branches/breakpad/src/crashreporter/res/32x32/tools-report-bug.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: vidalia/branches/breakpad/src/crashreporter/res/64x64/tools-report-bug.png
===================================================================
(Binary files differ)


Property changes on: vidalia/branches/breakpad/src/crashreporter/res/64x64/tools-report-bug.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: vidalia/branches/breakpad/src/crashreporter/res/CrashReporter.qrc
===================================================================
--- vidalia/branches/breakpad/src/crashreporter/res/CrashReporter.qrc	                        (rev 0)
+++ vidalia/branches/breakpad/src/crashreporter/res/CrashReporter.qrc	2009-06-03 06:01:57 UTC (rev 3813)
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+  <qresource prefix="images">
+    <file>32x32/tools-report-bug.png</file>
+    <file>64x64/tools-report-bug.png</file>
+  </qresource>
+</RCC>


Property changes on: vidalia/branches/breakpad/src/crashreporter/res/CrashReporter.qrc
___________________________________________________________________
Added: svn:eol-style
   + native