1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +02:00

Send more accurate data with crash reports

This commit is contained in:
Dominik Schmidt
2014-04-25 02:44:15 +02:00
parent 386cbdc348
commit cbd0f2a5b2
3 changed files with 26 additions and 11 deletions

View File

@@ -9,6 +9,17 @@ list(APPEND crashreporter_RC resources.qrc)
qt_wrap_ui( crashreporter_UI_HEADERS ${crashreporter_UI} )
qt_add_resources( crashreporter_RC_RCC ${crashreporter_RC} )
if(BUILD_RELEASE)
set(CRASHREPORTER_RELEASE_CHANNEL "release")
else()
set(CRASHREPORTER_RELEASE_CHANNEL "nightly")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CrashReporterConfig.h.in
${CMAKE_CURRENT_BINARY_DIR}/CrashReporterConfig.h)
include_directories( ${CMAKE_CURRENT_BINARY_DIR}
../../libtomahawk
../../thirdparty/libcrashreporter-qt/src

View File

@@ -0,0 +1,8 @@
#ifndef CRASHREPORTERCONFIG_H
#define CRASHREPORTERCONFIG_H
#define CRASHREPORTER_BUILD_ID "@CMAKE_DATESTAMP_YEAR@@CMAKE_DATESTAMP_MONTH@@CMAKE_DATESTAMP_DAY@000000"
#define CRASHREPORTER_RELEASE_CHANNEL "@CRASHREPORTER_RELEASE_CHANNEL@"
#endif // CRASHREPORTERCONFIG_H

View File

@@ -18,6 +18,8 @@
#include <libcrashreporter-gui/CrashReporter.h>
#include "CrashReporterConfig.h"
#include <QTranslator>
#include <iostream>
#include <QApplication>
@@ -53,16 +55,12 @@ int main( int argc, char* argv[] )
reporter.setLogo(QPixmap(":/tomahawk-icon.png"));
// // socorro expects a 10 digit build id
// QRegExp rx( "(\\d+\\.\\d+\\.\\d+).(\\d+)" );
// rx.exactMatch( TomahawkUtils::appFriendlyVersion() );
// //QString const version = rx.cap( 1 );
// QString const buildId = rx.cap( 2 ).leftJustified( 10, '0' );
reporter.setReportData( "BuildID", CRASHREPORTER_BUILD_ID );
reporter.setReportData( "ProductName", "Tomahawk" );
reporter.setReportData( "Version", TomahawkUtils::appFriendlyVersion().toLocal8Bit() );
reporter.setReportData( "ReleaseChannel", CRASHREPORTER_RELEASE_CHANNEL);
reporter.setReportData( "BuildID", "YYYYMMDDHH" );
reporter.setReportData( "ProductName", "WaterWolf" );
reporter.setReportData( "Version", TomahawkUtils::appFriendlyVersion().toLocal8Bit() );
//reporter.setReportData( "timestamp", QByteArray::number( QDateTime::currentDateTime().toTime_t() ) );
//reporter.setReportData( "timestamp", QByteArray::number( QDateTime::currentDateTime().toTime_t() ) );
// add parameters
@@ -84,7 +82,6 @@ int main( int argc, char* argv[] )
// << Pair("URL", "http://code.google.com/p/crashme/")
// << Pair("version", "20.0a1")
// << Pair("CrashTime", "1357770042")
// << Pair("ReleaseChannel", "nightly")
// << Pair("submitted_timestamp", "2013-01-09T22:21:18.646733+00:00")
// << Pair("buildid", "20130107030932")
// << Pair("timestamp", "1357770078.646789")
@@ -93,7 +90,6 @@ int main( int argc, char* argv[] )
// << Pair("FramePoisonSize", "4096")
// << Pair("FramePoisonBase", "7ffffffff0dea000")
// << Pair("Add-ons", "%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:20.0a1,crashme%40ted.mielczarek.org:0.4")
// << Pair("BuildID", "YYYYMMDDHH")
// << Pair("SecondsSinceLastCrash", "1831736")
// << Pair("ProductName", "WaterWolf")
// << Pair("legacy_processing", "0")