1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-25 15:01:11 +02:00

Don't hardcode submission url in the CrashReporter class

This commit is contained in:
Uwe L. Korn
2013-09-02 10:03:53 +02:00
parent fbf3820ae4
commit 0c6d6f71f1
3 changed files with 6 additions and 4 deletions

View File

@@ -30,7 +30,8 @@
#define RESPATH ":/data/"
CrashReporter::CrashReporter( const QStringList& args )
CrashReporter::CrashReporter( const QUrl& url, const QStringList& args )
: m_url( url )
{
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
@@ -56,7 +57,7 @@ CrashReporter::CrashReporter( const QStringList& args )
ui.bottomLabel->setIndent( 1 );
#endif //Q_OS_MAC
m_request = new QNetworkRequest( QUrl( "http://oops.tomahawk-player.org/addreport.php" ) );
m_request = new QNetworkRequest( m_url );
m_dir = args.value( 1 );
m_minidump = m_dir + '/' + args.value( 2 ) + ".dmp";

View File

@@ -32,7 +32,7 @@ class CrashReporter : public QDialog
Q_OBJECT
public:
CrashReporter( const QStringList& argv );
CrashReporter( const QUrl& url, const QStringList& argv );
virtual ~CrashReporter( );
private:
@@ -43,6 +43,7 @@ private:
QString m_product_name;
QNetworkRequest* m_request;
QNetworkReply* m_reply;
QUrl m_url;
public slots:
void send();

View File

@@ -45,7 +45,7 @@ int main( int argc, char* argv[] )
return 1;
}
CrashReporter reporter( app.arguments() );
CrashReporter reporter( QUrl( "http://oops.tomahawk-player.org/addreport.php" ), app.arguments() );
reporter.show();
return app.exec();